mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-07-01 02:03:50 +00:00
Compare commits
1 Commits
IPMITOOL_1
...
IPMITOOL_1
Author | SHA1 | Date | |
---|---|---|---|
ca9d7f702b |
@ -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,34 +1,3 @@
|
||||
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
|
||||
|
||||
version 1.8.5
|
||||
* Add support for settable SOL escape character with -e option
|
||||
* Add support for Kg BMC key for IPMIv2 authentication with -k option
|
||||
* Add support for Tyan IPMIv1.5 SOL with tsol command
|
||||
* Add support for PICMG devices
|
||||
* Add support for OEM SEL event parsing
|
||||
* Add support for command bridging over lan and lanplus interfaces
|
||||
* New 'chassis selftest' command
|
||||
* Many bufxies and patches from contributors
|
||||
|
||||
version 1.8.3
|
||||
* Add support for 'sel readraw' and 'sel writeraw' commands.
|
||||
* Add support for entering NetFn as a string for RAW commands.
|
||||
|
@ -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.7])
|
||||
AM_INIT_AUTOMAKE([ipmitool], [1.8.5])
|
||||
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],
|
||||
@ -312,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
|
||||
|
||||
|
@ -2,7 +2,7 @@ Name: ipmitool
|
||||
Summary: ipmitool - Utility for IPMI control
|
||||
Version: @VERSION@
|
||||
Release: 1%{?_distro:.%{_distro}}
|
||||
License: BSD
|
||||
Copyright: BSD
|
||||
Group: Utilities
|
||||
Packager: Duncan Laurie <duncan@iceblink.org>
|
||||
Source: ipmitool-@VERSION@.tar.gz
|
||||
@ -62,27 +62,7 @@ rm -rf $RPM_BUILD_DIR/ipmitool-@VERSION@
|
||||
%doc %{_datadir}/doc/ipmitool/*
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
* Sat Jan 14 2006 <duncan@iceblink.org> 1.8.5-1
|
||||
* Sat Jan 14, 2006 <duncan@iceblink.org> 1.8.5-1
|
||||
- Raise privilege level after creating IPMIv2 session
|
||||
- Add support for settable SOL escape character with -e option
|
||||
- Add support for Kg BMC key for IPMIv2 authentication with -k option
|
||||
|
@ -1,33 +1,3 @@
|
||||
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,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
|
@ -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"
|
||||
@ -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>]
|
||||
@ -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,5 +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_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,111 +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.
|
||||
*
|
||||
* 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_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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
@ -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
|
||||
@ -36,7 +40,6 @@
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
#define SOL_ESCAPE_CHARACTER_DEFAULT '~'
|
||||
#define SOL_KEEPALIVE_TIMEOUT 30
|
||||
|
||||
#define IPMI_SOL_SERIAL_ALERT_MASK_SUCCEED 0x08
|
||||
#define IPMI_SOL_SERIAL_ALERT_MASK_DEFERRED 0x04
|
||||
|
@ -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_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>
|
||||
@ -106,7 +110,7 @@ void printbuf(const uint8_t * buf, int len, const char * desc)
|
||||
|
||||
const char * val2str(uint16_t val, const struct valstr *vs)
|
||||
{
|
||||
static char un_str[32];
|
||||
static char un_str[16];
|
||||
int i;
|
||||
|
||||
for (i = 0; vs[i].str != NULL; i++) {
|
||||
@ -114,8 +118,8 @@ const char * val2str(uint16_t val, const struct valstr *vs)
|
||||
return vs[i].str;
|
||||
}
|
||||
|
||||
memset(un_str, 0, 32);
|
||||
snprintf(un_str, 32, "Unknown (0x%x)", val);
|
||||
memset(un_str, 0, 16);
|
||||
snprintf(un_str, 16, "Unknown (0x%02x)", val);
|
||||
|
||||
return un_str;
|
||||
}
|
||||
@ -148,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);
|
||||
}
|
||||
@ -197,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);
|
||||
}
|
||||
@ -275,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
File diff suppressed because it is too large
Load Diff
@ -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.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -50,7 +54,6 @@
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
@ -110,16 +113,18 @@ typedef struct sKFWUM_InFirmwareInfo {
|
||||
#define KFWUM_PAGE_SIZE 256
|
||||
|
||||
extern int verbose;
|
||||
static char fileName[512];
|
||||
static unsigned char fileName[512];
|
||||
static unsigned char firmBuf[1024 * 512];
|
||||
static unsigned char firmMaj;
|
||||
static unsigned char firmMinSub;
|
||||
|
||||
static void KfwumOutputHelp(void);
|
||||
static void KfwumMain(struct ipmi_intf *intf, tKFWUM_Task task);
|
||||
static tKFWUM_Status KfwumGetFileSize(char *pFileName,
|
||||
static tKFWUM_Status KfwumGetFileSize(unsigned char *pFileName,
|
||||
unsigned long *pFileSize);
|
||||
static tKFWUM_Status KfwumSetupBuffersFromFile(char *pFileName,
|
||||
static tKFWUM_Status KfwumSetupBuffersFromFile(unsigned char *pFileName,
|
||||
unsigned long fileSize);
|
||||
static void KfwumShowProgress(const char *task,
|
||||
static void KfwumShowProgress(const unsigned char *task,
|
||||
unsigned long current, unsigned long total);
|
||||
static unsigned short KfwumCalculateChecksumPadding(unsigned char *pBuffer,
|
||||
unsigned long totalSize);
|
||||
@ -263,8 +268,8 @@ KfwumMain(struct ipmi_intf *intf, tKFWUM_Task task)
|
||||
{
|
||||
tKFWUM_Status status = KFWUM_STATUS_OK;
|
||||
tKFWUM_BoardInfo boardInfo;
|
||||
tKFWUM_InFirmwareInfo firmInfo = { 0 };
|
||||
unsigned long fileSize = 0;
|
||||
tKFWUM_InFirmwareInfo firmInfo;
|
||||
unsigned long fileSize;
|
||||
static unsigned short padding;
|
||||
|
||||
if ((status == KFWUM_STATUS_OK) && (task == KFWUM_TASK_INFO)) {
|
||||
@ -352,7 +357,7 @@ KfwumMain(struct ipmi_intf *intf, tKFWUM_Task task)
|
||||
}
|
||||
|
||||
static tKFWUM_Status
|
||||
KfwumGetFileSize(char *pFileName, unsigned long *pFileSize)
|
||||
KfwumGetFileSize(unsigned char *pFileName, unsigned long *pFileSize)
|
||||
{
|
||||
tKFWUM_Status status = KFWUM_STATUS_ERROR;
|
||||
FILE *pFileHandle;
|
||||
@ -375,7 +380,7 @@ KfwumGetFileSize(char *pFileName, unsigned long *pFileSize)
|
||||
|
||||
#define MAX_BUFFER_SIZE 1024*16
|
||||
static tKFWUM_Status
|
||||
KfwumSetupBuffersFromFile(char *pFileName, unsigned long fileSize)
|
||||
KfwumSetupBuffersFromFile(unsigned char *pFileName, unsigned long fileSize)
|
||||
{
|
||||
tKFWUM_Status status = KFWUM_STATUS_OK;
|
||||
FILE *pFileHandle;
|
||||
@ -390,9 +395,8 @@ KfwumSetupBuffersFromFile(char *pFileName, unsigned long fileSize)
|
||||
rewind(pFileHandle);
|
||||
|
||||
for (qty = 0; qty < count; qty++) {
|
||||
KfwumShowProgress("Reading Firmware from File",
|
||||
(unsigned long)qty,
|
||||
(unsigned long)count);
|
||||
KfwumShowProgress("Reading Firmware from File", qty,
|
||||
count);
|
||||
if (fread
|
||||
(&firmBuf[qty * MAX_BUFFER_SIZE], 1,
|
||||
MAX_BUFFER_SIZE, pFileHandle)
|
||||
@ -417,7 +421,7 @@ KfwumSetupBuffersFromFile(char *pFileName, unsigned long fileSize)
|
||||
|
||||
#define PROG_LENGTH 42
|
||||
void
|
||||
KfwumShowProgress(const char *task, unsigned long current,
|
||||
KfwumShowProgress(const unsigned char *task, unsigned long current,
|
||||
unsigned long total)
|
||||
{
|
||||
static unsigned long staticProgress = 0xffffffff;
|
||||
@ -443,7 +447,7 @@ KfwumShowProgress(const char *task, unsigned long current,
|
||||
spaces[(PROG_LENGTH - hash)] = '\0';
|
||||
printf("%s", spaces);
|
||||
|
||||
printf(" %3ld %%\r", progress); /* total 7 bytes */
|
||||
printf(" %3d %%\r", progress); /* total 7 bytes */
|
||||
|
||||
if (progress == 100) {
|
||||
printf("\n");
|
||||
@ -556,6 +560,8 @@ KfwumGetDeviceInfo(struct ipmi_intf *intf,
|
||||
}
|
||||
|
||||
if (status == KFWUM_STATUS_OK) {
|
||||
unsigned long manufId;
|
||||
unsigned short boardId;
|
||||
pGetDevId = (struct ipm_devid_rsp *) rsp->data;
|
||||
pBoardInfo->iana =
|
||||
IPM_DEV_MANUFACTURER_ID(pGetDevId->manufacturer_id);
|
||||
@ -651,7 +657,7 @@ KfwumGetStatus(struct ipmi_intf *intf)
|
||||
firmLength |= pGetStatus->firmLengthLSB;
|
||||
|
||||
printf
|
||||
("Firmware Length : %ld bytes\n",
|
||||
("Firmware Length : %d bytes\n",
|
||||
firmLength);
|
||||
printf
|
||||
("Firmware Revision : %u.%u%u SDR %u\n",
|
||||
@ -738,6 +744,7 @@ KfwumSaveFirmwareImage(struct ipmi_intf *intf,
|
||||
struct KfwumSaveFirmwareDownloadReq thisReq;
|
||||
unsigned char out = 0;
|
||||
unsigned char retry = 0;
|
||||
unsigned char counter;
|
||||
|
||||
do {
|
||||
thisReq.addressLSB = address & 0x000000ff;
|
||||
@ -845,6 +852,9 @@ KfwumUploadFirmware(struct ipmi_intf *intf,
|
||||
unsigned char retry = 0;
|
||||
|
||||
do {
|
||||
unsigned char bytes;
|
||||
unsigned char chksum = 0;
|
||||
|
||||
writeSize = KFWUM_BUFFER - KFWUM_CMD_OVERHEAD; /* Max */
|
||||
|
||||
/* Reach the end */
|
||||
@ -1121,10 +1131,8 @@ KfwumOutputInfo(tKFWUM_BoardInfo boardInfo, tKFWUM_InFirmwareInfo firmInfo)
|
||||
|
||||
printf("Target Board Id : %u\n", boardInfo.boardId);
|
||||
printf("Target IANA number : %u\n", boardInfo.iana);
|
||||
printf("File Size : %lu bytes\n", firmInfo.fileSize);
|
||||
printf("File Size : %u bytes\n", firmInfo.fileSize);
|
||||
printf("Firmware Version : %d.%d%d SDR %d\n",
|
||||
firmInfo.versMajor, firmInfo.versMinor, firmInfo.versSubMinor,
|
||||
firmInfo.sdrRev);
|
||||
|
||||
return KFWUM_STATUS_OK;
|
||||
}
|
||||
|
@ -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>
|
||||
@ -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,19 +737,6 @@ 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)
|
||||
@ -897,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;
|
||||
@ -919,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);
|
||||
|
||||
@ -1218,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");
|
||||
@ -1240,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)
|
||||
{
|
||||
@ -1349,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)
|
||||
@ -1399,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;
|
||||
@ -1423,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) {
|
||||
@ -1500,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) {
|
||||
@ -1644,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
|
||||
@ -1838,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) {
|
||||
@ -1908,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);
|
||||
@ -1929,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;
|
||||
}
|
||||
@ -1998,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);
|
||||
@ -2018,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;
|
||||
}
|
||||
|
@ -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>
|
||||
@ -922,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;
|
||||
@ -3190,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;
|
||||
}
|
||||
@ -3250,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:
|
||||
@ -3730,10 +3729,13 @@ 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) {
|
||||
@ -3744,49 +3746,25 @@ ipmi_sdr_dump_bin(struct ipmi_intf *intf, const char *ofile)
|
||||
|
||||
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) {
|
||||
@ -3797,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>
|
||||
@ -727,72 +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);
|
||||
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)
|
||||
{
|
||||
@ -862,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>
|
||||
@ -93,11 +97,19 @@ print_session_info_csv(const struct get_session_info_rsp * session_info,
|
||||
if (data_len == 18)
|
||||
{
|
||||
/* We have 802.3 LAN data */
|
||||
#ifdef __CYGWIN__
|
||||
printf(",%d.%d.%d.%d",
|
||||
session_info->channel_data.lan_data.console_ip[0],
|
||||
session_info->channel_data.lan_data.console_ip[1],
|
||||
session_info->channel_data.lan_data.console_ip[2],
|
||||
session_info->channel_data.lan_data.console_ip[3]);
|
||||
#else
|
||||
printf(",%s",
|
||||
inet_ntop(AF_INET,
|
||||
&(session_info->channel_data.lan_data.console_ip),
|
||||
buffer,
|
||||
16));
|
||||
#endif
|
||||
|
||||
printf(",%02x:%02x:%02x:%02x:%02x:%02x",
|
||||
session_info->channel_data.lan_data.console_mac[0],
|
||||
@ -125,11 +137,19 @@ print_session_info_csv(const struct get_session_info_rsp * session_info,
|
||||
printf(",%d",
|
||||
session_info->channel_data.modem_data.destination_selector);
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
printf(",%d.%d.%d.%d",
|
||||
session_info->channel_data.modem_data.console_ip[0],
|
||||
session_info->channel_data.modem_data.console_ip[1],
|
||||
session_info->channel_data.modem_data.console_ip[2],
|
||||
session_info->channel_data.modem_data.console_ip[3]);
|
||||
#else
|
||||
printf(",%s",
|
||||
inet_ntop(AF_INET,
|
||||
&(session_info->channel_data.modem_data.console_ip),
|
||||
buffer,
|
||||
16));
|
||||
#endif
|
||||
|
||||
if (data_len == 14)
|
||||
{
|
||||
@ -181,11 +201,19 @@ print_session_info_verbose(const struct get_session_info_rsp * session_info,
|
||||
if (data_len == 18)
|
||||
{
|
||||
/* We have 802.3 LAN data */
|
||||
#ifdef __CYGWIN__
|
||||
printf("console ip : %d.%d.%d.%d\n",
|
||||
session_info->channel_data.lan_data.console_ip[0],
|
||||
session_info->channel_data.lan_data.console_ip[1],
|
||||
session_info->channel_data.lan_data.console_ip[2],
|
||||
session_info->channel_data.lan_data.console_ip[3]);
|
||||
#else
|
||||
printf("console ip : %s\n",
|
||||
inet_ntop(AF_INET,
|
||||
&(session_info->channel_data.lan_data.console_ip),
|
||||
buffer,
|
||||
16));
|
||||
#endif
|
||||
|
||||
printf("console mac : %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||
session_info->channel_data.lan_data.console_mac[0],
|
||||
@ -213,11 +241,19 @@ print_session_info_verbose(const struct get_session_info_rsp * session_info,
|
||||
printf("Destination selector : %d\n",
|
||||
session_info->channel_data.modem_data.destination_selector);
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
printf("console ip : %d.%d.%d.%d\n",
|
||||
session_info->channel_data.modem_data.console_ip[0],
|
||||
session_info->channel_data.modem_data.console_ip[1],
|
||||
session_info->channel_data.modem_data.console_ip[2],
|
||||
session_info->channel_data.modem_data.console_ip[3]);
|
||||
#else
|
||||
printf("console ip : %s\n",
|
||||
inet_ntop(AF_INET,
|
||||
&(session_info->channel_data.modem_data.console_ip),
|
||||
buffer,
|
||||
16));
|
||||
#endif
|
||||
|
||||
if (data_len == 14)
|
||||
{
|
||||
|
@ -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>
|
||||
@ -38,17 +42,11 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#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>
|
||||
@ -83,13 +81,11 @@ const struct valstr sol_parameter_vals[] = {
|
||||
};
|
||||
|
||||
|
||||
static struct timeval _start_keepalive;
|
||||
static struct termios _saved_tio;
|
||||
static int _in_raw_mode = 0;
|
||||
|
||||
extern int verbose;
|
||||
|
||||
static uint8_t G_u8ActiveSOL = 0;
|
||||
|
||||
/*
|
||||
* ipmi_get_sol_info
|
||||
@ -104,7 +100,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;
|
||||
@ -1248,57 +1244,28 @@ 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");
|
||||
lprintf(LOG_ERR, "Error sending SOL data");
|
||||
retval = -1;
|
||||
}
|
||||
|
||||
/* If the sequence number is set we know we have new data */
|
||||
if (retval == 0)
|
||||
if ((rsp->session.authtype == IPMI_SESSION_AUTHTYPE_RMCP_PLUS) &&
|
||||
(rsp->session.payloadtype == IPMI_PAYLOAD_TYPE_SOL) &&
|
||||
(rsp->payload.sol_packet.packet_sequence_number))
|
||||
output(rsp);
|
||||
else if ((rsp->session.authtype == IPMI_SESSION_AUTHTYPE_RMCP_PLUS) &&
|
||||
(rsp->session.payloadtype == IPMI_PAYLOAD_TYPE_SOL) &&
|
||||
(rsp->payload.sol_packet.packet_sequence_number))
|
||||
output(rsp);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
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);
|
||||
gettimeofday(&_start_keepalive, 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ipmi_sol_red_pill
|
||||
@ -1315,7 +1282,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) {
|
||||
@ -1323,9 +1289,6 @@ ipmi_sol_red_pill(struct ipmi_intf * intf)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Initialize keepalive start time */
|
||||
gettimeofday(&_start_keepalive, 0);
|
||||
|
||||
enter_raw_mode();
|
||||
|
||||
while (! bShouldExit)
|
||||
@ -1334,15 +1297,6 @@ ipmi_sol_red_pill(struct ipmi_intf * intf)
|
||||
FD_SET(0, &read_fds);
|
||||
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;
|
||||
}
|
||||
|
||||
/* Wait up to half a second */
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 500000;
|
||||
@ -1371,7 +1325,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)
|
||||
{
|
||||
@ -1416,14 +1370,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");
|
||||
@ -1442,7 +1388,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;
|
||||
@ -1484,18 +1430,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) {
|
||||
@ -1585,12 +1525,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
|
||||
@ -1619,7 +1553,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)>]");
|
||||
}
|
||||
|
||||
|
||||
@ -1711,7 +1644,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
|
||||
@ -1720,43 +1653,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,33 +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.data = rqdata;
|
||||
req.msg.data_len = rqdata_len;
|
||||
req.msg.data_len = 5;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
@ -245,36 +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.data = rqdata;
|
||||
req.msg.data_len = rqdata_len;
|
||||
req.msg.data_len = 7;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
@ -364,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)
|
||||
@ -379,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) {
|
||||
@ -511,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
|
||||
*
|
||||
@ -533,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) {
|
||||
@ -556,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) {
|
||||
@ -789,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,12 @@
|
||||
|
||||
#include <sys/select.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#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
|
||||
#endif
|
||||
|
||||
#include <ipmitool/log.h>
|
||||
#include <ipmitool/helper.h>
|
||||
@ -65,6 +66,8 @@
|
||||
#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;
|
||||
@ -382,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];
|
||||
@ -426,8 +430,13 @@ ipmi_tsol_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
sin.sin_family = AF_INET;
|
||||
sin.sin_port = htons(port);
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
result = inet_aton((const char *)intf->session->hostname,
|
||||
&intf->session->addr.sin_addr);
|
||||
#else
|
||||
result = inet_pton(AF_INET, (const char *)intf->session->hostname,
|
||||
&intf->session->addr.sin_addr);
|
||||
#endif
|
||||
|
||||
if (result <= 0) {
|
||||
struct hostent *host = gethostbyname((const char *)intf->session->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.
|
||||
*/
|
||||
|
||||
#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);
|
||||
|
||||
@ -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>
|
||||
@ -70,7 +74,7 @@ void lprintf(int level, const char * format, ...)
|
||||
if (logpriv->daemon)
|
||||
syslog(level, "%s", logmsg);
|
||||
else
|
||||
fprintf(stderr, "%s\r\n", logmsg);
|
||||
fprintf(stderr, "%s\n", logmsg);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -92,7 +96,7 @@ void lperror(int level, const char * format, ...)
|
||||
if (logpriv->daemon)
|
||||
syslog(level, "%s: %s", logmsg, strerror(errno));
|
||||
else
|
||||
fprintf(stderr, "%s: %s\r\n", logmsg, strerror(errno));
|
||||
fprintf(stderr, "%s: %s\n", logmsg, strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -114,7 +118,7 @@ void log_init(const char * name, int isdaemon, int verbose)
|
||||
logpriv->name = strdup(LOG_NAME_DEFAULT);
|
||||
|
||||
if (logpriv->name == NULL)
|
||||
fprintf(stderr, "ipmitool: malloc failure\r\n");
|
||||
fprintf(stderr, "ipmitool: malloc failure\n");
|
||||
|
||||
logpriv->daemon = isdaemon;
|
||||
logpriv->level = verbose + LOG_NOTICE;
|
||||
|
@ -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,26 +44,23 @@
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
# include <signal.h>
|
||||
# include <paths.h>
|
||||
#endif
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef HAVE_PATHS_H
|
||||
# include <paths.h>
|
||||
#else
|
||||
# define _PATH_VARRUN "/var/run/"
|
||||
#endif
|
||||
|
||||
#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>
|
||||
@ -71,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;
|
||||
@ -373,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);
|
||||
@ -586,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) {
|
||||
@ -631,41 +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));
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@ -675,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>
|
||||
@ -49,7 +53,6 @@
|
||||
#include <ipmitool/ipmi_sensor.h>
|
||||
#include <ipmitool/ipmi_channel.h>
|
||||
#include <ipmitool/ipmi_session.h>
|
||||
#include <ipmitool/ipmi_firewall.h>
|
||||
#include <ipmitool/ipmi_event.h>
|
||||
#include <ipmitool/ipmi_user.h>
|
||||
#include <ipmitool/ipmi_raw.h>
|
||||
@ -94,7 +97,6 @@ struct ipmi_cmd ipmitool_cmd_list[] = {
|
||||
{ ipmi_user_main, "user", "Configure Management Controller users" },
|
||||
{ ipmi_channel_main, "channel", "Configure Management Controller channels" },
|
||||
{ ipmi_session_main, "session", "Print session information" },
|
||||
{ ipmi_firewall_main,"firewall","Configure firmware firewall (IPMIv2.0)"},
|
||||
{ ipmi_sunoem_main, "sunoem", "OEM Commands for Sun servers" },
|
||||
{ ipmi_picmg_main, "picmg", "Run a PICMG/ATCA extended cmd"},
|
||||
{ ipmi_fwum_main, "fwum", "Update IPMC using Kontron OEM Firmware Update Manager" },
|
||||
|
@ -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,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>
|
||||
|
@ -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,13 @@ 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);
|
||||
#ifdef __CYGWIN__
|
||||
rc = inet_aton(s->hostname, &s->addr.sin_addr);
|
||||
#else
|
||||
rc = inet_pton(AF_INET, s->hostname, &s->addr.sin_addr);
|
||||
#endif
|
||||
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
|
||||
|
@ -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_RMCP_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
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user