mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-07-01 10:13:35 +00:00
Compare commits
1 Commits
IPMITOOL_1
...
IPMITOOL_1
Author | SHA1 | Date | |
---|---|---|---|
83620456c4 |
@ -28,3 +28,6 @@ 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.
|
||||
|
||||
You acknowledge that this software is not designed or intended for use
|
||||
in the design, construction, operation or maintenance of any nuclear
|
||||
facility.
|
||||
|
@ -1,31 +1,3 @@
|
||||
version 1.8.8
|
||||
* Fix segfaults in sensor data repository list
|
||||
* Fix ipmievd to open interface before daemonizing
|
||||
* Fix IPMIv1.5 authtype NONE to ignore supplied password
|
||||
* Fix cipher suite display bug in lan print
|
||||
* Fix typo in IPMIv2 SOL output when sending break
|
||||
* Fix improper LUN handling with Tyan SOL
|
||||
* Add LUN support to OpenIPMI interface
|
||||
* Add support for Kontron OEM commands
|
||||
* Update to Kontron Firmware Update command
|
||||
|
||||
version 1.8.7
|
||||
* Remove nuclear clause from license
|
||||
* Add Sun OEM command for blades
|
||||
* Increase argument size for raw commands in shell/exec
|
||||
* Fix handling of LUNs for LAN interfaces
|
||||
* Add IPMIv2 SOL loopback test
|
||||
* Add support for IBM OEM SEL messages
|
||||
* Disable file paranoia checks on read files by default
|
||||
* Support IPMIv2 SOL on older Intel boxes
|
||||
* Display message and exit if keepalive fails during SOL
|
||||
* Add support for setting VLAN id and priority
|
||||
* Add support for FreeBSD OpenIPMI-compatible driver
|
||||
* Add support for IPMIv2 Firmware Firewall
|
||||
* Fix gcc4 compile warnings
|
||||
* Make ipmievd generate pidfile
|
||||
* Add initscripts for ipmievd
|
||||
|
||||
version 1.8.6
|
||||
* Fix memory corruption when sending encrypted SOL traffic
|
||||
* Add keepalive timer to IPMIv2 SOL sessions
|
||||
|
@ -27,6 +27,10 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
DOCDIR = $(DESTDIR)/$(datadir)/doc/$(PACKAGE)
|
||||
DOCLIST = README COPYING AUTHORS ChangeLog
|
||||
|
@ -29,6 +29,10 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
aclocal
|
||||
libtoolize --automake --copy
|
||||
|
@ -3,7 +3,7 @@ dnl autoconf for ipmitool
|
||||
dnl
|
||||
AC_INIT([src/ipmitool.c])
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE([ipmitool], [1.8.8])
|
||||
AM_INIT_AUTOMAKE([ipmitool], [1.8.6])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_CONFIG_SRCDIR([src/ipmitool.c])
|
||||
AC_PREREQ(2.50)
|
||||
@ -18,7 +18,7 @@ AC_CHECK_PROG([RPMBUILD], [rpmbuild], [rpmbuild], [rpm])
|
||||
AC_CHECK_PROG([SED], [sed], [sed])
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h sys/stat.h unistd.h paths.h])
|
||||
AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h sys/stat.h unistd.h paths.h termios.h])
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/socket.h])
|
||||
AC_CHECK_HEADERS([sys/byteorder.h byteswap.h])
|
||||
|
||||
@ -91,17 +91,6 @@ solaris*)
|
||||
enable_intf_bmc=no
|
||||
enable_ipmishell=no
|
||||
;;
|
||||
*freebsd*)
|
||||
enable_intf_imb=no
|
||||
enable_intf_lipmi=no
|
||||
enable_intf_bmc=no
|
||||
;;
|
||||
*netbsd*)
|
||||
enable_intf_imb=no
|
||||
enable_intf_lipmi=no
|
||||
enable_intf_bmc=no
|
||||
enable_intf_open=no
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(ARCH, $host_cpu)
|
||||
@ -203,17 +192,7 @@ AC_ARG_WITH([kerneldir],
|
||||
AC_CHECK_HEADER([linux/ipmi.h],
|
||||
[AC_DEFINE(HAVE_OPENIPMI_H, [1],
|
||||
[Define to 1 if you have the <linux/ipmi.h> header file.])],
|
||||
[AC_CHECK_HEADER([sys/ipmi.h],
|
||||
[AC_DEFINE(HAVE_FREEBSD_IPMI_H, [1],
|
||||
[Define to 1 if you have the <sys/ipmi.h> header file.])],
|
||||
[echo "** Unable to find OpenIPMI header files. Using internal version."])])
|
||||
|
||||
dnl look for termios header file
|
||||
AC_CHECK_HEADER([termios.h],
|
||||
[AC_DEFINE(HAVE_TERMIOS_H, [1], [Define to 1 if you have <termios.h>.])],
|
||||
[AC_CHECK_HEADER([sys/termios.h],
|
||||
[AC_DEFINE(HAVE_SYS_TERMIOS_H, [1], [Define to 1 if you have <sys/termios.h>.])],
|
||||
[echo "** Unable to find termios header file."])])
|
||||
[echo "** Unable to find OpenIPMI header files. Using internal version."])
|
||||
|
||||
dnl set RPM distro tag for use in RPM name
|
||||
AC_ARG_WITH([rpm-distro],
|
||||
@ -221,13 +200,6 @@ AC_ARG_WITH([rpm-distro],
|
||||
[set Linux distribution tag for use in RPM version string])],
|
||||
[AC_SUBST(DISTRO, $with_rpm_distro)])
|
||||
|
||||
dnl set RPM release tag
|
||||
AC_ARG_WITH([rpm-release],
|
||||
[AC_HELP_STRING([--with-rpm-release=RELEASE],
|
||||
[set release number for RPM release field])],
|
||||
[], [with_rpm_release=1])
|
||||
AC_SUBST(RPM_RELEASE, $with_rpm_release)
|
||||
|
||||
dnl enable Linux OpenIPMI interface
|
||||
AC_ARG_ENABLE([intf-open],
|
||||
[AC_HELP_STRING([--enable-intf-open],
|
||||
@ -319,14 +291,6 @@ AC_ARG_ENABLE([buildcheck],
|
||||
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
dnl Enable extra file security paranoia
|
||||
AC_ARG_ENABLE([file-security],
|
||||
[AC_HELP_STRING([--enable-file-security],
|
||||
[enable extra security checks on files opened for read [default=no]])],
|
||||
[if test "x$enable_file_security" != "xno"; then
|
||||
AC_DEFINE(ENABLE_FILE_SECURITY, [1], [Define to 1 for extra file security.])
|
||||
fi], [])
|
||||
|
||||
dnl Generate files for build
|
||||
AC_CONFIG_FILES([Makefile
|
||||
doc/Makefile
|
||||
|
@ -27,12 +27,15 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
dist_pkgdata_DATA = README oem_ibm_sel_map
|
||||
dist_pkgdata_DATA = README
|
||||
|
||||
dist_pkgdata_SCRIPTS = bmclanconf ipmi.init.basic ipmi.init.redhat \
|
||||
ipmievd.init.redhat ipmievd.init.suse ipmievd.init.debian \
|
||||
collect_data.sh create_rrds.sh create_webpage_compact.sh create_webpage.sh
|
||||
|
||||
|
@ -29,6 +29,11 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
#
|
||||
|
||||
|
||||
# This script is designed for Sun Fire LX50, V60x and V65x systems.
|
||||
|
@ -1,92 +0,0 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ipmievd
|
||||
# Required-Start: $local_fs $remote_fs $syslog
|
||||
# Required-Stop: $local_fs $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: S 0 1 6
|
||||
# Short-Description: IPMI event daemon
|
||||
# Description: ipmievd is a daemon which will listen for events
|
||||
# from the BMC that are being sent to the SEL and
|
||||
# also log those messages to syslog.
|
||||
### END INIT INFO
|
||||
#
|
||||
# Author: Elmar Hoffmann <elho@elho.net>
|
||||
# Licence: This script is public domain using the same
|
||||
# licence as ipmitool itself.
|
||||
# Modified by: Petter Reinholdtsen
|
||||
|
||||
set -e
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DESC="IPMI event daemon"
|
||||
NAME=ipmievd
|
||||
DAEMON=/usr/sbin/$NAME
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Gracefully exit if the package has been removed.
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
. /etc/default/rcS
|
||||
|
||||
# Options used by ipmievd.
|
||||
#
|
||||
# "open" uses the asynchronous event notification from the OpenIPMI
|
||||
# kernel driver, "sel" uses active polling of the contents of the SEL
|
||||
# for new events.
|
||||
#
|
||||
# Need to force 'daemon' mode, to make sure messages are sent to
|
||||
# syslog and the program forks into the background.
|
||||
#
|
||||
# Se ipmievd(8) for more info.
|
||||
IPMIEVD_OPTIONS="open daemon"
|
||||
|
||||
# Read config file if it is present.
|
||||
[ -f /etc/default/$NAME ] && . /etc/default/$NAME
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service.
|
||||
#
|
||||
d_start() {
|
||||
start-stop-daemon --start --quiet --exec $DAEMON -- $IPMIEVD_OPTIONS
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service.
|
||||
#
|
||||
d_stop() {
|
||||
start-stop-daemon --stop --quiet --name $NAME --exec $DAEMON
|
||||
}
|
||||
|
||||
CODE=0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_begin_msg "Starting $DESC" "$NAME"
|
||||
d_start || CODE=$?
|
||||
[ "$VERBOSE" != no ] && log_end_msg $CODE
|
||||
exit $CODE
|
||||
;;
|
||||
stop)
|
||||
log_begin_msg "Stopping $DESC" "$NAME"
|
||||
d_stop || CODE=$?
|
||||
log_end_msg $CODE
|
||||
exit $CODE
|
||||
;;
|
||||
restart|force-reload)
|
||||
log_begin_msg "Restarting $DESC" "$NAME"
|
||||
d_stop || true
|
||||
sleep 1
|
||||
d_start || CODE=$?
|
||||
log_end_msg $CODE
|
||||
exit $CODE
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -1,87 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# /etc/rc.d/init.d/ipmievd
|
||||
#
|
||||
# Based on example sysvinitfiles script
|
||||
# Copyright (c) 2000 Red Hat Software, Inc.
|
||||
#
|
||||
# chkconfig: 345 99 00
|
||||
# description: ipmievd daemon to send events to syslog
|
||||
# processname: ipmievd
|
||||
# config: /etc/sysconfig/ipmievd
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ipmievd
|
||||
# Required-Start: $syslog ipmi
|
||||
# Should-Start: $time
|
||||
# Required-Stop: $syslog ipmi
|
||||
# Should-Stop: $time
|
||||
# Default-Start: 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: ipmievd daemon to send events to syslog
|
||||
# Description: Start ipmievd to read events from BMC and
|
||||
# log them to syslog. Events correspond to hardware faults,
|
||||
# state transitions such as power on and off, and sensor
|
||||
# readings such as temperature, voltage and fan speed that
|
||||
# are abnormal.
|
||||
### END INIT INFO
|
||||
|
||||
IPMIEVD_BIN=/usr/sbin/ipmievd
|
||||
test -x $IPMIEVD_BIN || { echo "$IPMIEVD_BIN not installed";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 5; fi; }
|
||||
|
||||
# Check for existence of needed config file
|
||||
IPMIEVD_CONFIG=/etc/sysconfig/ipmievd
|
||||
test -r $IPMIEVD_CONFIG || { echo "$IPMIEVD_CONFIG does not exist";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 6; fi; }
|
||||
|
||||
# Read config file
|
||||
. $IPMIEVD_CONFIG
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
start() {
|
||||
echo "Starting ipmievd:"
|
||||
if [ -f /var/lock/subsys/ipmievd ]; then
|
||||
return 0
|
||||
fi
|
||||
daemon $IPMIEVD_BIN $IPMIEVD_OPTIONS
|
||||
ret=$?
|
||||
[ $ret -eq 0 ] && touch /var/lock/subsys/ipmievd
|
||||
return $ret
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo "Shutting down ipmievd:"
|
||||
killproc $IPMIEVD_BIN
|
||||
ret=$?
|
||||
[ $ret -eq 0 ] && rm -f /var/lock/subsys/ipmievd
|
||||
return $ret
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status $IPMIEVD_BIN
|
||||
;;
|
||||
restart|reload)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
condrestart)
|
||||
[ -f /var/lock/subsys/ipmievd ] && restart || :
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ipmievd {start|stop|status|reload|restart|condrestart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit $?
|
@ -1,212 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# System startup script for ipmievd
|
||||
# Based on skeleton.compat example script
|
||||
# Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation; either version 2.1 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# This 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
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
|
||||
# USA.
|
||||
#
|
||||
# Note: This template uses functions rc_XXX defined in /etc/rc.status on
|
||||
# UnitedLinux/SUSE/Novell based Linux distributions. However, it will work
|
||||
# on other distributions as well, by using the LSB (Linux Standard Base)
|
||||
# or RH functions or by open coding the needed functions.
|
||||
# Read http://www.tldp.org/HOWTO/HighQuality-Apps-HOWTO/ if you prefer not
|
||||
# to use this template.
|
||||
#
|
||||
# chkconfig: 345 99 00
|
||||
# description: ipmievd daemon
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ipmievd
|
||||
# Required-Start: $syslog ipmi
|
||||
# Should-Start: $time
|
||||
# Required-Stop: $syslog ipmi
|
||||
# Should-Stop: $time
|
||||
# Default-Start: 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: ipmievd daemon to send events to syslog
|
||||
# Description: Start ipmievd to read events from BMC and
|
||||
# log them to syslog. Events correspond to hardware faults,
|
||||
# state transitions such as power on and off, and sensor
|
||||
# readings such as temperature, voltage and fan speed that
|
||||
# are abnormal.
|
||||
### END INIT INFO
|
||||
#
|
||||
|
||||
# Check for missing binaries (stale symlinks should not happen)
|
||||
# Note: Special treatment of stop for LSB conformance
|
||||
IPMIEVD_BIN=/usr/sbin/ipmievd
|
||||
test -x $IPMIEVD_BIN || { echo "$IPMIEVD_BIN not installed";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 5; fi; }
|
||||
|
||||
# Check for existence of needed config file and read it
|
||||
IPMIEVD_CONFIG=/etc/sysconfig/ipmievd
|
||||
test -r $IPMIEVD_CONFIG || { echo "$IPMIEVD_CONFIG does not exist";
|
||||
if [ "$1" = "stop" ]; then exit 0;
|
||||
else exit 6; fi; }
|
||||
|
||||
# Read config
|
||||
. $IPMIEVD_CONFIG
|
||||
|
||||
if test -e /etc/rc.status; then
|
||||
# SUSE rc script library
|
||||
. /etc/rc.status
|
||||
else
|
||||
export LC_ALL=POSIX
|
||||
_cmd=$1
|
||||
declare -a _SMSG
|
||||
if test "${_cmd}" = "status"; then
|
||||
_SMSG=(running dead dead unused unknown reserved)
|
||||
_RC_UNUSED=3
|
||||
else
|
||||
_SMSG=(done failed failed missed failed skipped unused failed failed reserved)
|
||||
_RC_UNUSED=6
|
||||
fi
|
||||
if test -e /lib/lsb/init-functions; then
|
||||
# LSB
|
||||
. /lib/lsb/init-functions
|
||||
echo_rc()
|
||||
{
|
||||
if test ${_RC_RV} = 0; then
|
||||
log_success_msg " [${_SMSG[${_RC_RV}]}] "
|
||||
else
|
||||
log_failure_msg " [${_SMSG[${_RC_RV}]}] "
|
||||
fi
|
||||
}
|
||||
# TODO: Add checking for lockfiles
|
||||
checkproc() { return pidofproc ${1+"$@"} >/dev/null 2>&1; }
|
||||
elif test -e /etc/init.d/functions; then
|
||||
# RHAT
|
||||
. /etc/init.d/functions
|
||||
echo_rc()
|
||||
{
|
||||
#echo -n " [${_SMSG[${_RC_RV}]}] "
|
||||
if test ${_RC_RV} = 0; then
|
||||
success " [${_SMSG[${_RC_RV}]}] "
|
||||
else
|
||||
failure " [${_SMSG[${_RC_RV}]}] "
|
||||
fi
|
||||
}
|
||||
checkproc() { return status ${1+"$@"}; }
|
||||
start_daemon() { return daemon ${1+"$@"}; }
|
||||
else
|
||||
# emulate it
|
||||
echo_rc() { echo " [${_SMSG[${_RC_RV}]}] "; }
|
||||
fi
|
||||
rc_reset() { _RC_RV=0; }
|
||||
rc_failed()
|
||||
{
|
||||
if test -z "$1"; then
|
||||
_RC_RV=1;
|
||||
elif test "$1" != "0"; then
|
||||
_RC_RV=$1;
|
||||
fi
|
||||
return ${_RC_RV}
|
||||
}
|
||||
rc_check()
|
||||
{
|
||||
return rc_failed $?
|
||||
}
|
||||
rc_status()
|
||||
{
|
||||
rc_failed $?
|
||||
if test "$1" = "-r"; then _RC_RV=0; shift; fi
|
||||
if test "$1" = "-s"; then rc_failed 5; echo_rc; rc_failed 3; shift; fi
|
||||
if test "$1" = "-u"; then rc_failed ${_RC_UNUSED}; echo_rc; rc_failed 3; shift; fi
|
||||
if test "$1" = "-v"; then echo_rc; shift; fi
|
||||
if test "$1" = "-r"; then _RC_RV=0; shift; fi
|
||||
return ${_RC_RV}
|
||||
}
|
||||
rc_exit() { exit ${_RC_RV}; }
|
||||
rc_active()
|
||||
{
|
||||
if test -z "$RUNLEVEL"; then read RUNLEVEL REST < <(/sbin/runlevel); fi
|
||||
if test -e /etc/init.d/S[0-9][0-9]${1}; then return 0; fi
|
||||
return 1
|
||||
}
|
||||
fi
|
||||
|
||||
# Reset status of this service
|
||||
rc_reset
|
||||
|
||||
# Return values acc. to LSB for all commands but status:
|
||||
# 0 - success
|
||||
# 1 - generic or unspecified error
|
||||
# 2 - invalid or excess argument(s)
|
||||
# 3 - unimplemented feature (e.g. "reload")
|
||||
# 4 - user had insufficient privileges
|
||||
# 5 - program is not installed
|
||||
# 6 - program is not configured
|
||||
# 7 - program is not running
|
||||
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
|
||||
#
|
||||
# Note that starting an already running service, stopping
|
||||
# or restarting a not-running service as well as the restart
|
||||
# with force-reload (in case signaling is not supported) are
|
||||
# considered a success.
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting ipmievd "
|
||||
start_daemon $IPMIEVD_BIN $IPMIEVD_OPTIONS
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down ipmievd "
|
||||
killproc -TERM $IPMIEVD_BIN
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart|condrestart)
|
||||
## Do a restart only if the service was active before.
|
||||
## Note: try-restart is now part of LSB (as of 1.9).
|
||||
## RH has a similar command named condrestart.
|
||||
if test "$1" = "condrestart"; then
|
||||
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
|
||||
fi
|
||||
$0 status
|
||||
if test $? = 0; then
|
||||
$0 restart
|
||||
else
|
||||
rc_reset # Not running is not a failure.
|
||||
fi
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
rc_status
|
||||
;;
|
||||
force-reload)
|
||||
echo -n "Reload service ipmievd "
|
||||
$0 try-restart
|
||||
rc_status
|
||||
;;
|
||||
reload)
|
||||
rc_failed 3
|
||||
rc_status -v
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for service ipmievd "
|
||||
checkproc $IPMIEVD_BIN
|
||||
rc_status -v
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload| reload}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
rc_exit
|
@ -1,202 +0,0 @@
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x02","0x04","Chassis Number","Memory Card","Completion Code (0x00=Success)","0x00","Memory hot replace event"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x02","0x05","Chassis Number","Memory Card","Memory Size (in 512MB units)","0x00","Memory hot add event"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x03","0x00","Chassis Number","Scalability Port Number","R","0x00","Scalability link down"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","Chassis Number","Scalability Port Number","R","0x00","Scalability link up"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x03","0x02","Chassis Number","Scalability Port Number","R","0x00","Scalability link double wide down"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x03","0x03","Chassis Number","Scalability Port Number","R","0x00","Scalability link double wide up"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x03","0x80","Chassis Number","Scalability Port Number","R","0x00","Scalability link PFA"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x03","0x81","Chassis Number","Scalability Port Number","R","0x00","Scalability link invalid port"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x03","0x82","Chassis Number","Scalability Port Number","R","0x00","Scalability link invalid node"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x03","0x83","Chassis Number","Scalability Port Number","R","0x00","Scalability link kill"
|
||||
"0xE0","0x00","0x00","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Device OK"
|
||||
"0xE0","0x00","0x01","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required ROM space not available"
|
||||
"0xE0","0x00","0x02","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required I/O Space not available"
|
||||
"0xE0","0x00","0x03","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required memory not available"
|
||||
"0xE0","0x00","0x04","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required memory below 1MB not available"
|
||||
"0xE0","0x00","0x05","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","ROM checksum failed"
|
||||
"0xE0","0x00","0x06","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","BIST failed"
|
||||
"0xE0","0x00","0x07","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Planar device missing or disabled by user"
|
||||
"0xE0","0x00","0x08","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","PCI device has an invalid PCI configuration space header"
|
||||
"0xE0","0x00","0x09","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","FRU information for added PCI device"
|
||||
"0xE0","0x00","0x0A","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","FRU information for removed PCI device"
|
||||
"0xE0","0x00","0x0B","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","A PCI device was added, PCI FRU information is stored in next log entry"
|
||||
"0xE0","0x00","0x0C","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","A PCI device was removed, PCI FRU information is stored in next log entry"
|
||||
"0xE0","0x00","0x0D","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Requested resources not available"
|
||||
"0xE0","0x00","0x0E","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x0F","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x10","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x11","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x12","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x13","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Planar video disabled due to add in video card"
|
||||
"0xE0","0x00","0x14","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","FRU information for PCI device partially disabled "
|
||||
"0xE0","0x00","0x15","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","A PCI device was partially disabled, PCI FRU information is stored in next log entry"
|
||||
"0xE0","0x00","0x16","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","A 33Mhz device is installed on a 66Mhz bus, PCI device information is stored in next log entry"
|
||||
"0xE0","0x00","0x17","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","FRU information, 33Mhz device installed on 66Mhz bus"
|
||||
"0xE0","0x00","0x18","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Merge cable missing"
|
||||
"0xE0","0x00","0x19","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Node 1 to Node 2 cable missing"
|
||||
"0xE0","0x00","0x1A","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Node 1 to Node 3 cable missing"
|
||||
"0xE0","0x00","0x1B","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Node 2 to Node 3 cable missing"
|
||||
"0xE0","0x00","0x1C","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Nodes could not merge"
|
||||
"0xE0","0x00","0x1D","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","No 8 way SMP cable"
|
||||
"0xE0","0x00","0x1E","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Primary North Bridge to PCI Host Bridge IB Link has failed"
|
||||
"0xE0","0x00","0x1F","Chassis Number","Slot Number","Bus Number","Device ID (MSB)","Device ID (LSB)","Vendor ID (MSB)","Vendor ID (LSB)","R","R","R","0x00","Redundant PCI Host Bridge IB Link has failed"
|
||||
"0xE0","0x00","0x00","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Device OK"
|
||||
"0xE0","0x00","0x01","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required ROM space not available"
|
||||
"0xE0","0x00","0x02","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required I/O Space not available"
|
||||
"0xE0","0x00","0x03","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required memory not available"
|
||||
"0xE0","0x00","0x04","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required memory below 1MB not available"
|
||||
"0xE0","0x00","0x05","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","ROM checksum failed"
|
||||
"0xE0","0x00","0x06","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","BIST failed"
|
||||
"0xE0","0x00","0x07","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Planar device missing or disabled by user"
|
||||
"0xE0","0x00","0x08","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","PCI device has an invalid PCI configuration space header"
|
||||
"0xE0","0x00","0x09","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","FRU information for added PCI device"
|
||||
"0xE0","0x00","0x0A","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","FRU information for removed PCI device"
|
||||
"0xE0","0x00","0x0B","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","A PCI device was added, PCI FRU information is stored in next log entry"
|
||||
"0xE0","0x00","0x0C","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","A PCI device was removed, PCI FRU information is stored in next log entry"
|
||||
"0xE0","0x00","0x0D","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Requested resources not available"
|
||||
"0xE0","0x00","0x0E","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x0F","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x10","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x11","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x12","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Required I/O Space Not Available"
|
||||
"0xE0","0x00","0x13","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Planar video disabled due to add in video card"
|
||||
"0xE0","0x00","0x14","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","FRU information for PCI device partially disabled "
|
||||
"0xE0","0x00","0x15","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","A PCI device was partially disabled, PCI FRU information is stored in next log entry"
|
||||
"0xE0","0x00","0x16","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","A 33Mhz device is installed on a 66Mhz bus, PCI device information is stored in next log entry"
|
||||
"0xE0","0x00","0x17","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","FRU information, 33Mhz device installed on 66Mhz bus"
|
||||
"0xE0","0x00","0x18","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Merge cable missing"
|
||||
"0xE0","0x00","0x19","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Node 1 to Node 2 cable missing"
|
||||
"0xE0","0x00","0x1A","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Node 1 to Node 3 cable missing"
|
||||
"0xE0","0x00","0x1B","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Node 2 to Node 3 cable missing"
|
||||
"0xE0","0x00","0x1C","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Nodes could not merge"
|
||||
"0xE0","0x00","0x1D","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","No 8 way SMP cable"
|
||||
"0xE0","0x00","0x1E","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Primary North Bridge to PCI Host Bridge IB Link has failed"
|
||||
"0xE0","0x00","0x1F","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","R","R","R","0x01","Redundant PCI Host Bridge IB Link has failed"
|
||||
"0xE0","0x01","0x00","Chassis Number","Processor Number","R","R","R","R","R","R","R","R","0x00","Processor has failed BIST"
|
||||
"0xE0","0x01","0x01","Chassis Number","Processor Number","R","R","R","R","R","R","R","R","0x00","Unable to apply processor microcode update"
|
||||
"0xE0","0x01","0x02","Chassis Number","Processor Number","R","R","R","R","R","R","R","R","0x00","POST does not support current stepping level of processor"
|
||||
"0xE0","0x01","0x03","Chassis Number","Processor Number","R","R","R","R","R","R","R","R","0x00","CPU mismatch detected"
|
||||
"0xE0","0x02","0x00","Chassis Number","Memory Card","Memory DIMM","R","R","R","R","R","R","R","0x00","Uncorrectable memory error occurred"
|
||||
"0xE0","0x02","0x01","Chassis Number","Memory Card","Memory DIMM","Failing Symbol","R","R","R","R","R","R","0x00","Correctable memory threshold occurred"
|
||||
"0xE0","0x02","0x02","0x00","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM enabled"
|
||||
"0xE0","0x02","0x02 ","0x01","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM disabled, failed ECC test"
|
||||
"0xE0","0x02","0x02 ","0x02","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM disabled, failed POST/BIOS memory test"
|
||||
"0xE0","0x02","0x02 ","0x03","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM disabled, non-supported memory device"
|
||||
"0xE0","0x02","0x02 ","0x04","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x00","DIMM disabled, non-matching or missing DIMM(s)"
|
||||
"0xE0","0x03","0x00","Chassis Number","Memory Card","R","R","R","R","R","R","R","R","0x00","Memory card enabled"
|
||||
"0xE0","0x03","0x00","Chassis Number","Memory Card","R","R","R","R","R","R","R","R","0x00","Memory card disabled"
|
||||
"0xE0","0x02","0x00","0x00","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x01","DIMM enabled"
|
||||
"0xE0","0x02","0x00","0x01","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x01","DIMM disabled, failed ECC test"
|
||||
"0xE0","0x02","0x00","0x02","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x01","DIMM disabled, failed POST/BIOS memory test"
|
||||
"0xE0","0x02","0x00","0x03","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x01","DIMM disabled, non-supported memory device"
|
||||
"0xE0","0x02","0x00","0x04","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x01","DIMM disabled, non-matching or missing DIMM(s)"
|
||||
"0xE1","0x00","0x00","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","Unknown SERR/PERR detected on PCI bus"
|
||||
"0xE1","0x00","0x01","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Address of special cycle DPE"
|
||||
"0xE1","0x00","0x02","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Master read parity error"
|
||||
"0xE1","0x00","0x03","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Received target parity error"
|
||||
"0xE1","0x00","0x04","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Master write parity error"
|
||||
"0xE1","0x00","0x05","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Device signaled SERR"
|
||||
"0xE1","0x00","0x06","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Slave signaled parity error"
|
||||
"0xE1","0x00","0x07","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Signaled Target Abort"
|
||||
"0xE1","0x00","0x08","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Additional Correctable ECC Error"
|
||||
"0xE1","0x00","0x09","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Received Master Abort"
|
||||
"0xE1","0x00","0x0A","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Additional Uncorrectable ECC Error"
|
||||
"0xE1","0x00","0x0B","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Split Completion Discarded"
|
||||
"0xE1","0x00","0x0C","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Correctable ECC Error"
|
||||
"0xE1","0x00","0x0D","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Unexpected Split Completion"
|
||||
"0xE1","0x00","0x0E","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: Uncorrectable ECC Error"
|
||||
"0xE1","0x00","0x0F","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Received split completion error"
|
||||
"0xE1","0x00","0x11","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Address of special cycle DPE"
|
||||
"0xE1","0x00","0x12","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI-PCI bridge secondary error: Master read parity error"
|
||||
"0xE1","0x00","0x13","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Received target parity error"
|
||||
"0xE1","0x00","0x14","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI-PCI bridge secondary error: Master write parity error"
|
||||
"0xE1","0x00","0x15","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Device Signaled SERR"
|
||||
"0xE1","0x00","0x16","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI-PCI bridge secondary error: Slave Signaled Parity Error"
|
||||
"0xE1","0x00","0x17","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Signaled Target Abort"
|
||||
"0xE1","0x00","0x18","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI-PCI bridge secondary error: Additional Correctable ECC Error"
|
||||
"0xE1","0x00","0x19","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Received Master Abort"
|
||||
"0xE1","0x00","0x1A","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI-PCI bridge secondary error: Additional Uncorrectable ECC Error"
|
||||
"0xE1","0x00","0x1B","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Split Completion Discarded"
|
||||
"0xE1","0x00","0x1C","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI-PCI bridge secondary error: Correctable ECC Error"
|
||||
"0xE1","0x00","0x1D","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Unexpected Split Completion"
|
||||
"0xE1","0x00","0x1E","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI-PCI bridge secondary error: Uncorrectable ECC Error"
|
||||
"0xE1","0x00","0x1F","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI-PCI bridge secondary error: Received split completion error"
|
||||
"0xE1","0x00","0x20","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI ECC Error (Corrected)"
|
||||
"0xE1","0x00","0x21","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI Bus Address Parity Error"
|
||||
"0xE1","0x00","0x22","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI Bus Data Parity Error"
|
||||
"0xE1","0x00","0x23","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: SERR# Asserted"
|
||||
"0xE1","0x00","0x24","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PERR Received by Calgary on a PCIX Split Completion"
|
||||
"0xE1","0x00","0x25","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Invalid Address"
|
||||
"0xE1","0x00","0x27","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: TCE Extent Error"
|
||||
"0xE1","0x00","0x29","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Page Fault"
|
||||
"0xE1","0x00","0x2B","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Unauthorized Access"
|
||||
"0xE1","0x00","0x2D","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Parity Error in DMA Read Data Buffer"
|
||||
"0xE1","0x00","0x2F","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI Bus Time Out"
|
||||
"0xE1","0x00","0x31","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: DMA Delayed Read Timeout"
|
||||
"0xE1","0x00","0x33","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Internal Error on PCIX Split Completion"
|
||||
"0xE1","0x00","0x35","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: DMA Read Reply (RIO) Timeout"
|
||||
"0xE1","0x00","0x37","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Internal RAM Error on DMA Write"
|
||||
"0xE1","0x00","0x39","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: MVE Valid Bit Off"
|
||||
"0xE1","0x00","0x3B","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: MVE Index Invalid"
|
||||
"0xE1","0x00","0x40","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: ECC Error (Corrected)"
|
||||
"0xE1","0x00","0x41","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: SERR# Detected"
|
||||
"0xE1","0x00","0x42","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI Bus Data Parity Error"
|
||||
"0xE1","0x00","0x43","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: No DEVSEL#"
|
||||
"0xE1","0x00","0x45","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Bus Time Out"
|
||||
"0xE1","0x00","0x47","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Retry Count Expired"
|
||||
"0xE1","0x00","0x49","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Target-Abort"
|
||||
"0xE1","0x00","0x4B","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Invalid Size"
|
||||
"0xE1","0x00","0x4D","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Access Not Enabled"
|
||||
"0xE1","0x00","0x4F","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Internal RAM Error on MMIO Store"
|
||||
"0xE1","0x00","0x51","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Split Response Received"
|
||||
"0xE1","0x00","0x53","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCIX Split Completion Error Status Received"
|
||||
"0xE1","0x00","0x55","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Unexpected PCIX Split Completion Received"
|
||||
"0xE1","0x00","0x57","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCIX Split Completion Timeout"
|
||||
"0xE1","0x00","0x59","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Recoverable Error Summary Bit"
|
||||
"0xE1","0x00","0x5B","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: CSR Error Summary Bit"
|
||||
"0xE1","0x00","0x5D","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Internal RAM Error on MMIO Load"
|
||||
"0xE1","0x00","0x61","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Bad Command"
|
||||
"0xE1","0x00","0x63","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Length Field Invalid"
|
||||
"0xE1","0x00","0x65","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Load Greater Than 8 & No Write Buffer Enabled"
|
||||
"0xE1","0x00","0x67","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCIX Discontiguous Byte Enable Error"
|
||||
"0xE1","0x00","0x69","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: 4K Address Boundary Crossing Error"
|
||||
"0xE1","0x00","0x6B","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Store Wrap State Machine Check"
|
||||
"0xE1","0x00","0x6D","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Target State Machine Check"
|
||||
"0xE1","0x00","0x6F","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Invalid Transaction PM/DW"
|
||||
"0xE1","0x00","0x71","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Invalid Transaction PM/DR"
|
||||
"0xE1","0x00","0x73","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: Invalid Transaction PS/DW"
|
||||
"0xE1","0x00","0x75","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: DMA Write Command FIFO Parity Error"
|
||||
"0xE1","0x00","0x76","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PERR: PCI Secondary Status Register Dump"
|
||||
"0xE1","0x00","0x77","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","SERR: PCI Secondary Status Register Dump"
|
||||
"0xE1","0x00","0x81","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x00","PCI-to-PCI Bridge Discard Timer Error"
|
||||
"0xE1","0x00","0x01","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x01","SERR detected on PCI bus"
|
||||
"0xE1","0x00","0x02","Chassis Number","Slot Number","Bus Number","Device ID (LSB)","Device ID (MSB)","Vendor ID (LSB)","Vendor ID (MSB)","Status Register (LSB)","Status Register (MSB)","DevFun Number","0x01","PERR detected on PCI bus"
|
||||
"0xE1","0x01","0x00","R","R","Bank (LSB)","Bank (MSB)","Apic ID (LSB)","Apic ID (MSB)","CK4(LSB)","CK4","CK4","CK4(MSB)","0x00","Processor Error Information Data A"
|
||||
"0xE1","0x01","0x01","R","R","Address high (LSB)","Address high","Address high","Address high (MSB)","Address low (LSB)","Address low ","Address low ","Address low (MSB)","0x00","Processor Error Information Data B1"
|
||||
"0xE1","0x01","0x02","R","R","Timestamp high (LSB)","Timestamp high","Timestamp high","Timestamp high (MSB)","Timestamp Low (LSB)","Timestamp low","Timestamp low","Timestamp low (MSB)","0x00","Processor Error Information Data B2"
|
||||
"0xE1","0x01","0x03","R","R","MCA status register high (LSB)","MCA status register high","MCA status register high","MCA status register high (MSB)","MCA status register low (LSB)","MCA status register low","MCA status register low","MCA status register low (MSB)","0x00","Processor Error Information Data C"
|
||||
"0xE1","0x01","0x04","Chassis","0x00","Processor ID","R","R","R","R","R","R","R","0x00","Processor recoverable error"
|
||||
"0xE1","0x01","0x04","Chassis","0x01","Processor ID","R","R","R","R","R","R","R","0x00","Processor unrecoverable error"
|
||||
"0xE1","0x02","0x00","0x00","Failed Row","Spare Row","R","R","R","R","R","R","R","0x00","Memory sparing event, start 1"
|
||||
"0xE1","0x02","0x00","0x02","Failed Row","Spare Row","R","R","R","R","R","R","R","0x00","Memory sparing event, done 1"
|
||||
"0xE1","0x02","0x00","0x01","Failed Row 1","Failed Row 2","Spare Row 1","Spare Row 2","R","R","R","R","R","0x00","Memory sparing event, start 2"
|
||||
"0xE1","0x02","0x00","0x03","Failed Row 1","Failed Row 2","Spare Row 1","Spare Row 2","R","R","R","R","R","0x00","Memory sparing event, done 2"
|
||||
"0xE1","0x02","0x01","Failed Port","Spare Port","R","R","R","R","R","R","R","R","0x00","Memory mirroring failover occurred"
|
||||
"0xE1","0x04","0x00","0x00","FSB FERR/NERR Register","FSB FERR/NERR Register","Chassis Number","R","R","R","R","R","R","0x00","FSB A Fatal"
|
||||
"0xE1","0x04","0x00","0x01","FSB FERR/NERR Register","FSB FERR/NERR Register","Chassis Number","R","R","R","R","R","R","0x00","FSB A Nonfatal"
|
||||
"0xE1","0x04","0x00","0x02","FSB FERR/NERR Register","FSB FERR/NERR Register","Chassis Number","R","R","R","R","R","R","0x00","FSB B Fatal"
|
||||
"0xE1","0x04","0x00","0x03","FSB FERR/NERR Register","FSB FERR/NERR Register","Chassis Number","R","R","R","R","R","R","0x00","FSB B Nonfatal"
|
||||
"0xE1","0x05","0x00","0x02","Hi FERR or NERR Register","R","R","R","R","R","R","R","R","0x00","Lindenhurst Chipset Event: Hi Fatal"
|
||||
"0xE1","0x05","0x00","0x03","Hi FERR or NERR Register","R","R","R","R","R","R","R","R","0x00","Lindenhurst Chipset Event: Hi Nonfatal"
|
||||
"0xE1","0x05","0x01","0x02","Status Register Contents","R","R","R","R","R","R","R","R","0x00","Fatal internal north bridge error"
|
||||
"0xE1","0x05","0x01","0x03","Status Register Contents","R","R","R","R","R","R","R","R","0x00","Nonfatal internal north bridge error"
|
||||
"0xE2","0x00","Register ID","R","First Fire Bit","Register Data (LSB)","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data (MSB)","0x00","PCI Industry Standard Register Dump"
|
||||
"0xE2","0x01","Register ID","R","First Fire Bit (0xFF if N/A)","Register Data (LSB)","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data (MSB)","0x00","PCI-X Industry Standard Register Dump"
|
||||
"0xE2","0x02","Register ID","R","First Fire Bit (0xFF if N/A)","Register Data (LSB)","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data","Register Data (MSB)","0x00","PCI Express Industry Standard Register Dump"
|
||||
"0xE3","Platform ID","Register ID","R","R","R","R","R","R","Register Data (LSB)","Register Data","Register Data","Register Data (MSB)","0x00","RAW Hex Dump"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x00","0x00","R","R","R","0x00","PCI Event/Error Occurred. Next non-timestamped OEM SEL entry will contain details of the specific PCI event/error"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x01","0x00","R","R","R","0x00","Processor Event/Error Occurred. Next non-timestamped OEM SEL entry will contain details of the specific PCI event/error"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x02","0x00","R","R","R","0x00","Memory Event/Error Occurred. Next non-timestamped OEM SEL entry will contain details of the specific PCI event/error"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x00","R","R","R","0x00"," Scalability Event/Error Occurred. Next non-timestamped OEM SEL entry will contain details of the specific PCI event/error"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x04","0x00","R","R","R","0x00","Bus PCI Event/Error Occurred. Next non-timestamped OEM SEL entry will contain details of the specific PCI event/error"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x05","0x00","R","R","R","0x00","Chipset Event/Error Occurred. Next non-timestamped OEM SEL entry will contain details of the specific PCI event/error"
|
@ -27,6 +27,10 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Name: ipmitool
|
||||
Summary: ipmitool - Utility for IPMI control
|
||||
Version: @VERSION@
|
||||
Release: @RPM_RELEASE@%{?_distro:.%{_distro}}
|
||||
Release: 1%{?_distro:.%{_distro}}
|
||||
License: BSD
|
||||
Group: Utilities
|
||||
Packager: Duncan Laurie <duncan@iceblink.org>
|
||||
@ -62,33 +62,6 @@ rm -rf $RPM_BUILD_DIR/ipmitool-@VERSION@
|
||||
%doc %{_datadir}/doc/ipmitool/*
|
||||
|
||||
%changelog
|
||||
* Tue May 02 2006 <duncan@iceblink.org> 1.8.8-1
|
||||
- Fix segfaults in sensor data repository list
|
||||
- Fix ipmievd to open interface before daemonizing
|
||||
- Fix IPMIv1.5 authtype NONE to ignore supplied password
|
||||
- Fix cipher suite display bug in lan print
|
||||
- Fix typo in IPMIv2 SOL output when sending break
|
||||
- Fix improper LUN handling with Tyan SOL
|
||||
- Add LUN support to OpenIPMI interface
|
||||
- Add support for Kontron OEM commands
|
||||
- Update to Kontron Firmware Update command
|
||||
|
||||
* Sun Mar 19 2006 <duncan@iceblink.org> 1.8.7-1
|
||||
- Add Sun OEM command for blades
|
||||
- Increase argument size for raw commands in shell/exec
|
||||
- Fix handling of LUNs for LAN interfaces
|
||||
- Add IPMIv2 SOL loopback test
|
||||
- Add support for IBM OEM SEL messages
|
||||
- Disable file paranoia checks on read files by default
|
||||
- Support IPMIv2 SOL on older Intel boxes
|
||||
- Display message and exit if keepalive fails during SOL
|
||||
- Add support for setting VLAN id and priority
|
||||
- Add support for FreeBSD OpenIPMI-compatible driver
|
||||
- Add support for IPMIv2 Firmware Firewall
|
||||
- Fix gcc4 compile warnings
|
||||
- Make ipmievd generate pidfile
|
||||
- Add initscripts for ipmievd
|
||||
|
||||
* Mon Jan 17 2006 <duncan@iceblink.org> 1.8.6-1
|
||||
- Fix memory corruption when sending encrypted SOL traffic
|
||||
- Add keepalive timer to IPMIv2 SOL sessions
|
||||
|
@ -1,53 +1,3 @@
|
||||
ipmitool (1.8.7-2) unstable; urgency=low
|
||||
|
||||
* Fix typo in init.d/ipmievd. (Closes: #361309)
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Sat, 8 Apr 2006 06:44:31 +0200
|
||||
|
||||
ipmitool (1.8.7-1) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
- Dropped nuclear clause from the copyright. Updated debian/copyright
|
||||
to reflect this.
|
||||
- ipmievd now store pid in /var/run/ipmievd.pid. Adjust init.d
|
||||
script to use it.
|
||||
* Rename /etc/default/ipmievd variable IPMIEVD_OPTS is renamed to
|
||||
IPMIEVD_OPTIONS to stay compatible with upstream and other
|
||||
distributions. Add backwards compatibility code with a warning to
|
||||
the users of the old variable.
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Sun, 26 Mar 2006 21:11:08 +0200
|
||||
|
||||
ipmitool (1.8.6-2) unstable; urgency=low
|
||||
|
||||
* Add ia64 as an supported arch. (Closes: #355930)
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Fri, 10 Mar 2006 23:34:50 +0100
|
||||
|
||||
ipmitool (1.8.6-1) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
- Avoid crashing when setting lan IP address. (Closes: #351205)
|
||||
* Avoid changing history by reverding upstream change
|
||||
to email addresses in debian/changelog.
|
||||
* Correct typo in control file: Suggest -> Suggests. Thanks
|
||||
to Philipp Matthias Hahn for the report.
|
||||
* Add init.d/ipmievd script. Based on script from Elmar Hoffmann,
|
||||
slightly modified to use lsb-base functions. Added dependency on
|
||||
lsb-base. (Closes: #345994)
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Sun, 26 Feb 2006 10:31:14 +0100
|
||||
|
||||
ipmitool (1.8.2-2) unstable; urgency=low
|
||||
|
||||
* Add build-dependency on 'libreadline5-dev | libreadline-dev' to make
|
||||
sure all archs get readline support. (Closes: #326341)
|
||||
* Add build-dependency on libssl-dev to enable SSL support on
|
||||
all archs.
|
||||
* Updated Standards-Version to 3.6.2.1. (No updates required)
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Sat, 3 Sep 2005 19:18:51 +0200
|
||||
|
||||
ipmitool (1.8.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
|
@ -3,13 +3,13 @@ Section: utils
|
||||
Priority: optional
|
||||
Maintainer: Petter Reinholdtsen <pere@debian.org>
|
||||
Uploaders: Duncan Laurie <duncan@iceblink.org>
|
||||
Build-Depends: debhelper (>> 4.0.0), libreadline5-dev | libreadline-dev, libssl-dev
|
||||
Standards-Version: 3.6.2.1
|
||||
Build-Depends: debhelper (>> 4.0.0),
|
||||
Standards-Version: 3.6.1
|
||||
|
||||
Package: ipmitool
|
||||
Architecture: i386 amd64 ia64
|
||||
Depends: ${shlibs:Depends}, lsb-base
|
||||
Suggests: openipmi
|
||||
Architecture: i386 amd64
|
||||
Depends: ${shlibs:Depends}
|
||||
Suggest: openipmi
|
||||
Description: utility for IPMI control with kernel driver or LAN interface
|
||||
A utility for managing and configuring devices that support the
|
||||
Intelligent Platform Management Interface. IPMI is an open standard
|
||||
|
@ -34,3 +34,7 @@ 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.
|
||||
|
||||
You acknowledge that this software is not designed or intended for use
|
||||
in the design, construction, operation or maintenance of any nuclear
|
||||
facility.
|
||||
|
@ -1,99 +0,0 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ipmievd
|
||||
# Required-Start: $local_fs $remote_fs $syslog
|
||||
# Required-Stop: $local_fs $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: S 0 1 6
|
||||
# Short-Description: IPMI event daemon
|
||||
# Description: ipmievd is a daemon which will listen for events
|
||||
# from the BMC that are being sent to the SEL and
|
||||
# also log those messages to syslog.
|
||||
### END INIT INFO
|
||||
#
|
||||
# Author: Elmar Hoffmann <elho@elho.net>
|
||||
# Licence: This script is public domain using the same
|
||||
# licence as ipmitool itself.
|
||||
# Modified by: Petter Reinholdtsen
|
||||
|
||||
set -e
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DESC="IPMI event daemon"
|
||||
NAME=ipmievd
|
||||
DAEMON=/usr/sbin/$NAME
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Gracefully exit if the package has been removed.
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
. /etc/default/rcS
|
||||
|
||||
# Options used by ipmievd.
|
||||
#
|
||||
# "open" uses the asynchronous event notification from the OpenIPMI
|
||||
# kernel driver, "sel" uses active polling of the contents of the SEL
|
||||
# for new events.
|
||||
#
|
||||
# Need to force 'daemon' mode, to make sure messages are sent to
|
||||
# syslog and the program forks into the background.
|
||||
#
|
||||
# Se ipmievd(8) for more info.
|
||||
IPMIEVD_OPTIONS="open daemon"
|
||||
|
||||
# Read config file if it is present.
|
||||
[ -f /etc/default/$NAME ] && . /etc/default/$NAME
|
||||
|
||||
# Backwards compatibility with version 1.8.6-2 and 1.8.6-1. The
|
||||
# variable was renamed to be compatible with upstream, SuSe and RedHat.
|
||||
if [ -n "$IPMIEVD_OPTS" ]; then
|
||||
echo "warning: /etc/default/$NAME variable IPMIEVD_OPTS should be renamed to IPMIEVD_OPTIONS"
|
||||
IPMIEVD_OPTIONS="$IPMIEVD_OPTS"
|
||||
fi
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service.
|
||||
#
|
||||
d_start() {
|
||||
start-stop-daemon --start --quiet --exec $DAEMON -- $IPMIEVD_OPTIONS
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service.
|
||||
#
|
||||
d_stop() {
|
||||
start-stop-daemon --stop --quiet --name $NAME --exec $DAEMON
|
||||
}
|
||||
|
||||
CODE=0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_begin_msg "Starting $DESC" "$NAME"
|
||||
d_start || CODE=$?
|
||||
[ "$VERBOSE" != no ] && log_end_msg $CODE
|
||||
exit $CODE
|
||||
;;
|
||||
stop)
|
||||
log_begin_msg "Stopping $DESC" "$NAME"
|
||||
d_stop || CODE=$?
|
||||
log_end_msg $CODE
|
||||
exit $CODE
|
||||
;;
|
||||
restart|force-reload)
|
||||
log_begin_msg "Restarting $DESC" "$NAME"
|
||||
d_stop || true
|
||||
sleep 1
|
||||
d_start || CODE=$?
|
||||
log_end_msg $CODE
|
||||
exit $CODE
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -91,7 +91,6 @@ binary-common:
|
||||
dh_testroot
|
||||
dh_installdocs
|
||||
dh_installchangelogs
|
||||
dh_installinit --name ipmievd
|
||||
dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
|
@ -27,6 +27,10 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
|
@ -13,7 +13,6 @@ ipmievd [\fB\-c\fR|\fB\-h\fR|\fB\-v\fR|\fB\-V\fR]
|
||||
[\fB\-L\fR <\fIprivlvl\fP>]
|
||||
[\fB\-a\fR|\fB\-E\fR|\fB\-P\fR|\fB\-f\fR <\fIpassword\fP>]
|
||||
[\fB\-o\fR <\fIoemtype\fP>]
|
||||
[\fB\-O\fR <\fIsel oem\fP>]
|
||||
\fIsel\fP [<\fIoption\fP>]
|
||||
|
||||
ipmievd [\fB\-c\fR|\fB\-h\fR|\fB\-v\fR|\fB\-V\fR]
|
||||
@ -23,7 +22,6 @@ ipmievd [\fB\-c\fR|\fB\-h\fR|\fB\-v\fR|\fB\-V\fR]
|
||||
[\fB\-L\fR <\fIprivlvl\fP>]
|
||||
[\fB\-a\fR|\fB\-E\fR|\fB\-P\fR|\fB\-f\fR <\fIpassword\fP>]
|
||||
[\fB\-o\fR <\fIoemtype\fP>]
|
||||
[\fB\-O\fR <\fIsel oem\fP>]
|
||||
[\fB\-C\fR <\fIciphersuite\fP>]
|
||||
\fIsel\fR [<\fIoption\fP>]
|
||||
.SH "DESCRIPTION"
|
||||
@ -46,7 +44,7 @@ Prompt for the remote server password.
|
||||
.TP
|
||||
\fB\-A\fR <\fIauthtype\fP>
|
||||
Specify an authentication type to use during IPMIv1.5 \fIlan\fP
|
||||
session activation. Supported types are NONE, PASSWORD, MD2, MD5, or OEM.
|
||||
session activation. Supported types are NONE, PASSWORD, MD5, or OEM.
|
||||
.TP
|
||||
\fB\-c\fR
|
||||
Present output in CSV (comma separated variable) format.
|
||||
@ -92,10 +90,6 @@ in place in the code to work around quirks in various BMCs from
|
||||
various manufacturers. Use \fI\-o list\fP to see a list of
|
||||
current supported OEM types.
|
||||
.TP
|
||||
\fB\-O\fR <\fIsel oem\fP>
|
||||
Open selected file and read OEM SEL event descriptions to be used
|
||||
during SEL listings. See examples in contrib dir for file format.
|
||||
.TP
|
||||
\fB\-p\fR <\fIport\fP>
|
||||
Remote server UDP port to connect to. Default is 623.
|
||||
.TP
|
||||
@ -164,10 +158,6 @@ All messages will be sent to syslog. This is the default action.
|
||||
.TP
|
||||
\fInodaemon\fP
|
||||
Do NOT become a daemon, instead log all messages to stderr.
|
||||
.TP
|
||||
\fIpidfile\fP=<\fBfilename\fR>
|
||||
Save process ID to this file when in daemon mode. Defaults to
|
||||
/var/run/ipmievd.pid.
|
||||
.RE
|
||||
|
||||
.TP
|
||||
@ -186,10 +176,6 @@ All messages will be sent to syslog. This is the default action.
|
||||
.TP
|
||||
\fInodaemon\fP
|
||||
Do NOT become a daemon, instead log all messages to stderr.
|
||||
.TP
|
||||
\fIpidfile\fP=<\fBfilename\fR>
|
||||
Save process ID to this file when in daemon mode. Defaults to
|
||||
/var/run/ipmievd.pid.
|
||||
.TP
|
||||
\fItimeout\fP=<\fBseconds\fR>
|
||||
Time between checks for SEL polling method. Default is 10 seconds.
|
||||
|
@ -13,7 +13,6 @@ ipmitool [\fB\-c\fR|\fB\-h\fR|\fB\-v\fR|\fB\-V\fR]
|
||||
[\fB\-L\fR <\fIprivlvl\fP>]
|
||||
[\fB\-a\fR|\fB\-E\fR|\fB\-P\fR|\fB\-f\fR <\fIpassword\fP>]
|
||||
[\fB\-o\fR <\fIoemtype\fP>]
|
||||
[\fB\-O\fR <\fIsel oem\fP>]
|
||||
[\fB\-e\fR <\fIesc_char\fP>]
|
||||
<\fIcommand\fP>
|
||||
|
||||
@ -24,7 +23,6 @@ ipmitool [\fB\-c\fR|\fB\-h\fR|\fB\-v\fR|\fB\-V\fR]
|
||||
[\fB\-L\fR <\fIprivlvl\fP>]
|
||||
[\fB\-a\fR|\fB\-E\fR|\fB\-P\fR|\fB\-f\fR <\fIpassword\fP>]
|
||||
[\fB\-o\fR <\fIoemtype\fP>]
|
||||
[\fB\-O\fR <\fIsel oem\fP>]
|
||||
[\fB\-C\fR <\fIciphersuite\fP>]
|
||||
[\fB\-k\fR <\fIkg_key\fP>]
|
||||
[\fB\-e\fR <\fIesc_char\fP>]
|
||||
@ -51,7 +49,7 @@ Prompt for the remote server password.
|
||||
.TP
|
||||
\fB\-A\fR <\fIauthtype\fP>
|
||||
Specify an authentication type to use during IPMIv1.5 \fIlan\fP
|
||||
session activation. Supported types are NONE, PASSWORD, MD2, MD5, or OEM.
|
||||
session activation. Supported types are NONE, PASSWORD, MD5, or OEM.
|
||||
.TP
|
||||
\fB\-c\fR
|
||||
Present output in CSV (comma separated variable) format.
|
||||
@ -105,10 +103,6 @@ in place in the code to work around quirks in various BMCs from
|
||||
various manufacturers. Use \fI\-o list\fP to see a list of
|
||||
current supported OEM types.
|
||||
.TP
|
||||
\fB\-O\fR <\fIsel oem\fP>
|
||||
Open selected file and read OEM SEL event descriptions to be used
|
||||
during SEL listings. See examples in contrib dir for file format.
|
||||
.TP
|
||||
\fB\-p\fR <\fIport\fP>
|
||||
Remote server UDP port to connect to. Default is 623.
|
||||
.TP
|
||||
@ -756,20 +750,6 @@ Set BMC generated gratuitous ARPs.
|
||||
|
||||
Set BMC generated gratuitous ARP interval.
|
||||
.TP
|
||||
\fIvlan id\fP <\fBoff\fR|\fBid\fR>
|
||||
.br
|
||||
|
||||
Disable VLAN operation or enable VLAN and set the ID.
|
||||
.br
|
||||
ID: value of the virtual lan identifier between 1 and 4094 inclusive.
|
||||
.TP
|
||||
\fIvlan priority\fP <\fBpriority\fR>
|
||||
.br
|
||||
|
||||
Set the priority associated with VLAN frames.
|
||||
.br
|
||||
ID: priority of the virtual lan frames between 0 and 7 inclusive.
|
||||
.TP
|
||||
\fIauth\fP <\fBlevel\fR,\fB...\fR> <\fBtype\fR,\fB...\fR>
|
||||
.br
|
||||
|
||||
|
@ -27,6 +27,10 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
|
@ -27,6 +27,10 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
@ -36,6 +40,5 @@ noinst_HEADERS = log.h bswap.h helper.h ipmi.h ipmi_intf.h \
|
||||
ipmi_channel.h ipmi_sensor.h ipmi_event.h ipmi_session.h \
|
||||
ipmi_strings.h ipmi_constants.h ipmi_user.h ipmi_pef.h \
|
||||
ipmi_oem.h ipmi_isol.h ipmi_sunoem.h ipmi_picmg.h \
|
||||
ipmi_fwum.h ipmi_main.h ipmi_tsol.h ipmi_firewall.h \
|
||||
ipmi_kontronoem.h
|
||||
ipmi_fwum.h ipmi_main.h ipmi_tsol.h
|
||||
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_BSWAP_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_HELPER_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_CHANNEL_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_CHASSIS_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_CONSTANTS_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_ENTITY_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_EVENT_H
|
||||
|
@ -1,106 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_FIREWALL_H
|
||||
#define IPMI_FIREWALL_H
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
int ipmi_firewall_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#define BMC_GET_NETFN_SUPPORT 0x09
|
||||
#define BMC_GET_COMMAND_SUPPORT 0x0A
|
||||
#define BMC_GET_COMMAND_SUBFUNCTION_SUPPORT 0x0B
|
||||
#define BMC_GET_CONFIGURABLE_COMMANDS 0x0C
|
||||
#define BMC_GET_CONFIGURABLE_COMMAND_SUBFUNCTIONS 0x0D
|
||||
#define BMC_SET_COMMAND_ENABLES 0x60
|
||||
#define BMC_GET_COMMAND_ENABLES 0x61
|
||||
#define BMC_SET_COMMAND_SUBFUNCTION_ENABLES 0x62
|
||||
#define BMC_GET_COMMAND_SUBFUNCTION_ENABLES 0x63
|
||||
#define BMC_OEM_NETFN_IANA_SUPPORT 0x64
|
||||
|
||||
#define SET_COMMAND_ENABLE_BYTE (BMC_SET_COMMAND_ENABLES / 8)
|
||||
#define SET_COMMAND_ENABLE_BIT (BMC_SET_COMMAND_ENABLES % 8)
|
||||
|
||||
#define MAX_LUN 4
|
||||
#define MAX_NETFN 64
|
||||
#define MAX_NETFN_PAIR (MAX_NETFN/2)
|
||||
#define MAX_COMMAND 256
|
||||
#define MAX_SUBFN 32
|
||||
#define MAX_COMMAND_BYTES (MAX_COMMAND>>3)
|
||||
#define MAX_SUBFN_BYTES (MAX_SUBFN>>3)
|
||||
|
||||
// support is a bitfield with the following bits set...
|
||||
#define BIT_AVAILABLE 0x01
|
||||
#define BIT_CONFIGURABLE 0x02
|
||||
#define BIT_ENABLED 0x04
|
||||
|
||||
extern int verbose;
|
||||
|
||||
struct command_support {
|
||||
unsigned char support;
|
||||
unsigned char version[3];
|
||||
unsigned char subfn_support[MAX_SUBFN_BYTES];
|
||||
unsigned char subfn_config[MAX_SUBFN_BYTES];
|
||||
unsigned char subfn_enable[MAX_SUBFN_BYTES];
|
||||
};
|
||||
struct lun_netfn_support {
|
||||
unsigned char support;
|
||||
struct command_support command[MAX_COMMAND];
|
||||
unsigned char command_mask[MAX_COMMAND_BYTES];
|
||||
unsigned char config_mask[MAX_COMMAND_BYTES];
|
||||
unsigned char enable_mask[MAX_COMMAND_BYTES];
|
||||
};
|
||||
struct lun_support {
|
||||
unsigned char support;
|
||||
struct lun_netfn_support netfn[MAX_NETFN_PAIR];
|
||||
};
|
||||
struct bmc_fn_support {
|
||||
struct lun_support lun[MAX_LUN];
|
||||
};
|
||||
struct ipmi_function_params {
|
||||
int channel;
|
||||
int lun;
|
||||
int netfn;
|
||||
int command;
|
||||
int subfn;
|
||||
unsigned char force;
|
||||
};
|
||||
|
||||
static inline int bit_test(const unsigned char * bf, int n) {
|
||||
return !!(bf[n>>3]&(1<<(n%8)));
|
||||
}
|
||||
static inline void bit_set(unsigned char * bf, int n, int v) {
|
||||
bf[n>>3] = (bf[n>>3] & ~(1<<(n%8))) | ((v?1:0)<<(n%8));
|
||||
}
|
||||
|
||||
#endif /*IPMI_FIREWALL_H */
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_FRU_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_KFWUM_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_INTF_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_ISOL_H
|
||||
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Kontron Canada, Inc. All Rights Reserved.
|
||||
*
|
||||
* Base on code from
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_KONTRONOEM_H
|
||||
#define IPMI_KONTRONOEM_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
|
||||
int ipmi_kontronoem_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_KONTRONOEM_H */
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_LANP_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_MAIN_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_MC_H
|
||||
|
@ -26,6 +26,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_OEM_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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 DELL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_PEF_H
|
||||
|
@ -1,75 +1,75 @@
|
||||
|
||||
/*
|
||||
(C) Kontron
|
||||
*/
|
||||
|
||||
#ifndef _IPMI_PICMG_H_
|
||||
#define _IPMI_PICMG_H_
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
/* PICMG commands */
|
||||
#define PICMG_GET_PICMG_PROPERTIES_CMD 0x00
|
||||
#define PICMG_GET_ADDRESS_INFO_CMD 0x01
|
||||
#define PICMG_GET_SHELF_ADDRESS_INFO_CMD 0x02
|
||||
#define PICMG_SET_SHELF_ADDRESS_INFO_CMD 0x03
|
||||
#define PICMG_FRU_CONTROL_CMD 0x04
|
||||
#define PICMG_GET_FRU_LED_PROPERTIES_CMD 0x05
|
||||
#define PICMG_GET_LED_COLOR_CAPABILITIES_CMD 0x06
|
||||
#define PICMG_SET_FRU_LED_STATE_CMD 0x07
|
||||
#define PICMG_GET_FRU_LED_STATE_CMD 0x08
|
||||
#define PICMG_SET_IPMB_CMD 0x09
|
||||
#define PICMG_SET_FRU_POLICY_CMD 0x0A
|
||||
#define PICMG_GET_FRU_POLICY_CMD 0x0B
|
||||
#define PICMG_FRU_ACTIVATION_CMD 0x0C
|
||||
#define PICMG_GET_DEVICE_LOCATOR_RECORD_CMD 0x0D
|
||||
#define PICMG_SET_PORT_STATE_CMD 0x0E
|
||||
#define PICMG_GET_PORT_STATE_CMD 0x0F
|
||||
#define PICMG_COMPUTE_POWER_PROPERTIES_CMD 0x10
|
||||
#define PICMG_SET_POWER_LEVEL_CMD 0x11
|
||||
#define PICMG_GET_POWER_LEVEL_CMD 0x12
|
||||
#define PICMG_RENEGOTIATE_POWER_CMD 0x13
|
||||
#define PICMG_GET_FAN_SPEED_PROPERTIES_CMD 0x14
|
||||
#define PICMG_SET_FAN_LEVEL_CMD 0x15
|
||||
#define PICMG_GET_FAN_LEVEL_CMD 0x16
|
||||
#define PICMG_BUSED_RESOURCE_CMD 0x17
|
||||
|
||||
/* Site Types */
|
||||
#define PICMG_ATCA_BOARD 0x00
|
||||
#define PICMG_POWER_ENTRY 0x01
|
||||
#define PICMG_SHELF_FRU 0x02
|
||||
#define PICMG_DEDICATED_SHMC 0x03
|
||||
#define PICMG_FAN_TRAY 0x04
|
||||
#define PICMG_FAN_FILTER_TRAY 0x05
|
||||
#define PICMG_ALARM 0x06
|
||||
#define PICMG_AMC 0x07
|
||||
#define PICMG_PMC 0x08
|
||||
#define PICMG_RTM 0x09
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
(C) Kontron
|
||||
*/
|
||||
|
||||
#ifndef _IPMI_PICMG_H_
|
||||
#define _IPMI_PICMG_H_
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
/* PICMG commands */
|
||||
#define PICMG_GET_PICMG_PROPERTIES_CMD 0x00
|
||||
#define PICMG_GET_ADDRESS_INFO_CMD 0x01
|
||||
#define PICMG_GET_SHELF_ADDRESS_INFO_CMD 0x02
|
||||
#define PICMG_SET_SHELF_ADDRESS_INFO_CMD 0x03
|
||||
#define PICMG_FRU_CONTROL_CMD 0x04
|
||||
#define PICMG_GET_FRU_LED_PROPERTIES_CMD 0x05
|
||||
#define PICMG_GET_LED_COLOR_CAPABILITIES_CMD 0x06
|
||||
#define PICMG_SET_FRU_LED_STATE_CMD 0x07
|
||||
#define PICMG_GET_FRU_LED_STATE_CMD 0x08
|
||||
#define PICMG_SET_IPMB_CMD 0x09
|
||||
#define PICMG_SET_FRU_POLICY_CMD 0x0A
|
||||
#define PICMG_GET_FRU_POLICY_CMD 0x0B
|
||||
#define PICMG_FRU_ACTIVATION_CMD 0x0C
|
||||
#define PICMG_GET_DEVICE_LOCATOR_RECORD_CMD 0x0D
|
||||
#define PICMG_SET_PORT_STATE_CMD 0x0E
|
||||
#define PICMG_GET_PORT_STATE_CMD 0x0F
|
||||
#define PICMG_COMPUTE_POWER_PROPERTIES_CMD 0x10
|
||||
#define PICMG_SET_POWER_LEVEL_CMD 0x11
|
||||
#define PICMG_GET_POWER_LEVEL_CMD 0x12
|
||||
#define PICMG_RENEGOTIATE_POWER_CMD 0x13
|
||||
#define PICMG_GET_FAN_SPEED_PROPERTIES_CMD 0x14
|
||||
#define PICMG_SET_FAN_LEVEL_CMD 0x15
|
||||
#define PICMG_GET_FAN_LEVEL_CMD 0x16
|
||||
#define PICMG_BUSED_RESOURCE_CMD 0x17
|
||||
|
||||
/* Site Types */
|
||||
#define PICMG_ATCA_BOARD 0x00
|
||||
#define PICMG_POWER_ENTRY 0x01
|
||||
#define PICMG_SHELF_FRU 0x02
|
||||
#define PICMG_DEDICATED_SHMC 0x03
|
||||
#define PICMG_FAN_TRAY 0x04
|
||||
#define PICMG_FAN_FILTER_TRAY 0x05
|
||||
#define PICMG_ALARM 0x06
|
||||
#define PICMG_AMC 0x07
|
||||
#define PICMG_PMC 0x08
|
||||
#define PICMG_RTM 0x09
|
||||
|
||||
|
||||
|
||||
struct picmg_set_fru_activation_cmd {
|
||||
unsigned char picmg_id; /* always 0*/
|
||||
unsigned char fru_id; /* threshold setting mask */
|
||||
unsigned char fru_id; /* threshold setting mask */
|
||||
unsigned char fru_state; /* fru activation/deactivation */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* the LED color capabilities */
|
||||
static const char* led_color_str[] __attribute__((unused)) = {
|
||||
"reserved",
|
||||
static unsigned char* led_color_str[] = {
|
||||
"reserved",
|
||||
"BLUE",
|
||||
"RED",
|
||||
"GREEN",
|
||||
"AMBER",
|
||||
"ORANGE",
|
||||
"WHITE",
|
||||
"AMBER",
|
||||
"ORANGE",
|
||||
"WHITE",
|
||||
"reserved"
|
||||
};
|
||||
|
||||
|
||||
|
||||
int ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv);
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
int ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv);
|
||||
|
||||
#endif
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_RAW_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_SDR_H
|
||||
@ -722,10 +726,7 @@ struct ipmi_sdr_iterator {
|
||||
|
||||
struct sdr_record_list {
|
||||
uint16_t id;
|
||||
uint8_t version;
|
||||
uint8_t type;
|
||||
uint8_t length;
|
||||
uint8_t *raw;
|
||||
struct sdr_record_list *next;
|
||||
union {
|
||||
struct sdr_record_full_sensor *full;
|
||||
@ -803,8 +804,7 @@ struct ipmi_rs *ipmi_sdr_get_sensor_reading(struct ipmi_intf *intf,
|
||||
uint8_t sensor);
|
||||
struct ipmi_rs *ipmi_sdr_get_sensor_reading_ipmb(struct ipmi_intf *intf,
|
||||
uint8_t sensor,
|
||||
uint8_t target,
|
||||
uint8_t lun);
|
||||
uint8_t target);
|
||||
struct ipmi_rs *ipmi_sdr_get_sensor_thresholds(struct ipmi_intf *intf,
|
||||
uint8_t sensor);
|
||||
struct ipmi_rs *ipmi_sdr_get_sensor_hysteresis(struct ipmi_intf *intf,
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_SEL_H
|
||||
@ -516,7 +520,7 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
|
||||
{ 0xF2, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Module Hot Swap", "Module Handle Opened" },
|
||||
{ 0xF2, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Module Hot Swap", "Quiesced" },
|
||||
|
||||
{ 0xC0, 0x00, 0xff, 0x00, "OEM", "OEM Specific" },
|
||||
{ 0xC0, 0x00, 0xff, 0x00, "OEM", NULL },
|
||||
|
||||
{ 0x00, 0x00, 0x00, 0x00, NULL, NULL },
|
||||
};
|
||||
@ -545,6 +549,5 @@ uint16_t ipmi_sel_get_std_entry(struct ipmi_intf * intf, uint16_t id, struct sel
|
||||
char * get_newisys_evt_desc(struct ipmi_intf * intf, struct sel_event_record * rec);
|
||||
IPMI_OEM ipmi_get_oem(struct ipmi_intf * intf);
|
||||
char * ipmi_get_oem_desc(struct ipmi_intf * intf, struct sel_event_record * rec);
|
||||
int ipmi_sel_oem_init(const char * filename);
|
||||
|
||||
#endif /* IPMI_SEL_H */
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_SENSOR_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_SESSION_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_SOL_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_STRINGS_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_SUNOEM_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_TSOL_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_USER_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMITOOL_LOG_H
|
||||
|
@ -27,6 +27,10 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
@ -37,7 +41,7 @@ libipmitool_la_SOURCES = helper.c ipmi_sdr.c ipmi_sel.c ipmi_sol.c ipmi_pef.c \
|
||||
dimm_spd.c ipmi_sensor.c ipmi_channel.c ipmi_event.c \
|
||||
ipmi_session.c ipmi_strings.c ipmi_user.c ipmi_raw.c \
|
||||
ipmi_oem.c ipmi_isol.c ipmi_sunoem.c ipmi_fwum.c ipmi_picmg.c \
|
||||
ipmi_main.c ipmi_tsol.c ipmi_firewall.c ipmi_kontronoem.c
|
||||
ipmi_main.c ipmi_tsol.c
|
||||
|
||||
libipmitool_la_LDFLAGS = -export-dynamic
|
||||
libipmitool_la_LIBADD = -lm
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -49,9 +53,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PATHS_H
|
||||
# include <paths.h>
|
||||
#else
|
||||
# define _PATH_VARRUN "/var/run/"
|
||||
# include <paths.h> /* For _PATH_TTY */
|
||||
#endif
|
||||
|
||||
#include <ipmitool/helper.h>
|
||||
@ -150,7 +152,7 @@ print_valstr(const struct valstr * vs, const char * title, int loglevel)
|
||||
|
||||
if (title != NULL) {
|
||||
if (loglevel < 0)
|
||||
printf("\n%s:\n\n", title);
|
||||
printf("\n%s:\n\n");
|
||||
else
|
||||
lprintf(loglevel, "\n%s:\n", title);
|
||||
}
|
||||
@ -199,7 +201,7 @@ print_valstr_2col(const struct valstr * vs, const char * title, int loglevel)
|
||||
|
||||
if (title != NULL) {
|
||||
if (loglevel < 0)
|
||||
printf("\n%s:\n\n", title);
|
||||
printf("\n%s:\n\n");
|
||||
else
|
||||
lprintf(loglevel, "\n%s:\n", title);
|
||||
}
|
||||
@ -277,18 +279,6 @@ ipmi_open_file(const char * file, int rw)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef ENABLE_FILE_SECURITY
|
||||
if (!rw) {
|
||||
/* on read skip the extra checks */
|
||||
fp = fopen(file, "r");
|
||||
if (fp == NULL) {
|
||||
lperror(LOG_ERR, "Unable to open file %s", file);
|
||||
return NULL;
|
||||
}
|
||||
return fp;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* it exists - only regular files, not links */
|
||||
if (S_ISREG(st1.st_mode) == 0) {
|
||||
lprintf(LOG_ERR, "File %s has invalid mode: %d",
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -222,16 +226,16 @@ ipmi_get_channel_info(struct ipmi_intf * intf, uint8_t channel)
|
||||
|
||||
printf(" Session Support : ");
|
||||
switch (channel_info.session_support) {
|
||||
case 0x0:
|
||||
case 0x00:
|
||||
printf("session-less\n");
|
||||
break;
|
||||
case 0x1:
|
||||
case 0x40:
|
||||
printf("single-session\n");
|
||||
break;
|
||||
case 0x2:
|
||||
case 0x80:
|
||||
printf("multi-session\n");
|
||||
break;
|
||||
case 0x3:
|
||||
case 0xc0:
|
||||
default:
|
||||
printf("session-based\n");
|
||||
break;
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -497,8 +501,6 @@ ipmi_chassis_get_bootparam(struct ipmi_intf * intf, char * arg)
|
||||
printf("Boot parameter %d is %s\n", rsp->data[1] & 0x7f,
|
||||
(rsp->data[1] & 0x80) ? "invalid/locked" : "valid/unlocked");
|
||||
printf("Boot parameter data: %s\n", buf2str(rsp->data+2, rsp->data_len - 2));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -53,7 +57,7 @@
|
||||
#include <ipmitool/ipmi_sdr.h>
|
||||
|
||||
|
||||
static void
|
||||
static int
|
||||
ipmi_event_msg_print(struct ipmi_intf * intf, struct platform_event_msg * pmsg)
|
||||
{
|
||||
struct sel_event_record sel_event;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
@ -88,7 +92,7 @@ static void ipmi_fru_picmg_ext_print(unsigned char * fru_data, int off, int leng
|
||||
*
|
||||
* returns pointer to FRU area string
|
||||
*/
|
||||
char *
|
||||
static char *
|
||||
get_fru_area_str(uint8_t * data, uint32_t * offset)
|
||||
{
|
||||
static const char bcd_plus[] = "0123456789 -.:,_";
|
||||
@ -198,7 +202,7 @@ get_fru_area_str(uint8_t * data, uint32_t * offset)
|
||||
* returns 0 on success
|
||||
* returns -1 on error
|
||||
*/
|
||||
int
|
||||
static int
|
||||
write_fru_area(struct ipmi_intf * intf, struct fru_info *fru, unsigned char id,
|
||||
unsigned int soffset, unsigned int doffset,
|
||||
unsigned int length, unsigned char *pFrubuf)
|
||||
@ -282,7 +286,7 @@ write_fru_area(struct ipmi_intf * intf, struct fru_info *fru, unsigned char id,
|
||||
* returns -1 on error
|
||||
* returns 0 if successful
|
||||
*/
|
||||
int
|
||||
static int
|
||||
read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id,
|
||||
uint32_t offset, uint32_t length, uint8_t *frubuf)
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -1,587 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Kontron Canada, Inc. All Rights Reserved.
|
||||
*
|
||||
* Base on code from
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Tue Mar 7 14:36:12 2006
|
||||
* <stephane.filion@ca.kontron.com>
|
||||
*
|
||||
* This code implements an Kontron OEM proprietary commands.
|
||||
*/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_intf.h>
|
||||
#include <ipmitool/ipmi_fru.h>
|
||||
|
||||
|
||||
extern int verbose;
|
||||
extern int read_fru_area(struct ipmi_intf * intf, struct fru_info *fru,
|
||||
uint8_t id, uint32_t offset, uint32_t length,
|
||||
uint8_t *frubuf);
|
||||
extern int write_fru_area(struct ipmi_intf * intf, struct fru_info *fru,
|
||||
unsigned char id, unsigned int soffset,
|
||||
unsigned int doffset, unsigned int length,
|
||||
unsigned char *pFrubuf);
|
||||
|
||||
extern char * get_fru_area_str(uint8_t * data, uint32_t * offset);
|
||||
|
||||
|
||||
|
||||
static void ipmi_kontron_help(void);
|
||||
static int ipmi_kontron_set_serial_number(struct ipmi_intf * intf);
|
||||
static int ipmi_kontron_set_mfg_date (struct ipmi_intf * intf);
|
||||
|
||||
|
||||
|
||||
int
|
||||
ipmi_kontronoem_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
if (argc == 0)
|
||||
ipmi_kontron_help();
|
||||
else if (strncmp(argv[0], "help", 4) == 0)
|
||||
ipmi_kontron_help();
|
||||
|
||||
else if(!strncmp(argv[0], "setsn", 5))
|
||||
{
|
||||
if(argc >= 1)
|
||||
{
|
||||
if(ipmi_kontron_set_serial_number(intf) > 0)
|
||||
{
|
||||
printf("FRU serial number setted successfully\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("FRU serial number set failed\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("fru setsn\n");
|
||||
}
|
||||
}
|
||||
else if(!strncmp(argv[0], "setmfgdate", 5))
|
||||
{
|
||||
if(argc >= 1)
|
||||
{
|
||||
if(ipmi_kontron_set_mfg_date(intf) > 0)
|
||||
{
|
||||
printf("FRU manufacturing date setted successfully\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("FRU manufacturing date set failed\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("fru setmfgdate\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
printf("Invalid Kontron command: %s", argv[0]);
|
||||
ipmi_kontron_help();
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
static void ipmi_kontron_help(void)
|
||||
{
|
||||
printf("Kontron Commands: setsn setmfgdate\n");
|
||||
}
|
||||
|
||||
/* ipmi_fru_set_serial_number - Set the Serial Number in FRU
|
||||
*
|
||||
* @intf: ipmi interface
|
||||
* @id: fru id
|
||||
*
|
||||
* returns -1 on error
|
||||
* returns 1 if successful
|
||||
*/
|
||||
static int
|
||||
ipmi_kontron_set_serial_number(struct ipmi_intf * intf)
|
||||
{
|
||||
struct ipmi_rs *rsp;
|
||||
struct ipmi_rq req;
|
||||
struct fru_info fru;
|
||||
struct fru_header header;
|
||||
uint8_t msg_data[4];
|
||||
char *sn;
|
||||
uint8_t sn_size, checksum,prev_lun;
|
||||
int ret = 0;
|
||||
uint8_t *fru_data, *fru_area;
|
||||
uint32_t fru_data_offset, fru_data_offset_tmp, board_sec_len, prod_sec_len, i;
|
||||
|
||||
sn = NULL;
|
||||
fru_data = NULL;
|
||||
|
||||
memset(msg_data, 0, 4);
|
||||
msg_data[0] = 0xb4;
|
||||
msg_data[1] = 0x90;
|
||||
msg_data[2] = 0x91;
|
||||
msg_data[3] = 0x8b;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = 0x3E;
|
||||
req.msg.cmd = 0x0C;
|
||||
req.msg.data = msg_data;
|
||||
req.msg.data_len = 4;
|
||||
|
||||
|
||||
/* Set Lun, necessary for this oem command */
|
||||
req.msg.lun = 0x03;
|
||||
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL)
|
||||
{
|
||||
printf(" Device not present (No Response)\n");
|
||||
return -11;
|
||||
}
|
||||
|
||||
if (rsp->ccode > 0)
|
||||
{
|
||||
printf(" This option is not implemented for this board\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
sn_size = rsp->data_len;
|
||||
|
||||
sn = malloc(sn_size + 1);
|
||||
|
||||
if(sn == NULL)
|
||||
{
|
||||
printf("Out of memory!");
|
||||
return;
|
||||
}
|
||||
|
||||
memset(sn, 0, sn_size + 1);
|
||||
memcpy(sn, rsp->data, sn_size);
|
||||
|
||||
if(verbose >= 1)
|
||||
{
|
||||
printf("Original serial number is : [%s]\n", sn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
memset(msg_data, 0, 4);
|
||||
msg_data[0] = 0;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_STORAGE;
|
||||
req.msg.cmd = GET_FRU_INFO;
|
||||
req.msg.data = msg_data;
|
||||
req.msg.data_len = 1;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
printf(" Device not present (No Response)\n");
|
||||
free(sn);
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
printf(" Device not present (%s)\n",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
free(sn);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
fru.size = (rsp->data[1] << 8) | rsp->data[0];
|
||||
fru.access = rsp->data[2] & 0x1;
|
||||
|
||||
if (fru.size < 1) {
|
||||
printf(" Invalid FRU size %d", fru.size);
|
||||
free(sn);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* retrieve the FRU header
|
||||
*/
|
||||
msg_data[0] = 0;
|
||||
msg_data[1] = 0;
|
||||
msg_data[2] = 0;
|
||||
msg_data[3] = 8;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_STORAGE;
|
||||
req.msg.cmd = GET_FRU_DATA;
|
||||
req.msg.data = msg_data;
|
||||
req.msg.data_len = 4;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL)
|
||||
{
|
||||
printf(" Device not present (No Response)\n");
|
||||
free(sn);
|
||||
return(-1);
|
||||
}
|
||||
if (rsp->ccode > 0)
|
||||
{
|
||||
printf(" Device not present (%s)\n",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
free(sn);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if (verbose > 1)
|
||||
printbuf(rsp->data, rsp->data_len, "FRU DATA");
|
||||
|
||||
memcpy(&header, rsp->data + 1, 8);
|
||||
|
||||
if (header.version != 1)
|
||||
{
|
||||
printf(" Unknown FRU header version 0x%02x",
|
||||
header.version);
|
||||
free(sn);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* Set the Board Section */
|
||||
board_sec_len = (header.offset.product * 8) - (header.offset.board * 8);
|
||||
|
||||
|
||||
fru_data = malloc( fru.size);
|
||||
|
||||
if(fru_data == NULL)
|
||||
{
|
||||
printf("Out of memory!");
|
||||
free(sn);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
memset(fru_data, 0, fru.size);
|
||||
if(read_fru_area(intf ,&fru ,0 ,(header.offset.board * 8) ,board_sec_len , fru_data) < 0)
|
||||
{
|
||||
free(sn);
|
||||
free(fru_data);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/*Position at Board Manufacturer*/
|
||||
fru_data_offset = (header.offset.board * 8) + 6;
|
||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset);
|
||||
|
||||
/*Position at Board Product Name*/
|
||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset);
|
||||
|
||||
fru_data_offset_tmp = fru_data_offset;
|
||||
|
||||
/*Position at Serial Number*/
|
||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset_tmp);
|
||||
|
||||
fru_data_offset ++;
|
||||
|
||||
if(strlen(fru_area) != sn_size)
|
||||
{
|
||||
printf("The length of the serial number in the FRU Board Area is wrong.\n");
|
||||
free(sn);
|
||||
free(fru_data);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* Copy the new serial number in the board section saved in memory*/
|
||||
memcpy(fru_data + fru_data_offset, sn, sn_size);
|
||||
|
||||
checksum = 0;
|
||||
/* Calculate Header Checksum */
|
||||
for( i = (header.offset.board * 8); i < (((header.offset.board * 8)+board_sec_len) - 2) ; i ++ )
|
||||
{
|
||||
checksum += fru_data[i];
|
||||
}
|
||||
checksum = (~checksum) + 1;
|
||||
|
||||
|
||||
fru_data[(header.offset.board * 8)+board_sec_len - 1] = checksum;
|
||||
|
||||
/* Write the new FRU Board section */
|
||||
if(write_fru_area(intf, &fru, 0, (header.offset.board * 8), (header.offset.board * 8), board_sec_len, fru_data) < 0)
|
||||
{
|
||||
free(sn);
|
||||
free(fru_data);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* Set the Product Section */
|
||||
prod_sec_len = (header.offset.multi * 8) - (header.offset.product * 8);
|
||||
|
||||
if(read_fru_area(intf ,&fru ,0 ,(header.offset.product * 8) ,prod_sec_len , fru_data) < 0)
|
||||
{
|
||||
free(sn);
|
||||
free(fru_data);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/*Position at Product Manufacturer*/
|
||||
fru_data_offset = (header.offset.product * 8) + 3;
|
||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset);
|
||||
|
||||
/*Position at Product Name*/
|
||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset);
|
||||
|
||||
/*Position at Product Part*/
|
||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset);
|
||||
|
||||
/*Position at Product Version*/
|
||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset);
|
||||
|
||||
|
||||
|
||||
fru_data_offset_tmp = fru_data_offset;
|
||||
|
||||
/*Position at Serial Number*/
|
||||
fru_area = get_fru_area_str(fru_data, &fru_data_offset_tmp);
|
||||
|
||||
fru_data_offset ++;
|
||||
|
||||
if(strlen(fru_area) != sn_size)
|
||||
{
|
||||
free(sn);
|
||||
free(fru_data);
|
||||
printf("The length of the serial number in the FRU Product Area is wrong.\n");
|
||||
return(-1);
|
||||
|
||||
}
|
||||
|
||||
/* Copy the new serial number in the product section saved in memory*/
|
||||
memcpy(fru_data + fru_data_offset, sn, sn_size);
|
||||
|
||||
checksum = 0;
|
||||
/* Calculate Header Checksum */
|
||||
for( i = (header.offset.product * 8); i < (((header.offset.product * 8)+prod_sec_len) - 2) ; i ++ )
|
||||
{
|
||||
checksum += fru_data[i];
|
||||
}
|
||||
checksum = (~checksum) + 1;
|
||||
|
||||
|
||||
fru_data[(header.offset.product * 8)+prod_sec_len - 1] = checksum;
|
||||
|
||||
/* Write the new FRU Board section */
|
||||
if(write_fru_area(intf, &fru, 0, (header.offset.product * 8), (header.offset.product * 8), prod_sec_len, fru_data) < 0)
|
||||
{
|
||||
free(sn);
|
||||
free(fru_data);
|
||||
return -1;
|
||||
}
|
||||
|
||||
free(sn);
|
||||
free(fru_data);
|
||||
|
||||
return(1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* ipmi_fru_set_mfg_date - Set the Manufacturing Date in FRU
|
||||
*
|
||||
* @intf: ipmi interface
|
||||
* @id: fru id
|
||||
*
|
||||
* returns -1 on error
|
||||
* returns 1 if successful
|
||||
*/
|
||||
static int
|
||||
ipmi_kontron_set_mfg_date (struct ipmi_intf * intf)
|
||||
{
|
||||
struct ipmi_rs *rsp;
|
||||
struct ipmi_rq req;
|
||||
struct fru_info fru;
|
||||
struct fru_header header;
|
||||
uint8_t msg_data[4];
|
||||
uint8_t mfg_date[3];
|
||||
|
||||
uint32_t board_sec_len, i;
|
||||
uint8_t *fru_data, checksum;
|
||||
int ret = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
memset(msg_data, 0, 4);
|
||||
msg_data[0] = 0xb4;
|
||||
msg_data[1] = 0x90;
|
||||
msg_data[2] = 0x91;
|
||||
msg_data[3] = 0x8b;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = 0x3E;
|
||||
req.msg.cmd = 0x0E;
|
||||
req.msg.data = msg_data;
|
||||
req.msg.data_len = 4;
|
||||
|
||||
/* Set Lun temporary, necessary for this oem command */
|
||||
req.msg.lun = 0x03;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL)
|
||||
{
|
||||
printf("Device not present (No Response)\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if (rsp->ccode > 0)
|
||||
{
|
||||
printf("This option is not implemented for this board\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if(rsp->data_len != 3)
|
||||
{
|
||||
printf("Invalid response for the Manufacturing date\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
memset(mfg_date, 0, 3);
|
||||
memcpy(mfg_date, rsp->data, 3);
|
||||
|
||||
memset(msg_data, 0, 4);
|
||||
msg_data[0] = 0;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_STORAGE;
|
||||
req.msg.cmd = GET_FRU_INFO;
|
||||
req.msg.data = msg_data;
|
||||
req.msg.data_len = 1;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
printf(" Device not present (No Response)\n");
|
||||
return(-1);
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
printf(" Device not present (%s)\n",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return(-1);
|
||||
}
|
||||
|
||||
fru.size = (rsp->data[1] << 8) | rsp->data[0];
|
||||
fru.access = rsp->data[2] & 0x1;
|
||||
|
||||
if (fru.size < 1) {
|
||||
printf(" Invalid FRU size %d", fru.size);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* retrieve the FRU header
|
||||
*/
|
||||
msg_data[0] = 0;
|
||||
msg_data[1] = 0;
|
||||
msg_data[2] = 0;
|
||||
msg_data[3] = 8;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_STORAGE;
|
||||
req.msg.cmd = GET_FRU_DATA;
|
||||
req.msg.data = msg_data;
|
||||
req.msg.data_len = 4;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL)
|
||||
{
|
||||
printf(" Device not present (No Response)\n");
|
||||
return(-1);
|
||||
}
|
||||
if (rsp->ccode > 0)
|
||||
{
|
||||
printf(" Device not present (%s)\n",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if (verbose > 1)
|
||||
printbuf(rsp->data, rsp->data_len, "FRU DATA");
|
||||
|
||||
memcpy(&header, rsp->data + 1, 8);
|
||||
|
||||
if (header.version != 1)
|
||||
{
|
||||
printf(" Unknown FRU header version 0x%02x",
|
||||
header.version);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
board_sec_len = (header.offset.product * 8) - (header.offset.board * 8);
|
||||
|
||||
fru_data = malloc( fru.size);
|
||||
|
||||
if(fru_data == NULL)
|
||||
{
|
||||
lprintf("Out of memory!");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
memset(fru_data, 0, fru.size);
|
||||
if(read_fru_area(intf ,&fru ,0 ,(header.offset.board * 8) ,board_sec_len , fru_data) < 0)
|
||||
{
|
||||
free(fru_data);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/* Copy the new manufacturing date in the board section saved in memory*/
|
||||
memcpy(fru_data + (header.offset.board * 8) + 3, mfg_date, 3);
|
||||
|
||||
checksum = 0;
|
||||
/* Calculate Header Checksum */
|
||||
for( i = (header.offset.board * 8); i < (((header.offset.board * 8)+board_sec_len) - 2) ; i ++ )
|
||||
{
|
||||
checksum += fru_data[i];
|
||||
}
|
||||
checksum = (~checksum) + 1;
|
||||
|
||||
fru_data[(header.offset.board * 8)+board_sec_len - 1] = checksum;
|
||||
|
||||
/* Write the new FRU Board section */
|
||||
if(write_fru_area(intf, &fru, 0, (header.offset.board * 8), (header.offset.board * 8), board_sec_len, fru_data) < 0)
|
||||
{
|
||||
free(fru_data);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
free(fru_data);
|
||||
return(1);
|
||||
}
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -456,7 +460,7 @@ lan_set_arp_interval(struct ipmi_intf * intf,
|
||||
return -1;
|
||||
|
||||
if (ival != 0) {
|
||||
interval = ((uint8_t)atoi((const char *)ival) * 2) - 1;
|
||||
interval = ((uint8_t)atoi(ival) * 2) - 1;
|
||||
rc = set_lan_param(intf, chan, IPMI_LANP_GRAT_ARP, &interval, 1);
|
||||
} else {
|
||||
interval = lp->data[0];
|
||||
@ -733,26 +737,12 @@ ipmi_lan_print(struct ipmi_intf * intf, uint8_t chan)
|
||||
printf("%-24s: %02x:%02x:%02x:%02x:%02x:%02x\n", p->desc,
|
||||
p->data[0], p->data[1], p->data[2], p->data[3], p->data[4], p->data[5]);
|
||||
|
||||
p = get_lan_param(intf, chan, IPMI_LANP_VLAN_ID);
|
||||
if (p != NULL && p->data != NULL) {
|
||||
int id = ((p->data[1] & 0x0f) << 8) + p->data[0];
|
||||
if (p->data[1] & 0x80)
|
||||
printf("%-24s: %d\n", p->desc, id);
|
||||
else
|
||||
printf("%-24s: Disabled\n", p->desc);
|
||||
}
|
||||
|
||||
p = get_lan_param(intf, chan, IPMI_LANP_VLAN_PRIORITY);
|
||||
if (p != NULL && p->data != NULL)
|
||||
printf("%-24s: %d\n", p->desc, p->data[0] & 0x07);
|
||||
|
||||
/* Determine supported Cipher Suites -- Requires two calls */
|
||||
p = get_lan_param(intf, chan, IPMI_LANP_RMCP_CIPHER_SUPPORT);
|
||||
if (p == NULL)
|
||||
return -1;
|
||||
else if (p->data != NULL)
|
||||
{
|
||||
unsigned char cipher_suite_count = p->data[0];
|
||||
p = get_lan_param(intf, chan, IPMI_LANP_RMCP_CIPHERS);
|
||||
if (p == NULL)
|
||||
return -1;
|
||||
@ -761,8 +751,9 @@ ipmi_lan_print(struct ipmi_intf * intf, uint8_t chan)
|
||||
|
||||
/* Now we're dangerous. There are only 15 fixed cipher
|
||||
suite IDs, but the spec allows for 16 in the return data.*/
|
||||
if ((p->data != NULL) && (p->data_len <= 17))
|
||||
if ((p->data != NULL) && (p->data_len <= 16))
|
||||
{
|
||||
unsigned char cipher_suite_count = p->data[0];
|
||||
unsigned int i;
|
||||
for (i = 0; (i < 16) && (i < cipher_suite_count); ++i)
|
||||
{
|
||||
@ -778,6 +769,7 @@ ipmi_lan_print(struct ipmi_intf * intf, uint8_t chan)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* RMCP+ Messaging Cipher Suite Privilege Levels */
|
||||
/* These are the privilege levels for the 15 fixed cipher suites */
|
||||
p = get_lan_param(intf, chan, IPMI_LANP_RMCP_PRIV_LEVELS);
|
||||
@ -896,7 +888,7 @@ ipmi_lan_set_password(struct ipmi_intf * intf,
|
||||
data[1] = 0x02; /* set password */
|
||||
|
||||
if (password != NULL)
|
||||
memcpy(data+2, password, __min(strlen((const char *)password), 16));
|
||||
memcpy(data+2, password, __min(strlen(password), 16));
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_APP;
|
||||
@ -918,7 +910,7 @@ ipmi_lan_set_password(struct ipmi_intf * intf,
|
||||
/* adjust our session password
|
||||
* or we will no longer be able to communicate with BMC
|
||||
*/
|
||||
ipmi_intf_session_set_password(intf, (char *)password);
|
||||
ipmi_intf_session_set_password(intf, password);
|
||||
printf("Password %s for user %d\n",
|
||||
(password == NULL) ? "cleared" : "set", userid);
|
||||
|
||||
@ -1217,11 +1209,9 @@ static void ipmi_lan_set_usage(void)
|
||||
lprintf(LOG_NOTICE, " user Enable default user for this channel");
|
||||
lprintf(LOG_NOTICE, " access <on|off> Enable or disable access to this channel");
|
||||
lprintf(LOG_NOTICE, " alert <on|off> Enable or disable PEF alerting for this channel");
|
||||
lprintf(LOG_NOTICE, " arp respond <on|off> Enable or disable BMC ARP responding");
|
||||
lprintf(LOG_NOTICE, " arp response <on|off> Enable or disable BMC ARP responding");
|
||||
lprintf(LOG_NOTICE, " arp generate <on|off> Enable or disable BMC gratuitous ARP generation");
|
||||
lprintf(LOG_NOTICE, " arp interval <seconds> Set gratuitous ARP generation interval");
|
||||
lprintf(LOG_NOTICE, " vlan id <off|<id>> Disable or enable VLAN and set ID (1-4094)");
|
||||
lprintf(LOG_NOTICE, " vlan priority <priority> Set vlan priority (0-7)");
|
||||
lprintf(LOG_NOTICE, " auth <level> <type,..> Set channel authentication types");
|
||||
lprintf(LOG_NOTICE, " level = CALLBACK, USER, OPERATOR, ADMIN");
|
||||
lprintf(LOG_NOTICE, " type = NONE, MD2, MD5, PASSWORD, OEM");
|
||||
@ -1239,57 +1229,6 @@ static void ipmi_lan_set_usage(void)
|
||||
lprintf(LOG_NOTICE, " O = OEM\n");
|
||||
}
|
||||
|
||||
static void
|
||||
ipmi_lan_set_vlan_usage(void)
|
||||
{
|
||||
lprintf(LOG_NOTICE,
|
||||
"lan set <channel> vlan id <id>\n"
|
||||
"lan set <channel> vlan id off\n"
|
||||
"lan set <channel> vlan priority <priority>\n");
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_lan_set_vlan_id(struct ipmi_intf * intf, uint8_t chan, char *string)
|
||||
{
|
||||
uint8_t data[2];
|
||||
int rc;
|
||||
|
||||
if (string == NULL) {
|
||||
data[0] = 0;
|
||||
data[1] = 0;
|
||||
}
|
||||
else {
|
||||
int id = atoi(string);
|
||||
|
||||
if (id < 1 || id > 4094) {
|
||||
lprintf(LOG_NOTICE, "vlan id must be between 1 and 4094.");
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
data[0] = (uint8_t)id;
|
||||
data[1] = (uint8_t)(id >> 8) | 0x80;
|
||||
}
|
||||
}
|
||||
rc = set_lan_param(intf, chan, IPMI_LANP_VLAN_ID, data, 2);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_lan_set_vlan_priority(struct ipmi_intf * intf, uint8_t chan, char *string)
|
||||
{
|
||||
uint8_t data;
|
||||
int rc;
|
||||
int priority = atoi(string);
|
||||
|
||||
if (priority < 0 || priority > 7) {
|
||||
lprintf(LOG_NOTICE, "vlan priority must be between 0 and 7.");
|
||||
return -1;
|
||||
}
|
||||
data = (uint8_t)priority;
|
||||
rc = set_lan_param(intf, chan, IPMI_LANP_VLAN_PRIORITY, &data, 1);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_lan_set(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
{
|
||||
@ -1348,7 +1287,7 @@ ipmi_lan_set(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
"example: lan set 7 arp gratuitous off\n");
|
||||
}
|
||||
else if (strncmp(argv[2], "interval", 8) == 0) {
|
||||
rc = lan_set_arp_interval(intf, chan, (uint8_t *)argv[3]);
|
||||
rc = lan_set_arp_interval(intf, chan, argv[3]);
|
||||
}
|
||||
else if (strncmp(argv[2], "generate", 8) == 0) {
|
||||
if (argc < 4)
|
||||
@ -1398,7 +1337,6 @@ ipmi_lan_set(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
" static = static address (manually configured)\n"
|
||||
" dhcp = address obtained by BMC running DHCP\n"
|
||||
" bios = address loaded by BIOS or system software\n");
|
||||
return 0;
|
||||
}
|
||||
else if (strncmp(argv[2], "none", 4) == 0)
|
||||
data[0] = 0;
|
||||
@ -1422,7 +1360,7 @@ ipmi_lan_set(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
/* session password
|
||||
* not strictly a lan setting, but its used for lan connections */
|
||||
else if (strncmp(argv[1], "password", 8) == 0) {
|
||||
rc = ipmi_lan_set_password(intf, 1, (uint8_t *)argv[2]);
|
||||
rc = ipmi_lan_set_password(intf, 1, argv[2]);
|
||||
}
|
||||
/* snmp community string */
|
||||
else if (strncmp(argv[1], "snmp", 4) == 0) {
|
||||
@ -1499,25 +1437,6 @@ ipmi_lan_set(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
rc = set_lan_param(intf, chan, IPMI_LANP_BAK_GATEWAY_MAC, data, 6);
|
||||
}
|
||||
}
|
||||
else if (strncasecmp(argv[1], "vlan", 4) == 0) {
|
||||
if (argc < 4 || strncmp(argv[2], "help", 4) == 0) {
|
||||
ipmi_lan_set_vlan_usage();
|
||||
}
|
||||
else if (strncasecmp(argv[2], "id", 2) == 0) {
|
||||
if (strncasecmp(argv[3], "off", 3) == 0) {
|
||||
ipmi_lan_set_vlan_id(intf, chan, NULL);
|
||||
}
|
||||
else {
|
||||
ipmi_lan_set_vlan_id(intf, chan, argv[3]);
|
||||
}
|
||||
}
|
||||
else if (strncasecmp(argv[2], "priority", 8) == 0) {
|
||||
ipmi_lan_set_vlan_priority(intf, chan, argv[3]);
|
||||
}
|
||||
else {
|
||||
ipmi_lan_set_vlan_usage();
|
||||
}
|
||||
}
|
||||
/* set PEF alerting on or off */
|
||||
else if (strncasecmp(argv[1], "alert", 5) == 0) {
|
||||
if (argc < 3) {
|
||||
@ -1643,7 +1562,6 @@ ipmi_lan_alert_print(struct ipmi_intf * intf, uint8_t channel, uint8_t alert)
|
||||
paddr->data[10], paddr->data[11], paddr->data[12]);
|
||||
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -1837,6 +1755,7 @@ ipmi_lan_alert(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
{
|
||||
uint8_t alert;
|
||||
uint8_t channel = 1;
|
||||
struct lan_param * p;
|
||||
|
||||
if (argc < 1 ||
|
||||
strncasecmp(argv[0], "help", 4) == 0) {
|
||||
@ -1907,12 +1826,9 @@ ipmi_lan_alert(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
static int
|
||||
ipmi_lan_stats_get(struct ipmi_intf * intf, uint8_t chan)
|
||||
{
|
||||
struct lan_param * p;
|
||||
uint8_t medium;
|
||||
int rc = 0;
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t msg_data[2];
|
||||
uint16_t statsTemp;
|
||||
|
||||
if (chan < 1 || chan > IPMI_CHANNEL_NUMBER_MAX) {
|
||||
lprintf(LOG_ERR, "Invalid Channel %d", chan);
|
||||
@ -1928,67 +1844,76 @@ ipmi_lan_stats_get(struct ipmi_intf * intf, uint8_t chan)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* From here, we are ready to get the stats */
|
||||
|
||||
msg_data[0] = chan;
|
||||
msg_data[1] = 0; /* Don't clear */
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_TRANSPORT;
|
||||
req.msg.cmd = IPMI_LAN_GET_STAT;
|
||||
req.msg.data = msg_data;
|
||||
req.msg.data_len = 2;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_INFO, "Get LAN Stats command failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_INFO, "Get LAN Stats command failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return 0;
|
||||
}
|
||||
{
|
||||
/* From here, we are ready to get the stats */
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t msg_data[2];
|
||||
uint16_t statsTemp;
|
||||
uint16_t * pStatsTemp;
|
||||
|
||||
if (verbose > 1)
|
||||
{
|
||||
uint8_t counter;
|
||||
printf("--- Rx Stats ---\n");
|
||||
for(counter=0;counter<18;counter+=2)
|
||||
{
|
||||
printf("%02X", *(rsp->data + counter));
|
||||
printf(" %02X - ", *(rsp->data + counter+1));
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
statsTemp = ((*(rsp->data + 0)) << 8) | (*(rsp->data + 1));
|
||||
printf("IP Rx Packet : %d\n", statsTemp);
|
||||
msg_data[0] = chan;
|
||||
msg_data[1] = 0; /* Don't clear */
|
||||
|
||||
statsTemp = ((*(rsp->data + 2)) << 8) | (*(rsp->data + 3));
|
||||
printf("IP Rx Header Errors : %u\n", statsTemp);
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_TRANSPORT;
|
||||
req.msg.cmd = IPMI_LAN_GET_STAT;
|
||||
req.msg.data = msg_data;
|
||||
req.msg.data_len = 2;
|
||||
|
||||
statsTemp = ((*(rsp->data + 4)) << 8) | (*(rsp->data + 5));
|
||||
printf("IP Rx Address Errors : %u\n", statsTemp);
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_INFO, "Get LAN Stats command failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
statsTemp = ((*(rsp->data + 6)) << 8) | (*(rsp->data + 7));
|
||||
printf("IP Rx Fragmented : %u\n", statsTemp);
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_INFO, "Get LAN Stats command failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (verbose > 1)
|
||||
{
|
||||
uint8_t counter;
|
||||
printf("--- Rx Stats ---\n");
|
||||
for(counter=0;counter<18;counter+=2)
|
||||
{
|
||||
printf("%02X", *(rsp->data + counter));
|
||||
printf(" %02X - ", *(rsp->data + counter+1));
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
statsTemp = ((*(rsp->data + 8)) << 8) | (*(rsp->data + 9));
|
||||
printf("IP Tx Packet : %u\n", statsTemp);
|
||||
statsTemp = ((*(rsp->data + 0)) << 8) | (*(rsp->data + 1));
|
||||
printf("IP Rx Packet : %d\n", statsTemp);
|
||||
|
||||
statsTemp = ((*(rsp->data +10)) << 8) | (*(rsp->data +11));
|
||||
printf("UDP Rx Packet : %u\n", statsTemp);
|
||||
statsTemp = ((*(rsp->data + 2)) << 8) | (*(rsp->data + 3));
|
||||
printf("IP Rx Header Errors : %u\n", statsTemp);
|
||||
|
||||
statsTemp = ((*(rsp->data + 12)) << 8) | (*(rsp->data + 13));
|
||||
printf("RMCP Rx Valid : %u\n", statsTemp);
|
||||
statsTemp = ((*(rsp->data + 4)) << 8) | (*(rsp->data + 5));
|
||||
printf("IP Rx Address Errors : %u\n", statsTemp);
|
||||
|
||||
statsTemp = ((*(rsp->data + 14)) << 8) | (*(rsp->data + 15));
|
||||
printf("UDP Proxy Packet Received : %u\n", statsTemp);
|
||||
statsTemp = ((*(rsp->data + 6)) << 8) | (*(rsp->data + 7));
|
||||
printf("IP Rx Fragmented : %u\n", statsTemp);
|
||||
|
||||
statsTemp = ((*(rsp->data + 16)) << 8) | (*(rsp->data + 17));
|
||||
printf("UDP Proxy Packet Dropped : %u\n", statsTemp);
|
||||
statsTemp = ((*(rsp->data + 8)) << 8) | (*(rsp->data + 9));
|
||||
printf("IP Tx Packet : %u\n", statsTemp);
|
||||
|
||||
statsTemp = ((*(rsp->data +10)) << 8) | (*(rsp->data +11));
|
||||
printf("UDP Rx Packet : %u\n", statsTemp);
|
||||
|
||||
statsTemp = ((*(rsp->data + 12)) << 8) | (*(rsp->data + 13));
|
||||
printf("RMCP Rx Valid : %u\n", statsTemp);
|
||||
|
||||
statsTemp = ((*(rsp->data + 14)) << 8) | (*(rsp->data + 15));
|
||||
printf("UDP Proxy Packet Received : %u\n", statsTemp);
|
||||
|
||||
statsTemp = ((*(rsp->data + 16)) << 8) | (*(rsp->data + 17));
|
||||
printf("UDP Proxy Packet Dropped : %u\n", statsTemp);
|
||||
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
@ -1997,11 +1922,9 @@ ipmi_lan_stats_get(struct ipmi_intf * intf, uint8_t chan)
|
||||
static int
|
||||
ipmi_lan_stats_clear(struct ipmi_intf * intf, uint8_t chan)
|
||||
{
|
||||
struct lan_param * p;
|
||||
uint8_t medium;
|
||||
int rc = 0;
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t msg_data[2];
|
||||
|
||||
if (chan < 1 || chan > IPMI_CHANNEL_NUMBER_MAX) {
|
||||
lprintf(LOG_ERR, "Invalid Channel %d", chan);
|
||||
@ -2017,27 +1940,36 @@ ipmi_lan_stats_clear(struct ipmi_intf * intf, uint8_t chan)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* From here, we are ready to get the stats */
|
||||
msg_data[0] = chan;
|
||||
msg_data[1] = 1; /* Clear */
|
||||
{
|
||||
/* From here, we are ready to get the stats */
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t msg_data[2];
|
||||
uint16_t statsTemp;
|
||||
uint16_t * pStatsTemp;
|
||||
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_TRANSPORT;
|
||||
req.msg.cmd = IPMI_LAN_GET_STAT;
|
||||
req.msg.data = msg_data;
|
||||
req.msg.data_len = 2;
|
||||
msg_data[0] = chan;
|
||||
msg_data[1] = 1; /* Clear */
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_INFO, "Get LAN Stats command failed");
|
||||
return 0;
|
||||
}
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_TRANSPORT;
|
||||
req.msg.cmd = IPMI_LAN_GET_STAT;
|
||||
req.msg.data = msg_data;
|
||||
req.msg.data_len = 2;
|
||||
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_INFO, "Get LAN Stats command failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return 0;
|
||||
}
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_INFO, "Get LAN Stats command failed");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_INFO, "Get LAN Stats command failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
@ -2062,59 +1994,63 @@ int
|
||||
ipmi_lanp_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
{
|
||||
int rc = 0;
|
||||
uint8_t chan = find_lan_channel(intf, 1);
|
||||
uint8_t chan = 0x0e;
|
||||
|
||||
if (argc == 0 || (strncmp(argv[0], "help", 4) == 0)) {
|
||||
print_lan_usage();
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (strncmp(argv[0], "printconf", 9) == 0 ||
|
||||
strncmp(argv[0], "print", 5) == 0)
|
||||
{
|
||||
if (
|
||||
(strncmp(argv[0], "printconf", 9) == 0)
|
||||
||
|
||||
(strncmp(argv[0], "print", 5) == 0)
|
||||
)
|
||||
{
|
||||
if (argc > 1)
|
||||
chan = (uint8_t)strtol(argv[1], NULL, 0);
|
||||
if (chan < 1 || chan > IPMI_CHANNEL_NUMBER_MAX)
|
||||
{
|
||||
lprintf(LOG_ERR, "Invalid channel: %d", chan);
|
||||
{
|
||||
lprintf(LOG_ERR, "Invalid channel: %d", chan);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
rc = ipmi_lan_print(intf, chan);
|
||||
}
|
||||
else if (strncmp(argv[0], "set", 3) == 0)
|
||||
{
|
||||
rc = ipmi_lan_set(intf, argc-1, &(argv[1]));
|
||||
rc = ipmi_lan_set(intf, argc-1, &(argv[1]));
|
||||
}
|
||||
else if (strncmp(argv[0], "alert", 5) == 0)
|
||||
{
|
||||
rc = ipmi_lan_alert(intf, argc-1, &(argv[1]));
|
||||
}
|
||||
else if (strncmp(argv[0], "stats", 5) == 0)
|
||||
{
|
||||
if(argc == 1)
|
||||
{
|
||||
print_lan_usage();
|
||||
rc = ipmi_lan_alert(intf, argc-1, &(argv[1]));
|
||||
}
|
||||
else if (strncmp(argv[0], "stats", 5) == 0)
|
||||
{
|
||||
if(argc == 1)
|
||||
{
|
||||
print_lan_usage();
|
||||
return -1;
|
||||
}
|
||||
else if (argc > 2)
|
||||
chan = (uint8_t)strtol(argv[2], NULL, 0);
|
||||
}
|
||||
else if (argc > 2)
|
||||
chan = (uint8_t)strtol(argv[2], NULL, 0);
|
||||
|
||||
if (chan < 2 || chan > IPMI_CHANNEL_NUMBER_MAX)
|
||||
{
|
||||
lprintf(LOG_ERR, "Invalid channel: %d", chan);
|
||||
if (chan < 2 || chan > IPMI_CHANNEL_NUMBER_MAX)
|
||||
{
|
||||
lprintf(LOG_ERR, "Invalid channel: %d", chan);
|
||||
return -1;
|
||||
}
|
||||
else if (strncmp(argv[1], "get", 3) == 0)
|
||||
rc = ipmi_lan_stats_get(intf, chan);
|
||||
else if (strncmp(argv[1], "clear", 5) == 0)
|
||||
rc = ipmi_lan_stats_clear(intf, chan);
|
||||
else
|
||||
print_lan_usage();
|
||||
}
|
||||
else if (strncmp(argv[1], "get", 3) == 0)
|
||||
rc = ipmi_lan_stats_get(intf, chan);
|
||||
else if (strncmp(argv[1], "clear", 5) == 0)
|
||||
rc = ipmi_lan_stats_clear(intf, chan);
|
||||
else
|
||||
print_lan_usage();
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
lprintf(LOG_NOTICE, "Invalid LAN command: %s", argv[0]);
|
||||
}
|
||||
lprintf(LOG_NOTICE, "Invalid LAN command: %s", argv[0]);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -56,7 +60,6 @@
|
||||
#include <ipmitool/ipmi_lanp.h>
|
||||
#include <ipmitool/ipmi_chassis.h>
|
||||
#include <ipmitool/ipmi_mc.h>
|
||||
#include <ipmitool/ipmi_firewall.h>
|
||||
#include <ipmitool/ipmi_sensor.h>
|
||||
#include <ipmitool/ipmi_channel.h>
|
||||
#include <ipmitool/ipmi_session.h>
|
||||
@ -71,7 +74,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_ALL_OPTIONS
|
||||
# define OPTION_STRING "I:hVvcgsEao:H:P:f:U:p:C:L:A:t:m:S:l:b:e:k:O:"
|
||||
# define OPTION_STRING "I:hVvcgsEao:H:P:f:U:p:C:L:A:t:m:S:l:b:e:k:"
|
||||
#else
|
||||
# define OPTION_STRING "I:hVvcH:f:U:p:S:"
|
||||
#endif
|
||||
@ -236,7 +239,6 @@ ipmi_option_usage(const char * progname, struct ipmi_cmd * cmdlist, struct ipmi_
|
||||
lprintf(LOG_NOTICE, " -l lun Set destination lun for raw commands");
|
||||
lprintf(LOG_NOTICE, " -t address Bridge request to remote target address");
|
||||
lprintf(LOG_NOTICE, " -o oemtype Setup for OEM (use 'list' to see available OEM types)");
|
||||
lprintf(LOG_NOTICE, " -O seloem Use file for OEM SEL event descriptions");
|
||||
#endif
|
||||
lprintf(LOG_NOTICE, "");
|
||||
|
||||
@ -279,7 +281,6 @@ ipmi_main(int argc, char ** argv,
|
||||
char * oemtype = NULL;
|
||||
char * sdrcache = NULL;
|
||||
char * kgkey = NULL;
|
||||
char * seloem = NULL;
|
||||
int port = 0;
|
||||
int cipher_suite_id = 3; /* See table 22-19 of the IPMIv2 spec */
|
||||
int argflag, i, found;
|
||||
@ -469,13 +470,6 @@ ipmi_main(int argc, char ** argv,
|
||||
case 'e':
|
||||
sol_escape_char = optarg[0];
|
||||
break;
|
||||
case 'O':
|
||||
seloem = strdup(optarg);
|
||||
if (seloem == NULL) {
|
||||
lprintf(LOG_ERR, "%s: malloc failure", progname);
|
||||
goto out_free;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
ipmi_option_usage(progname, cmdlist, intflist);
|
||||
@ -589,11 +583,6 @@ ipmi_main(int argc, char ** argv,
|
||||
ipmi_sdr_list_cache_fromfile(intf, sdrcache);
|
||||
}
|
||||
|
||||
/* Parse SEL OEM file if given */
|
||||
if (seloem != NULL) {
|
||||
ipmi_sel_oem_init(seloem);
|
||||
}
|
||||
|
||||
intf->cmdlist = cmdlist;
|
||||
|
||||
/* now we finally run the command */
|
||||
@ -622,8 +611,6 @@ ipmi_main(int argc, char ** argv,
|
||||
free(password);
|
||||
if (oemtype != NULL)
|
||||
free(oemtype);
|
||||
if (seloem != NULL)
|
||||
free(seloem);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -412,7 +416,7 @@ ipmi_mc_get_guid(struct ipmi_intf * intf)
|
||||
}
|
||||
|
||||
if (rsp->data_len == sizeof(struct ipmi_guid)) {
|
||||
char tbuf[40];
|
||||
uint8_t tbuf[40];
|
||||
time_t s;
|
||||
memset(tbuf, 0, 40);
|
||||
memset(&guid, 0, sizeof(struct ipmi_guid));
|
||||
|
@ -26,6 +26,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -35,10 +39,8 @@
|
||||
#include <ipmitool/ipmi_constants.h>
|
||||
#include <ipmitool/log.h>
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/ipmi_sel.h>
|
||||
|
||||
static int ipmi_oem_supermicro(struct ipmi_intf * intf);
|
||||
static int ipmi_oem_ibm(struct ipmi_intf * intf);
|
||||
|
||||
static struct ipmi_oem_handle ipmi_oem_list[] = {
|
||||
{
|
||||
@ -58,11 +60,6 @@ static struct ipmi_oem_handle ipmi_oem_list[] = {
|
||||
name: "icts",
|
||||
desc: "IPMI 2.0 ICTS compliance support",
|
||||
},
|
||||
{
|
||||
name: "ibm",
|
||||
desc: "IBM OEM support",
|
||||
setup: ipmi_oem_ibm,
|
||||
},
|
||||
{ 0 },
|
||||
};
|
||||
|
||||
@ -74,17 +71,6 @@ ipmi_oem_supermicro(struct ipmi_intf * intf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_oem_ibm(struct ipmi_intf * intf)
|
||||
{
|
||||
char * filename;
|
||||
if ((filename = getenv("IPMI_OEM_IBM_DATAFILE")) == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to read IPMI_OEM_IBM_DATAFILE from environment");
|
||||
return -1;
|
||||
}
|
||||
return ipmi_sel_oem_init((const char *)filename);
|
||||
}
|
||||
|
||||
/* ipmi_oem_print - print list of OEM handles
|
||||
*/
|
||||
void
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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 DELL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -307,7 +311,7 @@ ipmi_pef_print_lan_dest(struct ipmi_intf * intf, uint8_t ch, uint8_t dest)
|
||||
"PET community");
|
||||
else {
|
||||
rsp->data[19] = '\0';
|
||||
ipmi_pef_print_str("PET Community", (const char *)&rsp->data[1]);
|
||||
ipmi_pef_print_str("PET Community", &rsp->data[1]);
|
||||
}
|
||||
}
|
||||
ipmi_pef_print_dec("ACK timeout/retry (secs)", timeout);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -215,6 +219,8 @@ ipmi_raw_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
struct ipmi_rq req;
|
||||
uint8_t netfn, cmd, lun;
|
||||
int i;
|
||||
unsigned long ufn;
|
||||
|
||||
uint8_t data[256];
|
||||
|
||||
if (argc < 2 || strncmp(argv[0], "help", 4) == 0) {
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -278,13 +282,12 @@ ipmi_sdr_get_sensor_reading(struct ipmi_intf *intf, uint8_t sensor)
|
||||
* @intf: ipmi interface
|
||||
* @sensor: sensor id
|
||||
* @target: IPMB target address
|
||||
* @lun: sensor lun
|
||||
*
|
||||
* returns ipmi response structure
|
||||
*/
|
||||
struct ipmi_rs *
|
||||
ipmi_sdr_get_sensor_reading_ipmb(struct ipmi_intf *intf, uint8_t sensor,
|
||||
uint8_t target, uint8_t lun)
|
||||
uint8_t target)
|
||||
{
|
||||
struct ipmi_rq req;
|
||||
struct ipmi_rs *rsp;
|
||||
@ -494,9 +497,6 @@ ipmi_sdr_get_header(struct ipmi_intf *intf, struct ipmi_sdr_iterator *itr)
|
||||
}
|
||||
}
|
||||
|
||||
if (!rsp)
|
||||
return NULL;
|
||||
|
||||
lprintf(LOG_DEBUG, "SDR record ID : 0x%04x", itr->next);
|
||||
|
||||
memcpy(&sdr_rs, rsp->data, sizeof (sdr_rs));
|
||||
@ -926,6 +926,7 @@ ipmi_sdr_print_sensor_full(struct ipmi_intf *intf,
|
||||
int i = 0, validread = 1, do_unit = 1;
|
||||
double val = 0.0, creading = 0.0;
|
||||
struct ipmi_rs *rsp;
|
||||
uint8_t min_reading, max_reading;
|
||||
|
||||
if (sensor == NULL)
|
||||
return -1;
|
||||
@ -947,7 +948,7 @@ ipmi_sdr_print_sensor_full(struct ipmi_intf *intf,
|
||||
desc, sensor->keys.sensor_num);
|
||||
validread = 0;
|
||||
}
|
||||
else if (rsp->ccode > 0) {
|
||||
if (rsp->ccode > 0) {
|
||||
if (rsp->ccode == 0xcb) {
|
||||
/* sensor not found */
|
||||
validread = 0;
|
||||
@ -1073,7 +1074,7 @@ ipmi_sdr_print_sensor_full(struct ipmi_intf *intf,
|
||||
i += snprintf(sval, sizeof (sval), "%.*f %s",
|
||||
(val == (int) val) ? 0 : 2, val,
|
||||
do_unit ? unitstr : "");
|
||||
else if (rsp && IS_SCANNING_DISABLED(rsp->data[1]))
|
||||
else if (IS_SCANNING_DISABLED(rsp->data[1]))
|
||||
i += snprintf(sval, sizeof (sval), "disabled ");
|
||||
else
|
||||
i += snprintf(sval, sizeof (sval), "no reading ");
|
||||
@ -1107,7 +1108,7 @@ ipmi_sdr_print_sensor_full(struct ipmi_intf *intf,
|
||||
i += snprintf(sval, sizeof (sval), "%.*f %s",
|
||||
(val == (int) val) ? 0 : 2, val,
|
||||
do_unit ? unitstr : "");
|
||||
else if (rsp && IS_SCANNING_DISABLED(rsp->data[1]))
|
||||
else if (IS_SCANNING_DISABLED(rsp->data[1]))
|
||||
i += snprintf(sval, sizeof (sval), "Disabled");
|
||||
else
|
||||
i += snprintf(sval, sizeof (sval), "No Reading");
|
||||
@ -1133,7 +1134,7 @@ ipmi_sdr_print_sensor_full(struct ipmi_intf *intf,
|
||||
printf(" Sensor Reading : ");
|
||||
if (validread)
|
||||
printf("%xh\n", (uint32_t) val);
|
||||
else if (rsp && IS_SCANNING_DISABLED(rsp->data[1]))
|
||||
else if (IS_SCANNING_DISABLED(rsp->data[1]))
|
||||
printf("Disabled\n");
|
||||
else
|
||||
printf("Not Reading\n");
|
||||
@ -1156,9 +1157,8 @@ ipmi_sdr_print_sensor_full(struct ipmi_intf *intf,
|
||||
|
||||
ipmi_sdr_print_discrete_state("States Asserted",
|
||||
sensor->sensor.type,
|
||||
sensor->event_type,
|
||||
rsp ? rsp->data[2] : 0,
|
||||
rsp ? rsp->data[3] : 0);
|
||||
sensor->event_type, rsp->data[2],
|
||||
rsp->data[3]);
|
||||
ipmi_sdr_print_sensor_mask(&sensor->mask, sensor->sensor.type,
|
||||
sensor->event_type, DISCRETE_SENSOR);
|
||||
ipmi_sdr_print_sensor_event_status(intf,
|
||||
@ -1187,7 +1187,7 @@ ipmi_sdr_print_sensor_full(struct ipmi_intf *intf,
|
||||
printf("%.*f (+/- %.*f) %s\n",
|
||||
(val == (int) val) ? 0 : 3,
|
||||
val, (tol == (int) tol) ? 0 : 3, tol, unitstr);
|
||||
} else if (rsp && IS_SCANNING_DISABLED(rsp->data[1]))
|
||||
} else if (IS_SCANNING_DISABLED(rsp->data[1]))
|
||||
printf("Disabled\n");
|
||||
else
|
||||
printf("No Reading\n");
|
||||
@ -1450,27 +1450,13 @@ ipmi_sdr_print_discrete_state(const char *desc,
|
||||
}
|
||||
|
||||
if (evt->offset > 7) {
|
||||
if ((1 << (evt->offset - 8)) & state2) {
|
||||
if (evt->desc) {
|
||||
printf(" "
|
||||
"[%s]\n",
|
||||
evt->desc);
|
||||
} else {
|
||||
printf(" "
|
||||
"[no description]\n");
|
||||
}
|
||||
}
|
||||
if ((1 << (evt->offset - 8)) & state2)
|
||||
printf(" [%s]\n",
|
||||
evt->desc);
|
||||
} else {
|
||||
if ((1 << evt->offset) & state1) {
|
||||
if (evt->desc) {
|
||||
printf(" "
|
||||
"[%s]\n",
|
||||
evt->desc);
|
||||
} else {
|
||||
printf(" "
|
||||
"[no description]\n");
|
||||
}
|
||||
}
|
||||
if ((1 << evt->offset) & state1)
|
||||
printf(" [%s]\n",
|
||||
evt->desc);
|
||||
}
|
||||
c++;
|
||||
}
|
||||
@ -1505,30 +1491,21 @@ ipmi_sdr_print_sensor_compact(struct ipmi_intf *intf,
|
||||
desc, sensor->keys.sensor_num);
|
||||
validread = 0;
|
||||
}
|
||||
|
||||
else if (rsp->ccode > 0) {
|
||||
/* completion code 0xcd is special case */
|
||||
if (rsp->ccode == 0xcd) {
|
||||
/* sensor not found */
|
||||
validread = 0;
|
||||
} else {
|
||||
lprintf(LOG_DEBUG, "Error reading sensor %s (#%02x): %s",
|
||||
desc, sensor->keys.sensor_num,
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
validread = 0;
|
||||
}
|
||||
} else {
|
||||
if (IS_READING_UNAVAILABLE(rsp->data[1])) {
|
||||
/* sensor reading unavailable */
|
||||
validread = 0;
|
||||
} else if (IS_SCANNING_DISABLED(rsp->data[1])) {
|
||||
validread = 0;
|
||||
/* check for sensor scanning disabled bit */
|
||||
lprintf(LOG_DEBUG, "Sensor %s (#%02x) scanning disabled",
|
||||
desc, sensor->keys.sensor_num);
|
||||
}
|
||||
if (rsp->ccode > 0 && rsp->ccode != 0xcd) {
|
||||
/* completion code 0xcd is special case */
|
||||
lprintf(LOG_DEBUG, "Error reading sensor %s (#%02x): %s",
|
||||
desc, sensor->keys.sensor_num,
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
validread = 0;
|
||||
}
|
||||
|
||||
|
||||
/* check for sensor scanning disabled bit */
|
||||
if (IS_SCANNING_DISABLED(rsp->data[1])) {
|
||||
lprintf(LOG_DEBUG, "Sensor %s (#%02x) scanning disabled",
|
||||
desc, sensor->keys.sensor_num);
|
||||
validread = 0;
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
printf("Sensor ID : %s (0x%x)\n",
|
||||
(sensor->id_code) ? desc : "", sensor->keys.sensor_num);
|
||||
@ -2407,8 +2384,7 @@ ipmi_sdr_start(struct ipmi_intf *intf)
|
||||
* IPMIv2.0 == 0x02
|
||||
*/
|
||||
if ((sdr_info.version != 0x51) &&
|
||||
(sdr_info.version != 0x01) &&
|
||||
(sdr_info.version != 0x02)) {
|
||||
(sdr_info.version != 0x01) && (sdr_info.version != 0x02)) {
|
||||
lprintf(LOG_WARN, "WARNING: Unknown SDR repository "
|
||||
"version 0x%02x", sdr_info.version);
|
||||
}
|
||||
@ -3219,39 +3195,39 @@ ipmi_sdr_find_sdr_byid(struct ipmi_intf *intf, char *id)
|
||||
for (e = sdr_list_head; e != NULL; e = e->next) {
|
||||
switch (e->type) {
|
||||
case SDR_RECORD_TYPE_FULL_SENSOR:
|
||||
if (!strncmp((const char *)e->record.full->id_string,
|
||||
(const char *)id,
|
||||
__max(e->record.full->id_code & 0x1f, idlen)))
|
||||
if (!strncmp(e->record.full->id_string, id,
|
||||
__max(e->record.full->id_code & 0x1f,
|
||||
idlen)))
|
||||
return e;
|
||||
break;
|
||||
case SDR_RECORD_TYPE_COMPACT_SENSOR:
|
||||
if (!strncmp((const char *)e->record.compact->id_string,
|
||||
(const char *)id,
|
||||
__max(e->record.compact->id_code & 0x1f, idlen)))
|
||||
if (!strncmp(e->record.compact->id_string, id,
|
||||
__max(e->record.compact->id_code & 0x1f,
|
||||
idlen)))
|
||||
return e;
|
||||
break;
|
||||
case SDR_RECORD_TYPE_EVENTONLY_SENSOR:
|
||||
if (!strncmp((const char *)e->record.eventonly->id_string,
|
||||
(const char *)id,
|
||||
__max(e->record.eventonly->id_code & 0x1f, idlen)))
|
||||
if (!strncmp(e->record.eventonly->id_string, id,
|
||||
__max(e->record.eventonly->id_code & 0x1f,
|
||||
idlen)))
|
||||
return e;
|
||||
break;
|
||||
case SDR_RECORD_TYPE_GENERIC_DEVICE_LOCATOR:
|
||||
if (!strncmp((const char *)e->record.genloc->id_string,
|
||||
(const char *)id,
|
||||
__max(e->record.genloc->id_code & 0x1f, idlen)))
|
||||
if (!strncmp(e->record.genloc->id_string, id,
|
||||
__max(e->record.genloc->id_code & 0x1f,
|
||||
idlen)))
|
||||
return e;
|
||||
break;
|
||||
case SDR_RECORD_TYPE_FRU_DEVICE_LOCATOR:
|
||||
if (!strncmp((const char *)e->record.fruloc->id_string,
|
||||
(const char *)id,
|
||||
__max(e->record.fruloc->id_code & 0x1f, idlen)))
|
||||
if (!strncmp(e->record.fruloc->id_string, id,
|
||||
__max(e->record.fruloc->id_code & 0x1f,
|
||||
idlen)))
|
||||
return e;
|
||||
break;
|
||||
case SDR_RECORD_TYPE_MC_DEVICE_LOCATOR:
|
||||
if (!strncmp((const char *)e->record.mcloc->id_string,
|
||||
(const char *)id,
|
||||
__max(e->record.mcloc->id_code & 0x1f, idlen)))
|
||||
if (!strncmp(e->record.mcloc->id_string, id,
|
||||
__max(e->record.mcloc->id_code & 0x1f,
|
||||
idlen)))
|
||||
return e;
|
||||
break;
|
||||
}
|
||||
@ -3279,57 +3255,51 @@ ipmi_sdr_find_sdr_byid(struct ipmi_intf *intf, char *id)
|
||||
case SDR_RECORD_TYPE_FULL_SENSOR:
|
||||
sdrr->record.full =
|
||||
(struct sdr_record_full_sensor *) rec;
|
||||
if (!strncmp(
|
||||
(const char *)sdrr->record.full->id_string,
|
||||
(const char *)id,
|
||||
__max(sdrr->record.full->id_code & 0x1f, idlen)))
|
||||
if (!strncmp
|
||||
(sdrr->record.full->id_string, id,
|
||||
__max(sdrr->record.full->id_code & 0x1f, idlen)))
|
||||
found = 1;
|
||||
break;
|
||||
case SDR_RECORD_TYPE_COMPACT_SENSOR:
|
||||
sdrr->record.compact =
|
||||
(struct sdr_record_compact_sensor *) rec;
|
||||
if (!strncmp(
|
||||
(const char *)sdrr->record.compact->id_string,
|
||||
(const char *)id,
|
||||
__max(sdrr->record.compact->id_code & 0x1f,
|
||||
if (!strncmp
|
||||
(sdrr->record.compact->id_string, id,
|
||||
__max(sdrr->record.compact->id_code & 0x1f,
|
||||
idlen)))
|
||||
found = 1;
|
||||
break;
|
||||
case SDR_RECORD_TYPE_EVENTONLY_SENSOR:
|
||||
sdrr->record.eventonly =
|
||||
(struct sdr_record_eventonly_sensor *) rec;
|
||||
if (!strncmp(
|
||||
(const char *)sdrr->record.eventonly->id_string,
|
||||
(const char *)id,
|
||||
__max(sdrr->record.eventonly->id_code & 0x1f,
|
||||
if (!strncmp
|
||||
(sdrr->record.eventonly->id_string, id,
|
||||
__max(sdrr->record.eventonly->id_code & 0x1f,
|
||||
idlen)))
|
||||
found = 1;
|
||||
break;
|
||||
case SDR_RECORD_TYPE_GENERIC_DEVICE_LOCATOR:
|
||||
sdrr->record.genloc =
|
||||
(struct sdr_record_generic_locator *) rec;
|
||||
if (!strncmp(
|
||||
(const char *)sdrr->record.genloc->id_string,
|
||||
(const char *)id,
|
||||
__max(sdrr->record.genloc->id_code & 0x1f, idlen)))
|
||||
if (!strncmp
|
||||
(sdrr->record.genloc->id_string, id,
|
||||
__max(sdrr->record.genloc->id_code & 0x1f, idlen)))
|
||||
found = 1;
|
||||
break;
|
||||
case SDR_RECORD_TYPE_FRU_DEVICE_LOCATOR:
|
||||
sdrr->record.fruloc =
|
||||
(struct sdr_record_fru_locator *) rec;
|
||||
if (!strncmp(
|
||||
(const char *)sdrr->record.fruloc->id_string,
|
||||
(const char *)id,
|
||||
__max(sdrr->record.fruloc->id_code & 0x1f, idlen)))
|
||||
if (!strncmp
|
||||
(sdrr->record.fruloc->id_string, id,
|
||||
__max(sdrr->record.fruloc->id_code & 0x1f, idlen)))
|
||||
found = 1;
|
||||
break;
|
||||
case SDR_RECORD_TYPE_MC_DEVICE_LOCATOR:
|
||||
sdrr->record.mcloc =
|
||||
(struct sdr_record_mc_locator *) rec;
|
||||
if (!strncmp(
|
||||
(const char *)sdrr->record.mcloc->id_string,
|
||||
(const char *)id,
|
||||
__max(sdrr->record.mcloc->id_code & 0x1f, idlen)))
|
||||
if (!strncmp
|
||||
(sdrr->record.mcloc->id_string, id,
|
||||
__max(sdrr->record.mcloc->id_code & 0x1f, idlen)))
|
||||
found = 1;
|
||||
break;
|
||||
case SDR_RECORD_TYPE_ENTITY_ASSOC:
|
||||
@ -3406,13 +3376,10 @@ ipmi_sdr_list_cache_fromfile(struct ipmi_intf *intf, const char *ifile)
|
||||
if (header.length == 0)
|
||||
continue;
|
||||
|
||||
if (header.version != 0x51 &&
|
||||
header.version != 0x01 &&
|
||||
header.version != 0x02) {
|
||||
if (header.version != 0x51) {
|
||||
lprintf(LOG_WARN, "invalid sdr header version %02x",
|
||||
header.version);
|
||||
ret = -1;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
|
||||
sdrr = malloc(sizeof (struct sdr_record_list));
|
||||
@ -3762,62 +3729,42 @@ ipmi_sdr_dump_bin(struct ipmi_intf *intf, const char *ofile)
|
||||
{
|
||||
struct sdr_get_rs *header;
|
||||
struct ipmi_sdr_iterator *itr;
|
||||
struct sdr_record_list *sdrr;
|
||||
FILE *fp;
|
||||
int rc = 0;
|
||||
|
||||
fp = ipmi_open_file_write(ofile);
|
||||
if (fp == NULL)
|
||||
return -1;
|
||||
|
||||
/* open connection to SDR */
|
||||
itr = ipmi_sdr_start(intf);
|
||||
if (itr == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to open SDR for reading");
|
||||
fclose(fp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("Dumping Sensor Data Repository to '%s'\n", ofile);
|
||||
|
||||
/* generate list of records */
|
||||
/* go through sdr records */
|
||||
while ((header = ipmi_sdr_get_next_header(intf, itr)) != NULL) {
|
||||
sdrr = malloc(sizeof(struct sdr_record_list));
|
||||
if (sdrr == NULL) {
|
||||
lprintf(LOG_ERR, "ipmitool: malloc failure");
|
||||
return -1;
|
||||
}
|
||||
memset(sdrr, 0, sizeof(struct sdr_record_list));
|
||||
int r;
|
||||
uint8_t h[5];
|
||||
uint8_t *rec;
|
||||
|
||||
lprintf(LOG_INFO, "Record ID %04x (%d bytes)",
|
||||
header->id, header->length);
|
||||
|
||||
sdrr->id = header->id;
|
||||
sdrr->version = header->version;
|
||||
sdrr->type = header->type;
|
||||
sdrr->length = header->length;
|
||||
sdrr->raw = ipmi_sdr_get_record(intf, header, itr);
|
||||
|
||||
if (sdr_list_head == NULL)
|
||||
sdr_list_head = sdrr;
|
||||
else
|
||||
sdr_list_tail->next = sdrr;
|
||||
|
||||
sdr_list_tail = sdrr;
|
||||
}
|
||||
|
||||
ipmi_sdr_end(intf, itr);
|
||||
|
||||
/* now write to file */
|
||||
fp = ipmi_open_file_write(ofile);
|
||||
if (fp == NULL)
|
||||
return -1;
|
||||
|
||||
for (sdrr = sdr_list_head; sdrr != NULL; sdrr = sdrr->next) {
|
||||
int r;
|
||||
uint8_t h[5];
|
||||
rec = ipmi_sdr_get_record(intf, header, itr);
|
||||
if (rec == NULL)
|
||||
continue;
|
||||
|
||||
/* build and write sdr header */
|
||||
h[0] = sdrr->id & 0xff;
|
||||
h[1] = (sdrr->id >> 8) & 0xff;
|
||||
h[2] = sdrr->version;
|
||||
h[3] = sdrr->type;
|
||||
h[4] = sdrr->length;
|
||||
h[0] = header->id & 0xff;
|
||||
h[1] = (header->id >> 8) & 0xff;
|
||||
h[2] = header->version;
|
||||
h[3] = header->type;
|
||||
h[4] = header->length;
|
||||
|
||||
r = fwrite(h, 1, 5, fp);
|
||||
if (r != 5) {
|
||||
@ -3828,16 +3775,18 @@ ipmi_sdr_dump_bin(struct ipmi_intf *intf, const char *ofile)
|
||||
}
|
||||
|
||||
/* write sdr entry */
|
||||
r = fwrite(sdrr->raw, 1, sdrr->length, fp);
|
||||
if (r != sdrr->length) {
|
||||
r = fwrite(rec, 1, header->length, fp);
|
||||
if (r != header->length) {
|
||||
lprintf(LOG_ERR, "Error writing %d record bytes "
|
||||
"to output file %s", sdrr->length, ofile);
|
||||
"to output file %s", header->length, ofile);
|
||||
rc = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
ipmi_sdr_end(intf, itr);
|
||||
|
||||
fclose(fp);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -28,13 +28,16 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#define __USE_XOPEN /* glibc2 needs this for strptime */
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/log.h>
|
||||
@ -47,151 +50,8 @@
|
||||
#include <ipmitool/ipmi_sensor.h>
|
||||
|
||||
extern int verbose;
|
||||
|
||||
static int sel_extended = 0;
|
||||
static int sel_oem_nrecs = 0;
|
||||
|
||||
struct ipmi_sel_oem_msg_rec {
|
||||
int value[14];
|
||||
char *string[14];
|
||||
char *text;
|
||||
} *sel_oem_msg;
|
||||
|
||||
#define SEL_BYTE(n) (n-3) /* So we can refer to byte positions in log entries (byte 3 is at index 0, etc) */
|
||||
|
||||
/*
|
||||
* Reads values found in message translation file. XX is a wildcard, R means reserved.
|
||||
* Returns -1 for XX, -2 for R, -3 for non-hex (string), or positive integer from a hex value.
|
||||
*/
|
||||
static int ipmi_sel_oem_readval(char *str)
|
||||
{
|
||||
int ret;
|
||||
if (!strcmp(str, "XX")) {
|
||||
return -1;
|
||||
}
|
||||
if (!strcmp(str, "R")) {
|
||||
return -2;
|
||||
}
|
||||
if (sscanf(str, "0x%x", &ret) != 1) {
|
||||
return -3;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is where the magic happens. SEL_BYTE is a bit ugly, but it allows
|
||||
* reference to byte positions instead of array indexes which (hopefully)
|
||||
* helps make the code easier to read.
|
||||
*/
|
||||
static int ipmi_sel_oem_match(uint8_t *evt, struct ipmi_sel_oem_msg_rec rec)
|
||||
{
|
||||
if (evt[2] == rec.value[SEL_BYTE(3)] &&
|
||||
((rec.value[SEL_BYTE(4)] < 0) || (evt[3] == rec.value[SEL_BYTE(4)])) &&
|
||||
((rec.value[SEL_BYTE(5)] < 0) || (evt[4] == rec.value[SEL_BYTE(5)])) &&
|
||||
((rec.value[SEL_BYTE(6)] < 0) || (evt[5] == rec.value[SEL_BYTE(6)])) &&
|
||||
((rec.value[SEL_BYTE(7)] < 0) || (evt[6] == rec.value[SEL_BYTE(7)])) &&
|
||||
((rec.value[SEL_BYTE(11)] < 0) || (evt[10] == rec.value[SEL_BYTE(11)])) &&
|
||||
((rec.value[SEL_BYTE(12)] < 0) || (evt[11] == rec.value[SEL_BYTE(12)]))) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int ipmi_sel_oem_init(const char * filename)
|
||||
{
|
||||
FILE * fp;
|
||||
int i, j, k, n, byte;
|
||||
char buf[15][150];
|
||||
|
||||
if (filename == NULL) {
|
||||
lprintf(LOG_ERR, "No SEL OEM filename provided");
|
||||
return -1;
|
||||
}
|
||||
|
||||
fp = ipmi_open_file_read(filename);
|
||||
if (fp == NULL) {
|
||||
lprintf(LOG_ERR, "Could not open %s file", filename);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* count number of records (lines) in input file */
|
||||
sel_oem_nrecs = 0;
|
||||
while (fscanf(fp, "%*[^\n]\n") == 0) {
|
||||
sel_oem_nrecs++;
|
||||
}
|
||||
|
||||
printf("nrecs=%d\n", sel_oem_nrecs);
|
||||
|
||||
rewind(fp);
|
||||
sel_oem_msg = (struct ipmi_sel_oem_msg_rec *)calloc(sel_oem_nrecs,
|
||||
sizeof(struct ipmi_sel_oem_msg_rec));
|
||||
|
||||
for (i=0; i < sel_oem_nrecs; i++) {
|
||||
n=fscanf(fp, "\"%[^\"]\",\"%[^\"]\",\"%[^\"]\",\"%[^\"]\",\""
|
||||
"%[^\"]\",\"%[^\"]\",\"%[^\"]\",\"%[^\"]\",\""
|
||||
"%[^\"]\",\"%[^\"]\",\"%[^\"]\",\"%[^\"]\",\""
|
||||
"%[^\"]\",\"%[^\"]\",\"%[^\"]\"\n",
|
||||
buf[0], buf[1], buf[2], buf[3], buf[4], buf[5],
|
||||
buf[6], buf[7], buf[8], buf[9], buf[10], buf[11],
|
||||
buf[12], buf[13], buf[14]);
|
||||
|
||||
if (n != 15) {
|
||||
lprintf (LOG_ERR, "Encountered problems reading line %d of %s",
|
||||
i+1, filename);
|
||||
fclose(fp);
|
||||
fp = NULL;
|
||||
sel_oem_nrecs = 0;
|
||||
/* free all the memory allocated so far */
|
||||
for (j=0; j<i ; j++) {
|
||||
for (k=3; k<17; k++) {
|
||||
if (sel_oem_msg[j].value[SEL_BYTE(k)] == -3) {
|
||||
free(sel_oem_msg[j].string[SEL_BYTE(k)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
free (sel_oem_msg);
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (byte = 3; byte < 17; byte++) {
|
||||
if ((sel_oem_msg[i].value[SEL_BYTE(byte)] =
|
||||
ipmi_sel_oem_readval(buf[SEL_BYTE(byte)])) == -3) {
|
||||
sel_oem_msg[i].string[SEL_BYTE(byte)] =
|
||||
(char *)malloc(strlen(buf[SEL_BYTE(byte)]) + 1);
|
||||
strcpy(sel_oem_msg[i].string[SEL_BYTE(byte)],
|
||||
buf[SEL_BYTE(byte)]);
|
||||
}
|
||||
}
|
||||
sel_oem_msg[i].text = (char *)malloc(strlen(buf[SEL_BYTE(17)]) + 1);
|
||||
strcpy(sel_oem_msg[i].text, buf[SEL_BYTE(17)]);
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
fp = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ipmi_sel_oem_message(struct sel_event_record * evt, int verbose)
|
||||
{
|
||||
/*
|
||||
* Note: although we have a verbose argument, currently the output
|
||||
* isn't affected by it.
|
||||
*/
|
||||
int i, j;
|
||||
|
||||
for (i=0; i < sel_oem_nrecs; i++) {
|
||||
if (ipmi_sel_oem_match((uint8_t *)evt, sel_oem_msg[i])) {
|
||||
printf (csv_output ? ",\"%s\"" : " | %s", sel_oem_msg[i].text);
|
||||
for (j=4; j<17; j++) {
|
||||
if (sel_oem_msg[i].value[SEL_BYTE(j)] == -3) {
|
||||
printf (csv_output ? ",%s=0x%x" : " %s = 0x%x",
|
||||
sel_oem_msg[i].string[SEL_BYTE(j)],
|
||||
((uint8_t *)evt)[SEL_BYTE(j)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static const struct valstr event_dir_vals[] = {
|
||||
{ 0, "Assertion Event" },
|
||||
@ -218,7 +78,7 @@ ipmi_get_event_type(uint8_t code)
|
||||
static char *
|
||||
ipmi_sel_timestamp(uint32_t stamp)
|
||||
{
|
||||
static char tbuf[40];
|
||||
static uint8_t tbuf[40];
|
||||
time_t s = (time_t)stamp;
|
||||
memset(tbuf, 0, 40);
|
||||
strftime(tbuf, sizeof(tbuf), "%m/%d/%Y %H:%M:%S", localtime(&s));
|
||||
@ -228,7 +88,7 @@ ipmi_sel_timestamp(uint32_t stamp)
|
||||
static char *
|
||||
ipmi_sel_timestamp_date(uint32_t stamp)
|
||||
{
|
||||
static char tbuf[11];
|
||||
static uint8_t tbuf[11];
|
||||
time_t s = (time_t)stamp;
|
||||
strftime(tbuf, sizeof(tbuf), "%m/%d/%Y", localtime(&s));
|
||||
return tbuf;
|
||||
@ -237,7 +97,7 @@ ipmi_sel_timestamp_date(uint32_t stamp)
|
||||
static char *
|
||||
ipmi_sel_timestamp_time(uint32_t stamp)
|
||||
{
|
||||
static char tbuf[9];
|
||||
static uint8_t tbuf[9];
|
||||
time_t s = (time_t)stamp;
|
||||
strftime(tbuf, sizeof(tbuf), "%H:%M:%S", localtime(&s));
|
||||
return tbuf;
|
||||
@ -247,7 +107,7 @@ static char *
|
||||
hex2ascii (uint8_t * hexChars, uint8_t numBytes)
|
||||
{
|
||||
int count;
|
||||
static char hexString[SEL_OEM_NOTS_DATA_LEN+1]; /*Max Size*/
|
||||
static uint8_t hexString[SEL_OEM_NOTS_DATA_LEN+1]; /*Max Size*/
|
||||
|
||||
if(numBytes > SEL_OEM_NOTS_DATA_LEN)
|
||||
numBytes = SEL_OEM_NOTS_DATA_LEN;
|
||||
@ -270,6 +130,8 @@ ipmi_get_oem(struct ipmi_intf * intf)
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
struct ipm_devid_rsp *devid;
|
||||
uint32_t manufacturer_id;
|
||||
int i;
|
||||
|
||||
if (intf->fd == 0)
|
||||
return IPMI_OEM_UNKNOWN;
|
||||
@ -466,6 +328,7 @@ get_newisys_evt_desc(struct ipmi_intf * intf, struct sel_event_record * rec)
|
||||
return description;
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
ipmi_get_oem_desc(struct ipmi_intf * intf, struct sel_event_record * rec)
|
||||
{
|
||||
@ -476,8 +339,6 @@ ipmi_get_oem_desc(struct ipmi_intf * intf, struct sel_event_record * rec)
|
||||
case IPMI_OEM_NEWISYS:
|
||||
desc = get_newisys_evt_desc(intf, rec);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return desc;
|
||||
@ -883,7 +744,6 @@ ipmi_sel_print_std_entry(struct ipmi_intf * intf, struct sel_event_record * evt)
|
||||
for(data_count=0;data_count < SEL_OEM_NOTS_DATA_LEN;data_count++)
|
||||
printf("%02x", evt->sel_type.oem_nots_type.oem_defined[data_count]);
|
||||
}
|
||||
ipmi_sel_oem_message(evt, 0);
|
||||
printf ("\n");
|
||||
return;
|
||||
}
|
||||
@ -1056,7 +916,6 @@ ipmi_sel_print_std_entry_verbose(struct ipmi_intf * intf, struct sel_event_recor
|
||||
for(data_count=0;data_count < SEL_OEM_NOTS_DATA_LEN;data_count++)
|
||||
printf("%02x", evt->sel_type.oem_nots_type.oem_defined[data_count]);
|
||||
printf(" [%s]\n\n",hex2ascii (evt->sel_type.oem_nots_type.oem_defined, SEL_OEM_NOTS_DATA_LEN));
|
||||
ipmi_sel_oem_message(evt, 1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1089,13 +948,12 @@ ipmi_sel_print_extended_entry_verbose(struct ipmi_intf * intf, struct sel_event_
|
||||
{
|
||||
struct sdr_record_list * sdr;
|
||||
char * description;
|
||||
int data_count;
|
||||
|
||||
if (!evt)
|
||||
return;
|
||||
|
||||
sdr = ipmi_sdr_find_sdr_bynumtype(intf,
|
||||
evt->sel_type.standard_type.sensor_num,
|
||||
evt->sel_type.standard_type.sensor_type);
|
||||
sdr = ipmi_sdr_find_sdr_bynumtype(intf, evt->sel_type.standard_type.sensor_num, evt->sel_type.standard_type.sensor_type);
|
||||
if (sdr == NULL) {
|
||||
ipmi_sel_print_std_entry_verbose(intf, evt);
|
||||
return;
|
||||
@ -1474,7 +1332,7 @@ ipmi_sel_get_time(struct ipmi_intf * intf)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
static char tbuf[40];
|
||||
static uint8_t tbuf[40];
|
||||
uint32_t timei;
|
||||
time_t time;
|
||||
|
||||
@ -1639,7 +1497,7 @@ ipmi_sel_delete(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
msg_data[0] = id & 0xff;
|
||||
msg_data[1] = id >> 8;
|
||||
|
||||
for (; argc != 0; argc--)
|
||||
for (argc; argc != 0; argc--)
|
||||
{
|
||||
id = atoi(argv[argc-1]);
|
||||
msg_data[2] = id & 0xff;
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -102,8 +106,7 @@ ipmi_sensor_print_full_discrete(struct ipmi_intf *intf,
|
||||
*/
|
||||
rsp = ipmi_sdr_get_sensor_reading_ipmb(intf,
|
||||
sensor->keys.sensor_num,
|
||||
sensor->keys.owner_id,
|
||||
sensor->keys.lun);
|
||||
sensor->keys.owner_id);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error reading sensor %s (#%02x)",
|
||||
id, sensor->keys.sensor_num);
|
||||
@ -182,8 +185,7 @@ ipmi_sensor_print_full_analog(struct ipmi_intf *intf,
|
||||
*/
|
||||
rsp = ipmi_sdr_get_sensor_reading_ipmb(intf,
|
||||
sensor->keys.sensor_num,
|
||||
sensor->keys.owner_id,
|
||||
sensor->keys.lun);
|
||||
sensor->keys.owner_id);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error reading sensor %s (#%02x)",
|
||||
id, sensor->keys.sensor_num);
|
||||
@ -419,8 +421,7 @@ ipmi_sensor_print_compact(struct ipmi_intf *intf,
|
||||
*/
|
||||
rsp = ipmi_sdr_get_sensor_reading_ipmb(intf,
|
||||
sensor->keys.sensor_num,
|
||||
sensor->keys.owner_id,
|
||||
sensor->keys.lun);
|
||||
sensor->keys.owner_id);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error reading sensor %s (#%02x)",
|
||||
id, sensor->keys.sensor_num);
|
||||
@ -730,73 +731,6 @@ ipmi_sensor_set_threshold(struct ipmi_intf *intf, int argc, char **argv)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_sensor_get_reading(struct ipmi_intf *intf, int argc, char **argv)
|
||||
{
|
||||
struct sdr_record_list *sdr;
|
||||
struct ipmi_rs *rsp;
|
||||
int i, rc=0;
|
||||
double val = 0.0;
|
||||
|
||||
if (argc < 1 || strncmp(argv[0], "help", 4) == 0) {
|
||||
lprintf(LOG_NOTICE, "sensor reading <id> ... [id]");
|
||||
lprintf(LOG_NOTICE, " id : name of desired sensor");
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < argc; i++) {
|
||||
sdr = ipmi_sdr_find_sdr_byid(intf, argv[i]);
|
||||
if (sdr == NULL) {
|
||||
lprintf(LOG_ERR, "Sensor \"%s\" not found!",
|
||||
argv[i]);
|
||||
rc = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (sdr->type) {
|
||||
case SDR_RECORD_TYPE_FULL_SENSOR:
|
||||
if (sdr->record.full->linearization >= SDR_SENSOR_L_NONLINEAR) {
|
||||
lprintf(LOG_ERR, "Sensor \"%s\" non-linear!", argv[i]);
|
||||
continue;
|
||||
}
|
||||
rsp = ipmi_sdr_get_sensor_reading_ipmb(intf,
|
||||
sdr->record.full->keys.sensor_num,
|
||||
sdr->record.full->keys.owner_id,
|
||||
sdr->record.full->keys.lun);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Error reading sensor \"%s\"", argv[i]);
|
||||
rc = -1;
|
||||
continue;
|
||||
} else if (rsp->ccode > 0) {
|
||||
continue;
|
||||
} else if (rsp->data[1] & READING_UNAVAILABLE) {
|
||||
continue;
|
||||
} else if (rsp->data[0] > 0) {
|
||||
/* convert RAW reading into units */
|
||||
val = sdr_convert_sensor_reading(sdr->record.full, rsp->data[0]);
|
||||
} else {
|
||||
val = 0.0;
|
||||
}
|
||||
|
||||
if (csv_output)
|
||||
printf("%s,%.*f\n", argv[i],
|
||||
(val == (int)val) ? 0 : 3, val);
|
||||
else
|
||||
printf("%-16s | %.*f\n", argv[i],
|
||||
(val == (int)val) ? 0 : 3, val);
|
||||
|
||||
break;
|
||||
|
||||
case SDR_RECORD_TYPE_COMPACT_SENSOR:
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_sensor_get(struct ipmi_intf *intf, int argc, char **argv)
|
||||
{
|
||||
@ -866,15 +800,13 @@ ipmi_sensor_main(struct ipmi_intf *intf, int argc, char **argv)
|
||||
if (argc == 0) {
|
||||
rc = ipmi_sensor_list(intf);
|
||||
} else if (strncmp(argv[0], "help", 4) == 0) {
|
||||
lprintf(LOG_NOTICE, "Sensor Commands: list thresh get reading");
|
||||
lprintf(LOG_NOTICE, "Sensor Commands: list thresh get");
|
||||
} else if (strncmp(argv[0], "list", 4) == 0) {
|
||||
rc = ipmi_sensor_list(intf);
|
||||
} else if (strncmp(argv[0], "thresh", 5) == 0) {
|
||||
rc = ipmi_sensor_set_threshold(intf, argc - 1, &argv[1]);
|
||||
} else if (strncmp(argv[0], "get", 3) == 0) {
|
||||
rc = ipmi_sensor_get(intf, argc - 1, &argv[1]);
|
||||
} else if (strncmp(argv[0], "reading", 7) == 0) {
|
||||
rc = ipmi_sensor_get_reading(intf, argc - 1, &argv[1]);
|
||||
} else {
|
||||
lprintf(LOG_ERR, "Invalid sensor command: %s", argv[0]);
|
||||
rc = -1;
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -42,15 +46,8 @@
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_TERMIOS_H)
|
||||
# include <termios.h>
|
||||
#elif defined (HAVE_SYS_TERMIOS_H)
|
||||
# include <sys/termios.h>
|
||||
#endif
|
||||
#include <termios.h>
|
||||
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/log.h>
|
||||
@ -91,7 +88,6 @@ static int _in_raw_mode = 0;
|
||||
|
||||
extern int verbose;
|
||||
|
||||
static uint8_t G_u8ActiveSOL = 0;
|
||||
|
||||
/*
|
||||
* ipmi_get_sol_info
|
||||
@ -106,7 +102,7 @@ ipmi_get_sol_info(
|
||||
struct ipmi_rq req;
|
||||
uint8_t data[4];
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_TRANSPORT;
|
||||
req.msg.cmd = IMPI_GET_SOL_CONFIG_PARAMETERS;
|
||||
req.msg.data_len = 4;
|
||||
@ -1208,7 +1204,7 @@ processSolUserInput(
|
||||
continue;
|
||||
|
||||
case 'B':
|
||||
printf("%cB [send break]\r\n",
|
||||
printf("%cb [send break]\r\n",
|
||||
intf->session->sol_escape_char);
|
||||
sendBreak(intf);
|
||||
continue;
|
||||
@ -1250,27 +1246,20 @@ processSolUserInput(
|
||||
*/
|
||||
if (length)
|
||||
{
|
||||
struct ipmi_rs * rsp = NULL;
|
||||
int try = 0;
|
||||
|
||||
while (try < intf->session->retry) {
|
||||
struct ipmi_rs * rsp;
|
||||
|
||||
v2_payload.payload.sol_packet.character_count = length;
|
||||
rsp = intf->send_sol(intf, &v2_payload);
|
||||
|
||||
if (rsp)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
usleep(5000);
|
||||
try++;
|
||||
}
|
||||
v2_payload.payload.sol_packet.character_count = length;
|
||||
rsp = intf->send_sol(intf, &v2_payload);
|
||||
|
||||
if (! rsp)
|
||||
{
|
||||
lprintf(LOG_ERR, "Error sending SOL data: FAIL");
|
||||
retval = -1;
|
||||
rsp = intf->send_sol(intf, &v2_payload);
|
||||
lprintf(LOG_ERR, "Error sending SOL data: RETRY");
|
||||
if (! rsp)
|
||||
{
|
||||
lprintf(LOG_ERR, "Error sending SOL data: FAIL");
|
||||
retval = -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* If the sequence number is set we know we have new data */
|
||||
@ -1285,20 +1274,17 @@ processSolUserInput(
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static void
|
||||
ipmi_sol_keepalive(struct ipmi_intf * intf)
|
||||
{
|
||||
struct timeval end;
|
||||
int ret = 0;
|
||||
|
||||
gettimeofday(&end, 0);
|
||||
|
||||
if (end.tv_sec - _start_keepalive.tv_sec > SOL_KEEPALIVE_TIMEOUT) {
|
||||
ret = intf->keepalive(intf);
|
||||
intf->keepalive(intf);
|
||||
gettimeofday(&_start_keepalive, 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@ -1317,7 +1303,6 @@ ipmi_sol_red_pill(struct ipmi_intf * intf)
|
||||
struct timeval tv;
|
||||
int retval;
|
||||
int buffer_size = intf->session->sol_data.max_inbound_payload_size;
|
||||
int keepAliveRet = 0;
|
||||
|
||||
buffer = (char*)malloc(buffer_size);
|
||||
if (buffer == NULL) {
|
||||
@ -1337,13 +1322,7 @@ ipmi_sol_red_pill(struct ipmi_intf * intf)
|
||||
FD_SET(intf->fd, &read_fds);
|
||||
|
||||
/* Send periodic keepalive packet */
|
||||
keepAliveRet = ipmi_sol_keepalive(intf);
|
||||
if (keepAliveRet != 0)
|
||||
{
|
||||
/* no response to keepalive message */
|
||||
bShouldExit = 1;
|
||||
continue;
|
||||
}
|
||||
ipmi_sol_keepalive(intf);
|
||||
|
||||
/* Wait up to half a second */
|
||||
tv.tv_sec = 0;
|
||||
@ -1373,7 +1352,7 @@ ipmi_sol_red_pill(struct ipmi_intf * intf)
|
||||
|
||||
if (numRead > 0)
|
||||
{
|
||||
int rc = processSolUserInput(intf, (uint8_t *)buffer, numRead);
|
||||
int rc = processSolUserInput(intf, buffer, numRead);
|
||||
|
||||
if (rc)
|
||||
{
|
||||
@ -1418,14 +1397,6 @@ ipmi_sol_red_pill(struct ipmi_intf * intf)
|
||||
|
||||
leave_raw_mode();
|
||||
|
||||
if (keepAliveRet != 0)
|
||||
{
|
||||
lprintf(LOG_ERR, "Error: No response to keepalive - Terminating session");
|
||||
/* attempt to clean up anyway */
|
||||
ipmi_sol_deactivate(intf);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (bBmcClosedSession)
|
||||
{
|
||||
lprintf(LOG_ERR, "SOL session closed by BMC");
|
||||
@ -1444,7 +1415,7 @@ ipmi_sol_red_pill(struct ipmi_intf * intf)
|
||||
* impi_sol_activate
|
||||
*/
|
||||
static int
|
||||
ipmi_sol_activate(struct ipmi_intf * intf, int looptest, int interval)
|
||||
ipmi_sol_activate(struct ipmi_intf * intf)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
@ -1486,18 +1457,12 @@ ipmi_sol_activate(struct ipmi_intf * intf, int looptest, int interval)
|
||||
data[2] = bSolEncryption? 0x80 : 0;
|
||||
data[2] |= bSolAuthentication? 0x40 : 0;
|
||||
data[2] |= IPMI_SOL_SERIAL_ALERT_MASK_DEFERRED;
|
||||
|
||||
if (ipmi_oem_active(intf, "intelplus")) {
|
||||
data[2] |= IPMI_SOL_BMC_ASSERTS_CTS_MASK_TRUE;
|
||||
} else {
|
||||
data[2] |= IPMI_SOL_BMC_ASSERTS_CTS_MASK_FALSE;
|
||||
}
|
||||
data[2] |= IPMI_SOL_BMC_ASSERTS_CTS_MASK_FALSE;
|
||||
|
||||
data[3] = 0x00; /* reserved */
|
||||
data[4] = 0x00; /* reserved */
|
||||
data[5] = 0x00; /* reserved */
|
||||
|
||||
G_u8ActiveSOL = 1;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
|
||||
if (NULL != rsp) {
|
||||
@ -1587,12 +1552,6 @@ ipmi_sol_activate(struct ipmi_intf * intf, int looptest, int interval)
|
||||
printf("[SOL Session operational. Use %c? for help]\r\n",
|
||||
intf->session->sol_escape_char);
|
||||
|
||||
if(looptest == 1)
|
||||
{
|
||||
ipmi_sol_deactivate(intf);
|
||||
usleep(interval*1000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* At this point we are good to go with our SOL session. We
|
||||
@ -1621,7 +1580,6 @@ print_sol_usage(void)
|
||||
lprintf(LOG_NOTICE, " set <parameter> <value> [channel]");
|
||||
lprintf(LOG_NOTICE, " activate");
|
||||
lprintf(LOG_NOTICE, " deactivate");
|
||||
lprintf(LOG_NOTICE, " looptest [<loop times>] [<loop interval(in ms)>]");
|
||||
}
|
||||
|
||||
|
||||
@ -1713,7 +1671,7 @@ ipmi_sol_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
* Activate
|
||||
*/
|
||||
else if (!strncmp(argv[0], "activate", 8))
|
||||
retval = ipmi_sol_activate(intf, 0, 0);
|
||||
retval = ipmi_sol_activate(intf);
|
||||
|
||||
/*
|
||||
* Dectivate
|
||||
@ -1722,43 +1680,6 @@ ipmi_sol_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
retval = ipmi_sol_deactivate(intf);
|
||||
|
||||
|
||||
/*
|
||||
* SOL loop test: Activate and then Dectivate
|
||||
*/
|
||||
else if (!strncmp(argv[0], "looptest", 8))
|
||||
{
|
||||
int cnt = 200;
|
||||
int interval = 100; /* Unit is: ms */
|
||||
|
||||
if(argc > 3)
|
||||
{
|
||||
print_sol_usage();
|
||||
return -1;
|
||||
}
|
||||
if (argc != 1) /* at least 2 */
|
||||
{
|
||||
cnt = strtol(argv[1], NULL, 10);
|
||||
if(cnt <= 0) cnt = 200;
|
||||
}
|
||||
if (argc == 3)
|
||||
{
|
||||
interval = strtol(argv[2], NULL, 10);
|
||||
if(interval < 0) interval = 0;
|
||||
}
|
||||
|
||||
while(cnt > 0)
|
||||
{
|
||||
printf("remain loop test counter: %d\n", cnt);
|
||||
retval = ipmi_sol_activate(intf, 1, interval);
|
||||
if(retval)
|
||||
{
|
||||
printf("SOL looptest failed: %d\n", retval);
|
||||
break;
|
||||
}
|
||||
cnt -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
print_sol_usage();
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -58,7 +62,7 @@ static const struct valstr sunoem_led_type_vals[] = {
|
||||
{ 1, "SERVICE" },
|
||||
{ 2, "ACT" },
|
||||
{ 3, "LOCATE" },
|
||||
{ 0xFF, NULL },
|
||||
{ 0, NULL },
|
||||
};
|
||||
|
||||
static const struct valstr sunoem_led_mode_vals[] = {
|
||||
@ -78,8 +82,6 @@ static const struct valstr sunoem_led_mode_optvals[] = {
|
||||
{ 0xFF, NULL },
|
||||
};
|
||||
|
||||
int is_sbcmd = 0;
|
||||
|
||||
static void
|
||||
ipmi_sunoem_usage(void)
|
||||
{
|
||||
@ -102,14 +104,6 @@ ipmi_sunoem_usage(void)
|
||||
lprintf(LOG_NOTICE, " led set <sensorid> <ledmode> [ledtype]");
|
||||
lprintf(LOG_NOTICE, " Set mode of LED found in Generic Device Locator.");
|
||||
lprintf(LOG_NOTICE, "");
|
||||
lprintf(LOG_NOTICE, " sbled get <sensorid> [ledtype]");
|
||||
lprintf(LOG_NOTICE, " Read status of LED found in Generic Device Locator");
|
||||
lprintf(LOG_NOTICE, " for Sun Blade Modular Systems.");
|
||||
lprintf(LOG_NOTICE, "");
|
||||
lprintf(LOG_NOTICE, " sbled set <sensorid> <ledmode> [ledtype]");
|
||||
lprintf(LOG_NOTICE, " Set mode of LED found in Generic Device Locator");
|
||||
lprintf(LOG_NOTICE, " for Sun Blade Modular Systems.");
|
||||
lprintf(LOG_NOTICE, "");
|
||||
lprintf(LOG_NOTICE, " Use 'sdr list generic' command to get list of Generic");
|
||||
lprintf(LOG_NOTICE, " Devices that are controllable LEDs.");
|
||||
lprintf(LOG_NOTICE, "");
|
||||
@ -196,34 +190,21 @@ sunoem_led_get(struct ipmi_intf * intf,
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t rqdata[7];
|
||||
int rqdata_len = 5;
|
||||
uint8_t rqdata[5];
|
||||
|
||||
if (dev == NULL)
|
||||
return NULL;
|
||||
|
||||
rqdata[0] = dev->dev_slave_addr;
|
||||
if (ledtype == 0xFF)
|
||||
rqdata[1] = dev->oem;
|
||||
else
|
||||
rqdata[1] = ledtype;
|
||||
rqdata[1] = ledtype;
|
||||
rqdata[2] = dev->dev_access_addr;
|
||||
rqdata[3] = dev->oem;
|
||||
if (is_sbcmd) {
|
||||
rqdata[4] = dev->entity.id;
|
||||
rqdata[5] = dev->entity.instance;
|
||||
rqdata[6] = 0;
|
||||
rqdata_len = 7;
|
||||
}
|
||||
else {
|
||||
rqdata[4] = 0;
|
||||
}
|
||||
rqdata[4] = 0;
|
||||
|
||||
req.msg.netfn = IPMI_NETFN_SUNOEM;
|
||||
req.msg.cmd = IPMI_SUNOEM_LED_GET;
|
||||
req.msg.lun = dev->lun;
|
||||
req.msg.data = rqdata;
|
||||
req.msg.data_len = rqdata_len;
|
||||
req.msg.data_len = 5;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
@ -246,37 +227,23 @@ sunoem_led_set(struct ipmi_intf * intf,
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t rqdata[9];
|
||||
int rqdata_len = 7;
|
||||
uint8_t rqdata[7];
|
||||
|
||||
if (dev == NULL)
|
||||
return NULL;
|
||||
|
||||
rqdata[0] = dev->dev_slave_addr;
|
||||
if (ledtype == 0xFF)
|
||||
rqdata[1] = dev->oem;
|
||||
else
|
||||
rqdata[1] = ledtype;
|
||||
rqdata[1] = ledtype;
|
||||
rqdata[2] = dev->dev_access_addr;
|
||||
rqdata[3] = dev->oem;
|
||||
rqdata[4] = ledmode;
|
||||
if (is_sbcmd) {
|
||||
rqdata[5] = dev->entity.id;
|
||||
rqdata[6] = dev->entity.instance;
|
||||
rqdata[7] = 0;
|
||||
rqdata[8] = 0;
|
||||
rqdata_len = 9;
|
||||
}
|
||||
else {
|
||||
rqdata[5] = 0;
|
||||
rqdata[6] = 0;
|
||||
}
|
||||
rqdata[5] = 0;
|
||||
rqdata[6] = 0;
|
||||
|
||||
req.msg.netfn = IPMI_NETFN_SUNOEM;
|
||||
req.msg.cmd = IPMI_SUNOEM_LED_SET;
|
||||
req.msg.lun = dev->lun;
|
||||
req.msg.data = rqdata;
|
||||
req.msg.data_len = rqdata_len;
|
||||
req.msg.data_len = 7;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
@ -366,13 +333,6 @@ sunoem_led_set_byentity(struct ipmi_intf * intf, uint8_t entity_id,
|
||||
* [byte 4] force 1 = directly access the device
|
||||
* 0 = go thru its controller
|
||||
* Ignored if LED is local
|
||||
*
|
||||
* The format below is for Sun Blade Modular systems only
|
||||
* [byte 4] entityID The entityID field from the SDR record
|
||||
* [byte 5] entityIns The entityIns field from the SDR record
|
||||
* [byte 6] force 1 = directly access the device
|
||||
* 0 = go thru its controller
|
||||
* Ignored if LED is local
|
||||
*/
|
||||
static int
|
||||
ipmi_sunoem_led_get(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
@ -381,22 +341,20 @@ ipmi_sunoem_led_get(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
struct sdr_record_list *sdr;
|
||||
struct sdr_record_list *alist, *a;
|
||||
struct sdr_record_entity_assoc *assoc;
|
||||
int ledtype = 0xFF;
|
||||
int ledtype = 0;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* sunoem led/sbled get <id> [type]
|
||||
* sunoem led get <id> [type]
|
||||
*/
|
||||
|
||||
if (argc < 1 || strncmp(argv[0], "help", 4) == 0) {
|
||||
ipmi_sunoem_usage();
|
||||
lprintf(LOG_NOTICE, "usage: sunoem led get <id> [type]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (argc > 1) {
|
||||
ledtype = str2val(argv[1], sunoem_led_type_vals);
|
||||
if (ledtype == 0xFF)
|
||||
lprintf(LOG_ERR, "Unknow ledtype, will use data from the SDR oem field");
|
||||
}
|
||||
|
||||
if (strncasecmp(argv[0], "all", 3) == 0) {
|
||||
@ -513,14 +471,6 @@ ipmi_sunoem_led_get(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
* Ignored if LED is local
|
||||
* [byte 6] role Used by BMC for authorization purposes
|
||||
*
|
||||
* The format below is for Sun Blade Modular systems only
|
||||
* [byte 5] entityID The entityID field from the SDR record
|
||||
* [byte 6] entityIns The entityIns field from the SDR record
|
||||
* [byte 7] force TRUE - directly access the device
|
||||
* FALSE - go thru its controller
|
||||
* Ignored if LED is local
|
||||
* [byte 8] role Used by BMC for authorization purposes
|
||||
*
|
||||
*
|
||||
* IPMI Response Data: 1 byte
|
||||
*
|
||||
@ -535,11 +485,11 @@ ipmi_sunoem_led_set(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
struct sdr_record_list *alist, *a;
|
||||
struct sdr_record_entity_assoc *assoc;
|
||||
int ledmode;
|
||||
int ledtype = 0xFF;
|
||||
int ledtype = 0;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* sunoem led/sbled set <id> <mode> [type]
|
||||
* sunoem led set <id> <mode> [type]
|
||||
*/
|
||||
|
||||
if (argc < 2 || strncmp(argv[0], "help", 4) == 0) {
|
||||
@ -558,8 +508,6 @@ ipmi_sunoem_led_set(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
|
||||
if (argc > 3) {
|
||||
ledtype = str2val(argv[2], sunoem_led_type_vals);
|
||||
if (ledtype == 0xFF)
|
||||
lprintf(LOG_ERR, "Unknow ledtype, will use data from the SDR oem field");
|
||||
}
|
||||
|
||||
if (strncasecmp(argv[0], "all", 3) == 0) {
|
||||
@ -791,14 +739,11 @@ ipmi_sunoem_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
}
|
||||
}
|
||||
|
||||
if ((strncmp(argv[0], "led", 3) == 0) || (strncmp(argv[0], "sbled", 5) == 0)) {
|
||||
if (strncmp(argv[0], "led", 3) == 0) {
|
||||
if (argc < 2) {
|
||||
ipmi_sunoem_usage();
|
||||
return -1;
|
||||
}
|
||||
if (strncmp(argv[0], "sbled", 5) == 0) {
|
||||
is_sbcmd = 1;
|
||||
}
|
||||
if (strncmp(argv[1], "get", 3) == 0) {
|
||||
if (argc < 3) {
|
||||
char * arg[] = { "all" };
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -47,15 +51,10 @@
|
||||
|
||||
#include <sys/select.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_TERMIOS_H)
|
||||
# include <termios.h>
|
||||
#elif defined (HAVE_SYS_TERMIOS_H)
|
||||
|
||||
#ifdef __linux__
|
||||
# include <linux/termios.h>
|
||||
#else
|
||||
# include <sys/termios.h>
|
||||
#endif
|
||||
|
||||
@ -67,14 +66,14 @@
|
||||
#include <ipmitool/ipmi_strings.h>
|
||||
#include <ipmitool/bswap.h>
|
||||
|
||||
#include <config.h>
|
||||
|
||||
static struct timeval _start_keepalive;
|
||||
static struct termios _saved_tio;
|
||||
static struct winsize _saved_winsize;
|
||||
static int _in_raw_mode = 0;
|
||||
static int _altterm = 0;
|
||||
|
||||
extern int verbose;
|
||||
|
||||
static int
|
||||
ipmi_tsol_command(struct ipmi_intf * intf, char *recvip, int port, unsigned char cmd)
|
||||
{
|
||||
@ -82,25 +81,31 @@ ipmi_tsol_command(struct ipmi_intf * intf, char *recvip, int port, unsigned char
|
||||
struct ipmi_rq req;
|
||||
unsigned char data[6];
|
||||
unsigned ip1, ip2, ip3, ip4;
|
||||
uint16_t portin;
|
||||
|
||||
#if WORDS_BIGENDIAN
|
||||
portin = BSWAP_16(port);
|
||||
#else
|
||||
portin = port;
|
||||
#endif
|
||||
|
||||
if (sscanf(recvip, "%d.%d.%d.%d", &ip1, &ip2, &ip3, &ip4) != 4) {
|
||||
lprintf(LOG_ERR, "Invalid IP address: %s", recvip);
|
||||
return -1;
|
||||
}
|
||||
|
||||
memset(&req, 0, sizeof(struct ipmi_rq));
|
||||
req.msg.netfn = IPMI_NETFN_TSOL;
|
||||
req.msg.cmd = cmd;
|
||||
req.msg.data_len = 6;
|
||||
req.msg.data = data;
|
||||
|
||||
memset(data, 0, sizeof(data));
|
||||
data[0] = ip1;
|
||||
data[1] = ip2;
|
||||
data[0] = ip1;
|
||||
data[1] = ip2;
|
||||
data[2] = ip3;
|
||||
data[3] = ip4;
|
||||
data[4] = (port & 0xff00) >> 8;
|
||||
data[5] = (port & 0xff);
|
||||
data[4] = (portin & 0xff00) >> 8;
|
||||
data[5] = (portin & 0xff);
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
@ -128,15 +133,14 @@ ipmi_tsol_stop(struct ipmi_intf * intf, char *recvip, int port)
|
||||
return ipmi_tsol_command(intf, recvip, port, IPMI_TSOL_CMD_STOP);
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
ipmi_tsol_send_keystroke(struct ipmi_intf * intf, char *buff, int length)
|
||||
{
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
unsigned char data[16];
|
||||
static unsigned char keyseq = 0;
|
||||
|
||||
memset(&req, 0, sizeof(struct ipmi_rq));
|
||||
|
||||
req.msg.netfn = IPMI_NETFN_TSOL;
|
||||
req.msg.cmd = IPMI_TSOL_CMD_SENDKEY;
|
||||
req.msg.data_len = length + 2;
|
||||
@ -146,28 +150,26 @@ ipmi_tsol_send_keystroke(struct ipmi_intf * intf, char *buff, int length)
|
||||
data[0] = length + 1;
|
||||
memcpy(data + 1, buff, length);
|
||||
data[length + 1] = keyseq++;
|
||||
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (verbose) {
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to send keystroke");
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Unable to send keystroke: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to send keystroke");
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Unable to send keystroke: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
return length;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
tsol_keepalive(struct ipmi_intf * intf)
|
||||
{
|
||||
struct timeval end;
|
||||
|
||||
|
||||
gettimeofday(&end, 0);
|
||||
|
||||
if (end.tv_sec - _start_keepalive.tv_sec <= 30)
|
||||
@ -361,7 +363,7 @@ static void
|
||||
print_tsol_usage(void)
|
||||
{
|
||||
struct winsize winsize;
|
||||
|
||||
|
||||
lprintf(LOG_NOTICE, "Usage: tsol [recvip] [port=NUM] [ro|rw] [rows=NUM] [cols=NUM] [altterm]");
|
||||
lprintf(LOG_NOTICE, " recvip Receiver IP Address [default=local]");
|
||||
lprintf(LOG_NOTICE, " port=NUM Receiver UDP Port [default=%d]",
|
||||
@ -383,6 +385,7 @@ ipmi_tsol_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
struct pollfd fds_wait[3], fds_data_wait[3], *fds;
|
||||
struct sockaddr_in sin, myaddr;
|
||||
socklen_t mylen;
|
||||
char recvip_c[] = "0.0.0.0";
|
||||
char *recvip = NULL;
|
||||
char out_buff[IPMI_BUF_SIZE * 8], in_buff[IPMI_BUF_SIZE];
|
||||
char buff[IPMI_BUF_SIZE + 4];
|
||||
@ -422,7 +425,7 @@ ipmi_tsol_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
}
|
||||
}
|
||||
|
||||
/* create udp socket to receive the packet */
|
||||
/* create udp socket to receive the packet */
|
||||
memset(&sin, 0, sizeof(sin));
|
||||
sin.sin_family = AF_INET;
|
||||
sin.sin_port = htons(port);
|
||||
@ -476,7 +479,7 @@ ipmi_tsol_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
enter_raw_mode();
|
||||
|
||||
/*
|
||||
* talk to smdc to start Console redirect - IP address and port as parameter
|
||||
* talk to smdc to start Console redirect - IP address and port as parameter
|
||||
* ipmitool -I lan -H 192.168.168.227 -U Administrator raw 0x30 0x06 0xC0 0xA8 0xA8 0x78 0x1A 0x0A
|
||||
*/
|
||||
result = ipmi_tsol_start(intf, recvip, port);
|
||||
@ -488,7 +491,7 @@ ipmi_tsol_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
printf("[SOL Session operational. Use %c? for help]\r\n",
|
||||
intf->session->sol_escape_char);
|
||||
|
||||
gettimeofday(&_start_keepalive, 0);
|
||||
gettimeofday(&_start_keepalive, 0);
|
||||
|
||||
fds_wait[0].fd = fd_socket;
|
||||
fds_wait[0].events = POLLIN;
|
||||
@ -499,7 +502,7 @@ ipmi_tsol_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
fds_wait[2].fd = -1;
|
||||
fds_wait[2].events = 0;
|
||||
fds_wait[2].revents = 0;
|
||||
|
||||
|
||||
fds_data_wait[0].fd = fd_socket;
|
||||
fds_data_wait[0].events = POLLIN | POLLOUT;
|
||||
fds_data_wait[0].revents = 0;
|
||||
@ -509,11 +512,11 @@ ipmi_tsol_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
fds_data_wait[2].fd = fileno(stdout);
|
||||
fds_data_wait[2].events = POLLOUT;
|
||||
fds_data_wait[2].revents = 0;
|
||||
|
||||
|
||||
out_buff_fill = 0;
|
||||
in_buff_fill = 0;
|
||||
fds = fds_wait;
|
||||
|
||||
|
||||
for (;;) {
|
||||
result = poll(fds, 3, 15*1000);
|
||||
if (result < 0)
|
||||
@ -552,7 +555,7 @@ ipmi_tsol_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
do_terminal_cleanup();
|
||||
return result;
|
||||
}
|
||||
if (read_only)
|
||||
if (read_only)
|
||||
bytes = 0;
|
||||
in_buff_fill += bytes;
|
||||
}
|
||||
@ -568,7 +571,7 @@ ipmi_tsol_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
}
|
||||
if ((fds[0].revents & POLLOUT) && in_buff_fill) {
|
||||
/*
|
||||
* translate key and send that to SMDC using IPMI
|
||||
* translate key and send that to SMDC using IPMI
|
||||
* ipmitool -I lan -H 192.168.168.227 -U Administrator raw 0x30 0x03 0x04 0x1B 0x5B 0x43
|
||||
*/
|
||||
result = ipmi_tsol_send_keystroke(intf, in_buff, __min(in_buff_fill,14));
|
||||
@ -580,9 +583,9 @@ ipmi_tsol_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
}
|
||||
}
|
||||
}
|
||||
fds = (in_buff_fill || out_buff_fill )?
|
||||
fds = (in_buff_fill || out_buff_fill )?
|
||||
fds_data_wait : fds_wait;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -326,7 +330,7 @@ ipmi_user_set_username(
|
||||
/* The channel number will remain constant throughout this function */
|
||||
msg_data[0] = user_id;
|
||||
memset(msg_data + 1, 0, 16);
|
||||
strcpy((char *)(msg_data + 1), name);
|
||||
strcpy(msg_data + 1, name);
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
|
||||
@ -354,7 +358,7 @@ ipmi_user_set_userpriv(
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t msg_data[3];
|
||||
uint8_t msg_data[17];
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_APP; /* 0x06 */
|
||||
@ -404,11 +408,11 @@ ipmi_user_set_password(
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t * msg_data;
|
||||
char * msg_data;
|
||||
|
||||
int password_length = (is_twenty_byte_password? 20 : 16);
|
||||
|
||||
msg_data = (uint8_t*)malloc(password_length + 2);
|
||||
msg_data = (char*)malloc(password_length + 2);
|
||||
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
@ -429,7 +433,7 @@ ipmi_user_set_password(
|
||||
memset(msg_data + 2, 0, password_length);
|
||||
|
||||
if (password != NULL)
|
||||
strncpy((char *)(msg_data + 2), password, password_length);
|
||||
strncpy(msg_data + 2, password, password_length);
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
@ -27,6 +27,10 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
SUBDIRS = plugins
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -40,28 +44,23 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <signal.h>
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PATHS_H
|
||||
#ifdef __FreeBSD__
|
||||
# include <signal.h>
|
||||
# include <paths.h>
|
||||
#else
|
||||
# define _PATH_VARRUN "/var/run/"
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef IPMI_INTF_OPEN
|
||||
# if defined(HAVE_OPENIPMI_H)
|
||||
# ifdef HAVE_OPENIPMI_H
|
||||
# include <linux/compiler.h>
|
||||
# include <linux/ipmi.h>
|
||||
# elif defined(HAVE_FREEBSD_IPMI_H)
|
||||
# include <sys/ipmi.h>
|
||||
# else
|
||||
# include "plugins/open/open.h"
|
||||
# endif
|
||||
# include <sys/poll.h>
|
||||
# else /* HAVE_OPENIPMI_H */
|
||||
# include "plugins/open/open.h"
|
||||
# include <sys/poll.h>
|
||||
# endif /* HAVE_OPENIPMI_H */
|
||||
#endif /* IPMI_INTF_OPEN */
|
||||
|
||||
#include <ipmitool/helper.h>
|
||||
@ -73,9 +72,6 @@
|
||||
#include <ipmitool/ipmi_strings.h>
|
||||
#include <ipmitool/ipmi_main.h>
|
||||
|
||||
#define DEFAULT_PIDFILE _PATH_VARRUN "ipmievd.pid"
|
||||
char pidfile[64];
|
||||
|
||||
/* global variables */
|
||||
int verbose = 0;
|
||||
int csv_output = 0;
|
||||
@ -375,7 +371,7 @@ openipmi_read(struct ipmi_event_intf * eintf)
|
||||
uint8_t data[80];
|
||||
int rv;
|
||||
|
||||
recv.addr = (unsigned char *) &addr;
|
||||
recv.addr = (char *) &addr;
|
||||
recv.addr_len = sizeof(addr);
|
||||
recv.msg.data = data;
|
||||
recv.msg.data_len = sizeof(data);
|
||||
@ -588,28 +584,11 @@ selwatch_wait(struct ipmi_event_intf * eintf)
|
||||
}
|
||||
/*************************************************************************/
|
||||
|
||||
static void
|
||||
ipmievd_cleanup(int signal)
|
||||
{
|
||||
struct stat st1;
|
||||
|
||||
if (lstat(pidfile, &st1) == 0) {
|
||||
/* cleanup daemon pidfile */
|
||||
(void)unlink(pidfile);
|
||||
}
|
||||
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
ipmievd_main(struct ipmi_event_intf * eintf, int argc, char ** argv)
|
||||
{
|
||||
int i, rc;
|
||||
int daemon = 1;
|
||||
struct sigaction act;
|
||||
|
||||
memset(pidfile, 0, 64);
|
||||
strncpy(pidfile, DEFAULT_PIDFILE, strlen(DEFAULT_PIDFILE));
|
||||
|
||||
for (i = 0; i < argc; i++) {
|
||||
if (strncasecmp(argv[i], "help", 4) == 0) {
|
||||
@ -633,51 +612,11 @@ ipmievd_main(struct ipmi_event_intf * eintf, int argc, char ** argv)
|
||||
else if (strncasecmp(argv[i], "timeout=", 8) == 0) {
|
||||
selwatch_timeout = strtoul(argv[i]+8, NULL, 0);
|
||||
}
|
||||
else if (strncasecmp(argv[i], "pidfile=", 8) == 0) {
|
||||
memset(pidfile, 0, 64);
|
||||
strncpy(pidfile, argv[i]+8,
|
||||
__min(strlen((const char *)(argv[i]+8)), 63));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We need to open interface before forking daemon
|
||||
* so error messages are not lost to syslog and
|
||||
* return code is successfully returned to initscript
|
||||
*/
|
||||
if (eintf->intf->open(eintf->intf) < 0) {
|
||||
lprintf(LOG_ERR, "Unable to open interface");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (daemon) {
|
||||
FILE *fp;
|
||||
struct stat st1;
|
||||
|
||||
if (daemon)
|
||||
ipmi_start_daemon();
|
||||
|
||||
if (lstat(pidfile, &st1) == 0) {
|
||||
/* already exists, erase first */
|
||||
if (unlink(pidfile) != 0) {
|
||||
lprintf(LOG_WARN, "Unable to erase pidfile");
|
||||
}
|
||||
}
|
||||
|
||||
fp = ipmi_open_file_write(pidfile);
|
||||
if (fp != NULL) {
|
||||
fprintf(fp, "%d\n", (int)getpid());
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
/* register signal handler for cleanup */
|
||||
act.sa_handler = ipmievd_cleanup;
|
||||
act.sa_flags = 0;
|
||||
sigemptyset(&act.sa_mask);
|
||||
sigaction(SIGINT, &act, NULL);
|
||||
sigaction(SIGQUIT, &act, NULL);
|
||||
sigaction(SIGTERM, &act, NULL);
|
||||
|
||||
log_halt();
|
||||
log_init("ipmievd", daemon, verbose);
|
||||
|
||||
@ -687,7 +626,6 @@ ipmievd_main(struct ipmi_event_intf * eintf, int argc, char ** argv)
|
||||
lprintf(LOG_DEBUG, "Sensors cached");
|
||||
|
||||
/* call event handler setup routine */
|
||||
|
||||
if (eintf->setup != NULL) {
|
||||
rc = eintf->setup(eintf);
|
||||
if (rc < 0) {
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -48,8 +52,8 @@
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#define EXEC_BUF_SIZE 2048
|
||||
#define EXEC_ARG_SIZE 64
|
||||
#define EXEC_BUF_SIZE 1024
|
||||
#define EXEC_ARG_SIZE 32
|
||||
|
||||
extern const struct valstr ipmi_privlvl_vals[];
|
||||
extern const struct valstr ipmi_authtype_session_vals[];
|
||||
@ -92,7 +96,7 @@ static int rl_event_keepalive(void)
|
||||
|
||||
int ipmi_shell_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
{
|
||||
char *ptr, *pbuf, **ap, *__argv[EXEC_ARG_SIZE];
|
||||
char *ptr, *pbuf, **ap, *__argv[20];
|
||||
int __argc, rc=0;
|
||||
|
||||
rl_readline_name = "ipmitool";
|
||||
@ -184,7 +188,7 @@ int ipmi_shell_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
}
|
||||
|
||||
if (**ap != '\0') {
|
||||
if (++ap >= &__argv[EXEC_ARG_SIZE])
|
||||
if (++ap >= &__argv[20])
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -211,7 +215,7 @@ ipmi_shell_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
|
||||
#endif /* HAVE_READLINE */
|
||||
|
||||
void ipmi_echo_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
int ipmi_echo_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -31,6 +31,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
@ -57,7 +61,6 @@
|
||||
#include <ipmitool/ipmi_sunoem.h>
|
||||
#include <ipmitool/ipmi_fwum.h>
|
||||
#include <ipmitool/ipmi_picmg.h>
|
||||
#include <ipmitool/ipmi_kontronoem.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
@ -95,7 +98,6 @@ struct ipmi_cmd ipmitool_cmd_list[] = {
|
||||
{ ipmi_channel_main, "channel", "Configure Management Controller channels" },
|
||||
{ ipmi_session_main, "session", "Print session information" },
|
||||
{ ipmi_sunoem_main, "sunoem", "OEM Commands for Sun servers" },
|
||||
{ ipmi_kontronoem_main, "kontronoem", "OEM Commands for Kontron devices"},
|
||||
{ ipmi_picmg_main, "picmg", "Run a PICMG/ATCA extended cmd"},
|
||||
{ ipmi_fwum_main, "fwum", "Update IPMC using Kontron OEM Firmware Update Manager" },
|
||||
#ifdef HAVE_READLINE
|
||||
|
@ -27,6 +27,10 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
|
@ -27,6 +27,10 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef _IPMI_BMC_H_
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef _BMC_INTF_H
|
||||
|
@ -27,6 +27,10 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -28,14 +28,17 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
#include <ipmitool/ipmi_intf.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_sdr.h>
|
||||
@ -260,12 +263,6 @@ ipmi_intf_session_set_authtype(struct ipmi_intf * intf, uint8_t authtype)
|
||||
if (intf->session == NULL)
|
||||
return;
|
||||
|
||||
/* clear password field if authtype NONE specified */
|
||||
if (authtype == IPMI_SESSION_AUTHTYPE_NONE) {
|
||||
memset(intf->session->authcode, 0, IPMI_AUTHCODE_BUFFER_SIZE);
|
||||
intf->session->password = 0;
|
||||
}
|
||||
|
||||
intf->session->authtype_set = authtype;
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,10 @@
|
||||
# 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.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_ASF_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -176,7 +180,7 @@ uint8_t * ipmi_auth_special(struct ipmi_session * s)
|
||||
memset(&ctx, 0, sizeof(MD5_CTX));
|
||||
|
||||
MD5_Init(&ctx);
|
||||
MD5_Update(&ctx, (const uint8_t *)s->authcode, strlen((const char *)s->authcode));
|
||||
MD5_Update(&ctx, (const uint8_t *)s->authcode, strlen(s->authcode));
|
||||
MD5_Final(md, &ctx);
|
||||
|
||||
for (i=0; i<16; i++)
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_AUTH_H
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -396,10 +400,14 @@ ipmi_lan_poll_recv(struct ipmi_intf * intf)
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq_entry * entry;
|
||||
int x=0, rv;
|
||||
uint8_t ourAddress = intf->my_addr;
|
||||
|
||||
if (ourAddress == 0)
|
||||
ourAddress = IPMI_BMC_SLAVE_ADDR;
|
||||
uint8_t ourAddress = intf->my_addr;
|
||||
|
||||
if(ourAddress == 0)
|
||||
{
|
||||
ourAddress = IPMI_BMC_SLAVE_ADDR;
|
||||
}
|
||||
|
||||
|
||||
|
||||
rsp = ipmi_lan_recv_packet(intf);
|
||||
|
||||
@ -478,19 +486,29 @@ ipmi_lan_poll_recv(struct ipmi_intf * intf)
|
||||
rsp->payload.ipmi_response.cmd);
|
||||
if (entry) {
|
||||
lprintf(LOG_DEBUG+2, "IPMI Request Match found");
|
||||
if ((intf->target_addr != ourAddress) && bridgePossible) {
|
||||
if ((rsp->data_len) &&
|
||||
(rsp->payload.ipmi_response.cmd != 0x34)) {
|
||||
printbuf(&rsp->data[x], rsp->data_len-x,
|
||||
"bridge command response");
|
||||
}
|
||||
if (
|
||||
(intf->target_addr != ourAddress) &&
|
||||
(bridgePossible)
|
||||
)
|
||||
{
|
||||
if(
|
||||
(rsp->data_len) &&
|
||||
(rsp->payload.ipmi_response.cmd != 0x34)
|
||||
)
|
||||
{
|
||||
printbuf(
|
||||
&rsp->data[x],
|
||||
(rsp->data_len-x),
|
||||
"bridge command response");
|
||||
}
|
||||
/* bridged command: lose extra header */
|
||||
if (rsp->payload.ipmi_response.cmd == 0x34) {
|
||||
if (rsp->data_len == 38) {
|
||||
entry->req.msg.cmd = entry->req.msg.target_cmd;
|
||||
rsp = ipmi_lan_recv_packet(intf);
|
||||
continue;
|
||||
}
|
||||
if( rsp->data_len == 38 )
|
||||
{
|
||||
entry->req.msg.cmd = entry->req.msg.target_cmd;
|
||||
rsp = ipmi_lan_recv_packet(intf);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
//x += sizeof(rsp->payload.ipmi_response);
|
||||
if (rsp->data[x-1] != 0)
|
||||
@ -505,7 +523,7 @@ ipmi_lan_poll_recv(struct ipmi_intf * intf)
|
||||
lprintf(LOG_INFO, "IPMI Request Match NOT FOUND");
|
||||
rsp = ipmi_lan_recv_packet(intf);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
@ -564,11 +582,13 @@ ipmi_lan_build_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
||||
struct ipmi_rq_entry * entry;
|
||||
struct ipmi_session * s = intf->session;
|
||||
static int curr_seq = 0;
|
||||
uint8_t ourAddress = intf->my_addr;
|
||||
uint8_t bridgedRequest = 0;
|
||||
|
||||
if (ourAddress == 0)
|
||||
ourAddress = IPMI_BMC_SLAVE_ADDR;
|
||||
uint8_t ourAddress = intf->my_addr;
|
||||
uint8_t bridgedRequest = 0;
|
||||
|
||||
if(ourAddress == 0)
|
||||
{
|
||||
ourAddress = IPMI_BMC_SLAVE_ADDR;
|
||||
}
|
||||
|
||||
if (curr_seq >= 64)
|
||||
curr_seq = 0;
|
||||
@ -576,7 +596,7 @@ ipmi_lan_build_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
||||
entry = ipmi_req_add_entry(intf, req);
|
||||
if (entry == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
len = req->msg.data_len + 29;
|
||||
if (s->active && s->authtype)
|
||||
len += 16;
|
||||
@ -609,15 +629,22 @@ ipmi_lan_build_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
||||
}
|
||||
|
||||
/* message length */
|
||||
if ((intf->target_addr == ourAddress) || !bridgePossible) {
|
||||
if (
|
||||
(intf->target_addr == ourAddress) ||
|
||||
(!bridgePossible)
|
||||
)
|
||||
{
|
||||
msg[len++] = req->msg.data_len + 7;
|
||||
cs = mp = len;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
/* bridged request: encapsulate w/in Send Message */
|
||||
bridgedRequest = 1;
|
||||
bridgedRequest = 1;
|
||||
msg[len++] = req->msg.data_len + 15;
|
||||
cs = mp = len;
|
||||
msg[len++] = IPMI_BMC_SLAVE_ADDR;
|
||||
|
||||
msg[len++] = IPMI_NETFN_APP << 2;
|
||||
tmp = len - cs;
|
||||
msg[len++] = ipmi_csum(msg+cs, tmp);
|
||||
@ -633,16 +660,15 @@ ipmi_lan_build_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
||||
|
||||
/* ipmi message header */
|
||||
msg[len++] = intf->target_addr;
|
||||
msg[len++] = req->msg.netfn << 2 | (req->msg.lun & 3);
|
||||
msg[len++] = req->msg.netfn << 2;
|
||||
tmp = len - cs;
|
||||
msg[len++] = ipmi_csum(msg+cs, tmp);
|
||||
cs = len;
|
||||
if (!bridgedRequest)
|
||||
msg[len++] = IPMI_REMOTE_SWID;
|
||||
|
||||
if (!bridgedRequest)
|
||||
msg[len++] = IPMI_REMOTE_SWID;
|
||||
else /* Bridged message */
|
||||
msg[len++] = intf->my_addr;
|
||||
|
||||
else /* Bridged message */
|
||||
msg[len++] = intf->my_addr;
|
||||
entry->rq_seq = curr_seq++;
|
||||
msg[len++] = entry->rq_seq << 2;
|
||||
msg[len++] = req->msg.cmd;
|
||||
@ -672,11 +698,13 @@ ipmi_lan_build_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
||||
msg[len++] = ipmi_csum(msg+cs, tmp);
|
||||
|
||||
/* bridged request: 2nd checksum */
|
||||
if (bridgedRequest) {
|
||||
if (bridgedRequest)
|
||||
{
|
||||
tmp = len - cs2;
|
||||
msg[len++] = ipmi_csum(msg+cs2, tmp);
|
||||
}
|
||||
|
||||
|
||||
if (s->active) {
|
||||
/*
|
||||
* s->authcode is already copied to msg+ap but some
|
||||
@ -714,17 +742,9 @@ ipmi_lan_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req)
|
||||
struct ipmi_rs * rsp = NULL;
|
||||
int try = 0;
|
||||
|
||||
lprintf(LOG_DEBUG, "ipmi_lan_send_cmd:opened=[%d], open=[%d]",
|
||||
intf->opened, intf->open);
|
||||
|
||||
if (intf->opened == 0 && intf->open != NULL) {
|
||||
if (intf->open(intf) < 0) {
|
||||
lprintf(LOG_ERR,
|
||||
"ipmi_lan_send_cmd failed to open intf");
|
||||
if (intf->open(intf) < 0)
|
||||
return NULL;
|
||||
}
|
||||
lprintf(LOG_DEBUG, "\topened=[%d], open=[%d]",
|
||||
intf->opened, intf->open);
|
||||
}
|
||||
|
||||
entry = ipmi_lan_build_cmd(intf, req);
|
||||
@ -1378,7 +1398,7 @@ int ipmi_lan_open(struct ipmi_intf * intf)
|
||||
if (s->retry == 0)
|
||||
s->retry = IPMI_LAN_RETRY;
|
||||
|
||||
if (s->hostname == NULL || strlen((const char *)s->hostname) == 0) {
|
||||
if (s->hostname == NULL || strlen(s->hostname) == 0) {
|
||||
lprintf(LOG_ERR, "No hostname specified!");
|
||||
return -1;
|
||||
}
|
||||
@ -1390,9 +1410,9 @@ int ipmi_lan_open(struct ipmi_intf * intf)
|
||||
s->addr.sin_family = AF_INET;
|
||||
s->addr.sin_port = htons(s->port);
|
||||
|
||||
rc = inet_pton(AF_INET, (const char *)s->hostname, &s->addr.sin_addr);
|
||||
rc = inet_pton(AF_INET, s->hostname, &s->addr.sin_addr);
|
||||
if (rc <= 0) {
|
||||
struct hostent *host = gethostbyname((const char *)s->hostname);
|
||||
struct hostent *host = gethostbyname(s->hostname);
|
||||
if (host == NULL) {
|
||||
lprintf(LOG_ERR, "Address lookup for %s failed",
|
||||
s->hostname);
|
||||
|
@ -28,6 +28,10 @@
|
||||
* 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.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_LAN_H
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user