mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-07-01 10:13:35 +00:00
Compare commits
1 Commits
ipmitool
...
IPMITOOL_1
Author | SHA1 | Date | |
---|---|---|---|
d57cba3094 |
@ -1,4 +1 @@
|
||||
Duncan Laurie <duncan@iceblink.org>
|
||||
Fredrik <20>hrn <ohrn@chl.chalmers.se>
|
||||
Jon Cassorla <jon.cassorla@newisys.com>
|
||||
Jeremy Ellington <jeremy@jeremye.net>
|
||||
Duncan Laurie <duncan@sun.com>
|
||||
|
@ -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,617 +0,0 @@
|
||||
version 1.8.13 2013-09-09
|
||||
* ID: 3611905 - Direct Serial Basic/Terminal Mode Interface drivers
|
||||
* ID: 3577766 - configure's knobs and switches don't work
|
||||
* ID: 3611253 - do not override OS-default values for interfaces
|
||||
* ID: 65 - Fixes for configure.in for cross compilation
|
||||
* ID: 3571153 - OpenIPMI/ipmievd fails to compile on Solaris
|
||||
* numerous ipmitool man page updates
|
||||
* ID: 3611226 - Bridging support for PICMG Platforms
|
||||
* Add support for getsysinfo/setsysinfo commands to ipmi mc
|
||||
* Cleanup Dell OEM code to use new sysinfo interface
|
||||
* ID: 93 - str-to-int conversion is weak
|
||||
* ID: 3582307 - ipmi_fru - ipmi_fru_main() return codes
|
||||
* ID: 3582310 - ipmi_fru - ipmi_fru_main() - misuse of printf()
|
||||
* ID: 3576213 - ipmi_fru - unused variable
|
||||
* ID: 3578276 - ipmi_fru - free() on freed memory possible
|
||||
* ID: 3578275 - ipmi_fru - memory leaks
|
||||
* ID: 3528271 - ipmi_fru - possible *flow via FRUID
|
||||
* ID: 3578277 - ipmi_fru - possible NULL pointer
|
||||
* ID: 3612372 - Recognize Broadcom IANA number and BCM5725 product
|
||||
* ID: 3608758 - add IPMI_NETFN_OEM
|
||||
* ID: 143 - Reversed 'channel authcap' capabilities
|
||||
Fixes reversed IPMIv1.5/2.0 'channel authcap' capabilities
|
||||
* ID: 3587318 - "dcmi discover" is not DCMI 1.5 compatible
|
||||
* ID: 3608757 - ipmi_fru - various fixes
|
||||
* ID: 3598203 - 'mc getsysinfo|setsysinfo' needs a bit of re-work
|
||||
* ID: 3597782 - ipmi_mc - sysinfo_param() has two consecutive returns
|
||||
* ID: 3597781 - 'mc getsysinfo|setsysinfo' help has typos
|
||||
* ID: 3608763 - ipmi_sdr - code cleanup & output display cleanup
|
||||
* ID: 3610286 - ipmi_sdr - ipmi_sdr_print_type - incorrect eval
|
||||
* ID: 3600930 - ipmi_sdr - code cleanup
|
||||
* ID: 3602439 - ipmi_sdr - memory leaks
|
||||
* ID: 3595199 - ipmi_sdr - Add support for 'ipmitool sdr <list|elist> help'
|
||||
* ID: 3592773 - 'ipmitool sdr info'; prints incorrect info
|
||||
* ID: 3592770 - 'ipmitool sdr list|elist INV_INPUT' return code
|
||||
* ID: 3577159 - ipmi_sdr - uint32_t cast to uint8_t and back
|
||||
* ID: 3528368 - ipmi_sdr - possible int *flow
|
||||
* ID: 226 - ipmi_sdradd - typo
|
||||
* ID: 258 - ipmi_sdradd - error printed on STDOUT
|
||||
* Fixed ipmievd start under systemd.
|
||||
* ID: 3608760 - Add bswap.h to ipmi_chassis.c and ipmi_pef.c
|
||||
* ID: 3564701 - ipmitool 1.8.12 doesn't build on big endian architectures
|
||||
* ID: 3600907 - defined value for "Chassis may not support Force Identify"
|
||||
* ID: 256 - ipmitool could crash when IPv6 address is returned
|
||||
* ID: 211 - 'lib/ipmi_dcmi.c' - typo & error printed on STDOUT
|
||||
* ID: 3612237 - If DCMI command fails, incorrect completion code is printed
|
||||
* ID: 3608149 - ipmitool - set pointer to NULL after free()
|
||||
* ID: 3603419 - DCMI - waste of resources
|
||||
* ID: 3600908 - DMCI - crash in ipmi_print_sensor_info(), NULL ref
|
||||
* ID: 3609985 - delloem : Wrong MAC returned when flex addressing is enabled
|
||||
* ID: 113 - delloem exec file won't handle more than one command
|
||||
* ID: 28 - delloem - clean up the code
|
||||
* ID: 3608261 - delloem - code formatting
|
||||
* ID: 3528247 - delloem - fix possible *int flows
|
||||
* ID: 3600910 - delloem - code cleanup
|
||||
* ID: 3576211 - delloem - unused variable
|
||||
* ID: 3578022 - delloem - fix typos
|
||||
* ID: 263 - ipmi_ek* - cleanup
|
||||
* ID: 3308765 - ipmi_ek* - cleanup
|
||||
* ID: 3586228 - ipmi_ek* - ipmi_ekanalyzer_usage() rework
|
||||
* ID: 3528388 - ipmi_ek* - a typo in error message
|
||||
* ID: 3576212 - ipmi_event - better rsp handling
|
||||
* ID: 3607393 - ipmi_event - redundant '\n' in error message
|
||||
* ID: 153 - ipmi_firewall - printf() used instead of lprintf()
|
||||
* ID: 3608003 - ipmi_fru - atol() should be replaced with str2*()
|
||||
* ID: 3600911 - ipmi_fru - fix multiple increments in args to printf
|
||||
* ID: 3600914 - no more crash on no response. allow more send/recv loops of waiting.
|
||||
* ID: 70 - Fixes and updates for ipmitool hpm
|
||||
* ID: 3528308 - ipmi_hpmfwupg - possible int *flow
|
||||
* ID: 3608762 - ipmi_hpmfwup - Fixed help messages for hpm command
|
||||
* ID: 3607981 - ipmi_lanp - replace atoi() calls
|
||||
* ID: 3607320 - ipmi_lanp - possible NULL reference
|
||||
* ID: 3600926 - ipmi_lanp - code cleanup
|
||||
* ID: 3613575 - memory leak - ipmi_password_file_read()
|
||||
* ID: 3522740 - reading password from file is limited to 16byte passwords
|
||||
* ID: 3613605 - ipmi_main - call free() on pointer to static data
|
||||
* ID: 3608761 - ipmi_main - PICMG Get Device Locator was never run
|
||||
* ID: 3577155 - ipmi_main' - memory leaks
|
||||
* ID: 239 - typo in 'mc selftest', add details
|
||||
* ID: 3597471 - ipmi_mc - needs a bit of re-work - rc, inv. options
|
||||
* ID: 3597468 - ipmi_mc - print_mc_usage() prints to STDOUT
|
||||
* ID: 3597469 - 'mc watchdog off' prints on STDERR, should be STDOUT
|
||||
* ID: 3597470 - 'mc watchdog reset' prints on STDERR, should be STDOUT
|
||||
* ID: 3611254 - OEM handle for Intel 82751 in SPT mode
|
||||
* ID: 3600927 - change eval order of input param in ipmi_oem_setup()
|
||||
* ID: 3600928 - ipmi_pef - code cleanup
|
||||
* ID: 3592732 - ipmi_picmg.c - printf() misuse
|
||||
* ID: 3528310 - ipmi_picmg.c - NULL reference
|
||||
* ID: 3528347 - ipmi_raw.c - possible int *flow
|
||||
* ID: 3587913 - Command % ipmitool raw help; returns 1
|
||||
* Added code to support sensors on other luns (On behalf of Kontron Germany)
|
||||
* ID: 3611912 - Add missing newlines when cvs output is specified
|
||||
* ID: 244 - ipmi_sel - "0.0" displayed for unspecified threshold values
|
||||
* ID: 3612371 - Typo in impi_sel debug output
|
||||
* ID: 3016359 - ipmi_sel - Get SEL Alloc Information is incorrect
|
||||
* ID: 3568976 - 'sel set time' behaviour is inconsistent
|
||||
* ID: 3528371 - ipmi_sensor - possible int *flow
|
||||
* ID: 3601265 - 'ipmitool sensor get' leaks memory
|
||||
* ID: 3601106 - 'ipmitool sensor get NACname' output incorrect/inconsistent
|
||||
* ID: 3608007 - ipmi_session - typo in error message
|
||||
* ID: 101 - ipmi_sol - possible int *flow
|
||||
* ID: 3600933 - ipmi_sol - use of deprecated bzero()
|
||||
* ID: 3609472 - ipmi_sol - Add the instance to the SOL commands
|
||||
* ID: 3588726 - 'ipmitool sol payload status ...;'segfaults on no rsp
|
||||
* ID: 3522731 - ipmi_sol - ipmi_get_sol_info() returns always 0
|
||||
* ID: 3613042 - add missing Entity IDs
|
||||
* ID: 3611306 - ipmi_tsol - fix always fail in case of error
|
||||
* ID: 259 - ipmi_user - memory leak
|
||||
* ID: 260 - ipmi_user - replace atoi() call
|
||||
* ID: 2871903 - ipmitool user priv incorrectly sets Link Auth
|
||||
* ID: 3600960 - check the copy of password exists
|
||||
* ID: 3609473 - Add assertion/deassertion to threshold events
|
||||
* ID: 104 - ipmishell - possible int *flow
|
||||
* ID: 262 - 'set' segfaults when no IPMI inf present
|
||||
* ID: 257 ipmitool exec segfaults if invalid input given
|
||||
* ID: 254 - Fix retry of authentication capabilities retrieval
|
||||
* ID: 3611303 - lan - error check is missing braces
|
||||
* ID: 253 - Fix lanplus retransmission
|
||||
* ID: 212 - 'lib/ipmi_dcmi.c' - possible int *flow
|
||||
* ID: 264 - incorrect array index in get_lan_param_select()
|
||||
* ID: 269 - Fixes for configure.in for cross compilation
|
||||
* ID: 267 - Corruption in "lan alert print" output
|
||||
* ID: 41 - ipmi_sel_interpret() - clean up formatting, indentation
|
||||
* ID: 242 - Incorrect DCMI Power Reading "IPMI timestamp" interpretation
|
||||
* ID: 229 - 'lib/ipmi_ekanalyzer.c' - a typo ``Too few argument!''
|
||||
* ID: 266 - file descriptor leak in ipmi_fwum and ipmi_ekanalyzer
|
||||
* ID: 99 - 'lib/ipmi_sel.c' - possible int *flow
|
||||
* ID: 222 - 'lib/ipmi_sdr.c' - a typo 'Not Reading' -> 'No Reading'
|
||||
* ID: 35 - Script to setup redirection of SNMP to/from BMC
|
||||
* ID: 273 - Reduce SOL Input buffer size by SOL header size
|
||||
|
||||
|
||||
version 1.8.12 released 2012-08-09
|
||||
* Added IPMB dual bridge support (no need for driver support)
|
||||
* Enable compiler warnings and resolve all compiler warning so that
|
||||
ipmitool compiles and links with no warning or error messages
|
||||
* add ipmishell line to configure
|
||||
* fail configure when no curses or readline is found
|
||||
* support sensor bridging in free interface
|
||||
* applied fix for issue #2865160 (AIX build)
|
||||
* Document the ipmitool dcmi commands in the ipmitool man page
|
||||
* Document that some commands are blocked by OpenIPMI. ID 2962306
|
||||
* Document the -N and -R options per tracker ID 3489643
|
||||
* fix manpage misdocumentation on cipher suite privilige configuration
|
||||
* Add build support for Dell OEM commands
|
||||
* Add new Dell OEM commands and update man page
|
||||
* added hpm and fwum in man page
|
||||
* man page update for fwum and hpm commands
|
||||
* Added documentation for 'ime' operating mode, used to update Intel ME.
|
||||
* add new -Y option to prompt user to enter kgkey
|
||||
* Add DCMI module (Data Center Management Interface)
|
||||
* fixed oem/iana data type to allow 24 bits definition
|
||||
* Fixed AMC point-to-point record parsing in FRU
|
||||
* Fixed detection of packing support in GCC
|
||||
* Added packing support detection magic on all packed structures
|
||||
in project
|
||||
* Dell specific mac sub command is updated to support the latest 12G
|
||||
Dell servers. Support for virtual mac is also implemented.
|
||||
* Use consistent netfn/cmd for getsysinfo command
|
||||
* Add Dell OEM network commands
|
||||
* Resolve incorect Board Mfg Data due to incorrect date constant
|
||||
* Update ipmi_fru.h to SMBIOS spec 2.6.1 - ID 2916398
|
||||
* Support for analog readings in discrete sensors on HP platforms.
|
||||
* Change device id mask (IPM_DEV_DEVICE_ID_REV_MASK) 0x07 for 0x0F.
|
||||
As per in IPMI spec V2:
|
||||
* Added PICMG clock e-keying and bused resource control identifiers
|
||||
* Added PICMG major version (ATCA/AMC/uTCA) identifiers
|
||||
* Correct Threshold/Discrete Sensor Display - Patch Tracker ID 3508759
|
||||
* Sensor units now handle percentage units - ID 3014014
|
||||
* Fixes ID 3421347 Sensor list command should use channel field from SDR
|
||||
* Added packing directive for ARM cross compile with GCC 3.4.5,
|
||||
otherwise the sdr structures gets padded and the pointer cast
|
||||
result in incorrect alignement
|
||||
* Added 'sdr fill sensors nosats' support to speed up SDR discovery
|
||||
* Added SDR name display during discovery (with -v)
|
||||
* Added support for sensor types - Processor related sensor
|
||||
type 0x07, system incharectorization 0x20, Memory sensor type.
|
||||
* Give more description for SEL which is generated for Uncorrectable
|
||||
ECC and errors with respect to each Memory Bank,Card or DIMM.
|
||||
The Sensor type supporting this are 0x0C and 0x10.
|
||||
* Add more details about Version Change event (source of
|
||||
firmware update)
|
||||
* enhanced PICMG fru control
|
||||
* Integrated Andy Wray's DDR3 SPD parser patch
|
||||
* Adds function str2uint() to convert from string to uint32_t with
|
||||
checks for valid input.
|
||||
* Fix possible buffer overflow in buf2str()
|
||||
* Fixes ID 3485004 - misuse of strtol()
|
||||
* Replaces calls to strtol() with str2uchar() calls and adds error
|
||||
messages if invalid input is given.
|
||||
* Don't overwite the iflags bits prior to setting the boot parameters.
|
||||
This fixes ipmitool so that
|
||||
chassis bootdev bios clear-cmos=yes
|
||||
will correctly clear the bios cmos.
|
||||
* Clarify DCMI get limit activation (add if activate or not).
|
||||
* Bug fixes for delloem lan command. This includes the support for 12G
|
||||
Dell license and 12G LAN Specific command.
|
||||
* delloem commands should not be executed before parsing command line.
|
||||
* Fix stack overflow in delloem setled
|
||||
* Fix delloem powermonitor on big-endian platforms.
|
||||
* ipmitool delloem powermonitor command should convert data from
|
||||
network-format to the native one, otherwise it shows garbage
|
||||
on ppc/ppc64 platform.
|
||||
* Add ipmi_getsysinfo command
|
||||
* Add support for drive backplane SetLED functionality
|
||||
* Fix for Platform Event Message incorrect Generator ID
|
||||
* Fix fru print so that it will display FRU info from satellite
|
||||
controllers.
|
||||
* Add support for AMC type 17h record.
|
||||
* Fix in fru edit. It is now possible to edit field 0 of sections
|
||||
* New FRU get OEM record command
|
||||
* fixed segfault for fru edit when "field id" is not supported and
|
||||
added user feedback for string substitution(success or failure)
|
||||
* Improvement to hpm upgrade during activation. This resolves issue
|
||||
where activation seems to have failed because ipmitool received
|
||||
an unsupported completion code.
|
||||
* hpm Fixes for multi-platform support.
|
||||
* hpm Fix for timeouts during firmware rollback. If completion code
|
||||
is C3, wait till timeout has expired before reporting it.
|
||||
* hpm During manual rollback, code now gets target capabilities
|
||||
instead of using a default timeout of 60 seconds.
|
||||
* Added firmware auxilliary bytes to hpm outputs
|
||||
* hpm Add support for BIG Buffer (Use when -z option is used)
|
||||
* Fix the case where ipmitool loses the iol connection during the upload
|
||||
block process. Once IPMITool was successfully sent the first
|
||||
byte, IPMITool will not resize the block size.
|
||||
* Fix the problem when we try to upgrade specific component and the
|
||||
component is already updated,
|
||||
* updated HPM firmware agent to version 1.04
|
||||
* Fix exit code to return zero on '-o list' or '-o help' option
|
||||
* limit length of user name and password that can be supplied by user.
|
||||
Password is limited to 16 bytes, resp. 20 bytes, for LAN, resp.
|
||||
LAN+, interface. User name is limited to 16 bytes, no interface
|
||||
limitations. ID 3184687, ID 3001519
|
||||
* Add retry / timeout options for LAN
|
||||
* Changed default cipher suite to 1 instead of 3 for iol20
|
||||
* added fix for tracker ID 2849300 "Incorrect Firmware Revision"
|
||||
* avoid reopening the interface when already opened
|
||||
* Remove message for unsupported PEF capabilities that return valid
|
||||
CC (80h)
|
||||
* Added OEM byte (47) to verbose output
|
||||
* Add option to provide a list when filling sdr repository
|
||||
* SDR discovery speedups
|
||||
* Added support for Dell specific sensors
|
||||
* Fix segmentation fault on unrecognize OEM events.
|
||||
* changed SEL timestamp formatting for 'preinit' SEL entries, allowing
|
||||
the number of seconds to be displayed.
|
||||
* Added sensor raw data in verbose mode. Useful for OEM sensor type.
|
||||
* Add sensor hysteresis (positive & negative) to the following command
|
||||
ipmitool sensor -v
|
||||
* Fixes bug ID 3484936 - missing user input validation
|
||||
* Add missing RMCP+ auth type strings
|
||||
* Add new Kontron Product in ipmi_strings for product ID. Kontron
|
||||
KTC5520/EATX Server Motherboard with integrated iBMC/KVM/VM
|
||||
added identification support for Kontron AT8050 ATCA board
|
||||
* Constrain setting of the username to no greater than 16 characters
|
||||
per the IPMI specification. ID 3001519
|
||||
* Constrain User ID between 1 and 63. ID 3519225
|
||||
* Fixes ID 3485340 - user input not handled in 'lib/ipmi_user.c'
|
||||
* Fixes ignorance of existing daemon PID file which results in PID being
|
||||
overwritten. Adds proper umask() before writing PID file.
|
||||
* applied fix for ID 2865111 (AIX build)
|
||||
* Fix a proplem when using bridged IPMI commands on the lanplus
|
||||
interface (-I lanplus with -b -t or -m switches) resulting in
|
||||
"Close Session command failure".
|
||||
* Add fix with usage of CFh (duplicate request). Usefull for
|
||||
slow commands
|
||||
* Fix issue with sequence number. (Speed up transfer)
|
||||
|
||||
version 1.8.11 released 2009-02-25
|
||||
* Fix new GCC compilation issues in regards to Packing
|
||||
* Fix Tracker bug #1642710 - ipmi_kcs_drv being loaded/unloaded
|
||||
for 2.4 kernel instead of ipmi_si_drv driver module
|
||||
* New -y option added to allow specification of kg keys with
|
||||
non-printable characters
|
||||
* New -K option added to allow kgkey settings via environmental
|
||||
variable IPMI_KGKEY
|
||||
* Generic device support added for EEPROM with SDR Type 10h (gendev)
|
||||
* Fix to lan-bridging for a double-bridging crash and to fix
|
||||
an issue with bridging multiple concurrent requests and
|
||||
erroneous handling of raw Send Message
|
||||
* Lanplus fix for commands like 'sensor list' without the -t option
|
||||
causing wrong double bridged requests of a sensor is located
|
||||
on another satellite controller
|
||||
* Fix lan and lanplus request list entry removal bugs
|
||||
* Fix non-working issue when trying to send a bridge message with
|
||||
Cipher 3
|
||||
* Change bridge message handling to reuse command ipmi_lan_poll_recv
|
||||
* Added PICMG 2.0 and 2.3 support
|
||||
* Fix PICMG (ATCA) extension verification and reversal of BCD encoded
|
||||
values for "major" and "minor" fields
|
||||
* Add IANA support for Pigeon Point
|
||||
* Add OEM SW/FW Record identification
|
||||
* Fix to include I2C and LUN addresses so sensors are correctly managed
|
||||
* Patch ID 1990560 to get readings from non-linear analog sensors
|
||||
* Add support for SOL payload status command
|
||||
* SOL set parameter range checking added
|
||||
* Fixed SOL activate options usage
|
||||
* Fixed crashes when parsing 'sol payload' and 'tsol' cmds (#216967)
|
||||
* Added retries to SOL keepalive
|
||||
* Fixed wrong mask values for Front Panel disable/enable status
|
||||
* Add support to access fru internal use area
|
||||
* Add support for new PICMG 3.0 R3.0 (March 24, 2008) to allow
|
||||
blocks of data within the FRU storage area to be write
|
||||
protected.
|
||||
* Fix node reporting in GUID; Tracker bug #2339675
|
||||
* Fix watchdog use/action print strings
|
||||
* Fix endian bug in SDR add from file; Tracker bug #2075258
|
||||
* Fix crash when dumping SDRs in a file and there's an error
|
||||
getting an SDR; improve algorithm for optimal packet size
|
||||
* Fix occasional SDR dump segfault; #1793076
|
||||
* Allow ipmitool sel delete to accept hex list entry numbers
|
||||
* Fix SEL total space reporting.
|
||||
* Fix for garbage sensor threshold values reported when none
|
||||
returned. Tracker Bug #863748
|
||||
* ipmievd change to Monitor %used in SEL buffer and log warnings when
|
||||
the buffer is 80% and 100% full
|
||||
|
||||
version 1.8.10 released 2008-08-08
|
||||
* Added support for BULL IANA number.
|
||||
* Fixed contrib build so the oem_ibm_sel_map file gets included in
|
||||
rpm builds again.
|
||||
* Added support for Debian packages to be built from CVS
|
||||
* Fix for sdr and sel timestamp reporting issues
|
||||
* Fix for discrete sensor state print routines to address state
|
||||
bits 8-14
|
||||
* Change ipmi_chassis_status() to non-static so it can be used
|
||||
externally
|
||||
* Added retries to SOL keepalive
|
||||
* Fix to stop sensor list command from reporting a failure due
|
||||
to missing sensor
|
||||
* Fix bug in sdr free space reporting
|
||||
* Add support for IANA number to vendor name conversion for many
|
||||
vendors
|
||||
* Fix segfault bug in lan set command
|
||||
* Fix bug in population of raw i2c wdata buffer
|
||||
* Fix bug in ipmb sensor reading
|
||||
* Fix misspellings, typos, incorrect strncmp lengths, white space
|
||||
* Update/fix printed help and usages for many commands
|
||||
* Add and update support for all commands in ipmitool man page
|
||||
* Fix for lanplus session re-open when the target becomes unavailable
|
||||
following a fw upgrade activation
|
||||
* Add support for watchdog timer shutoff, reset, and get info
|
||||
* Add support for more ibm systems in oem_ibm_sel_map
|
||||
* Add more JEDEC support info for DIMMs; decrease request size
|
||||
for DIMM FRU info to 16 bytes at a time to allow more
|
||||
DIMM FRUs to respond.
|
||||
* Fix to change hpmfwupg to version 1.02; fix to reduce hpmfwupg
|
||||
buffer length more aggressively when no response from iol
|
||||
* Fix HPM firmware activation via IOL; fake a timeout after IOL
|
||||
session re-open to force get upgrade status retry;
|
||||
Added retries on 0xD3 completion code
|
||||
* Add support for freeipmi 0.6.0; adjust autoconf for changes
|
||||
* Fix for oemval2str size
|
||||
* Add support for product name resolution in mc info
|
||||
* Fix FRU display format
|
||||
* Added PICMG ekeying analyzer module support (ekanalyzer);
|
||||
display point to point physical connectivity and power
|
||||
supply information between carriers and AMC modules;
|
||||
display matched results of ekeying match between an
|
||||
on-carrier device and AMC module or between 2 AMC modules
|
||||
* Fix AMC GUID display support
|
||||
* Improved amcportstate operations
|
||||
* Added resolution for new sensor types
|
||||
* Fix segfault in SOL
|
||||
* Fix bug that caused infinite loop on BMCs with empty SDRs
|
||||
* Fix to move out Kontron OEM sensor resolution for other OEMs
|
||||
which could lead to bad event descriptions
|
||||
* Add new FRU edit mode thereby allowing serial numbers, etc. to be
|
||||
changed; improvements to OEM edit mode
|
||||
* Added SPD support for parms: channel number, max read size
|
||||
* Add SDR support for adding SDR records from a dumped file,
|
||||
clearing SDR, adding partial SDR records
|
||||
* Add updates and fixes to hpmfwupg: upload block size to 32 bytes
|
||||
for KCS, handle long response option, implement rollback
|
||||
override, garbage output fix
|
||||
* Add double bridge lan support , fix bridging issue
|
||||
* Add HPM support to pre-check which components need to be skipped
|
||||
* Fix autodetection of maximum packet size when using IPMB
|
||||
* Add new Kontron OEM command to set the BIOS boot option sequence
|
||||
* Add support for dual-bridge/ dual send message
|
||||
* Add auto-detect for local IPMB address using PICMG 2.X extension
|
||||
* Add support for HPM.1 1.0 specification compliance
|
||||
* Fix for improper lan/lanplus addressing
|
||||
* Added transit_channel and transit_addr to ipmi_intf struct
|
||||
* Fix bad password assertion bug due to rakp2 HMAC not being checked
|
||||
properly
|
||||
* Added ability to interpret PPS shelf manager clia sel dump
|
||||
* Corrected PICMG M7 state event definition macros
|
||||
* Added FRU parsing enhancements
|
||||
* Added "isol info", "isol set" and "isol activate" commands
|
||||
to support Intel IPMI v1.5 SOL functionality. Removed
|
||||
"isol setup" command.
|
||||
* Fix bug in ipmi_lan_recv_packet() in lan and lanplus interfaces.
|
||||
* Fix bug in "chassis poh" command.
|
||||
* Fix HPM.1 upgrade to apply to only given component when instructed
|
||||
to do so
|
||||
* Added configure auto-detection if dual bridge extension
|
||||
is supported by OpenIPMI
|
||||
|
||||
version 1.8.9 released 2007-03-06
|
||||
* Added initial AMC ekey query operation support
|
||||
* Improvements to ekeying support (PICMG 3.x only)
|
||||
* Added initial interactive edition support for multirec; added IANA
|
||||
verification before interpreting PICMG records.
|
||||
* Added edit support for AMC activation "Maximum Internal Current"
|
||||
* Fix bug generating garbage on the screen when handling GetDeviceId
|
||||
and sol traffic occurs
|
||||
* Added ability to map OEM sensor types to OEM description string using
|
||||
IANA number; moved IANA number table
|
||||
* Fix lan set access command to use value already saved within
|
||||
parameters for PEF and authentication
|
||||
* Fix bug in cmd ipmitool lan stats get 1
|
||||
* Add support to allow ipmitool/ipmievd to target specific device
|
||||
nodes on multi-BMC systems
|
||||
* Add support for name+privilege lookup for lanplus sessions
|
||||
* Fix time_t conversion bug for 64-bit OS
|
||||
* Added prefix of hostname on sel ipmievd sessions
|
||||
* Fixed FWUM Get Info
|
||||
* Fix ipmievd fd closing bug
|
||||
* Add set-in-progress flag support to chassis bootdev
|
||||
* Added new chassis bootdev options
|
||||
* Add sol payload enable/disable comman
|
||||
* Fix SOL set errors when commit-write not supported
|
||||
* Fix reset of session timeout for lanplus interface
|
||||
* Fixed lan interface accessibility timeout handling
|
||||
* Fix bug with Function Get Channel Cipher Suites command when
|
||||
more than 1 page used.
|
||||
* Fix missing firmware firewall top-level command
|
||||
* Fix bug in SOL keepalive functionality
|
||||
* Fix SOLv2 NACK and retry handling for Intel ESB2 BMC
|
||||
* Added ipmi_sel_get_oem_sensor* APIs
|
||||
* Added HPM.1 support
|
||||
* Fix segfault when incorrect oem option supplied
|
||||
* Fix bus problem with spd command
|
||||
* Fix segfault in SOL when remote BMC does not return packet
|
||||
* Adjust packet length for AMC.0 retricting IPMB packets to 32 bytes
|
||||
* Added lan packet size reduction mechanism
|
||||
* Fix bug with sendMessage of bad length with different target
|
||||
* Fix for big endian (PPC) architecture
|
||||
* NetBSD fixes
|
||||
* Fix segfault and channel problem with user priv command
|
||||
* Add support for bus/chan on i2c raw command
|
||||
* Add freeipmi interface support
|
||||
* Add remote spd printing
|
||||
* Add better detection of linux/compiler.h to config
|
||||
* Makefile changes to fix makedistcheck, etc.
|
||||
|
||||
version 1.8.8
|
||||
* Fix segfaults in sensor data repository list
|
||||
* Fix ipmievd to open interface before daemonizing
|
||||
* Fix IPMIv1.5 authtype NONE to ignore supplied password
|
||||
* Fix cipher suite display bug in lan print
|
||||
* Fix typo in IPMIv2 SOL output when sending break
|
||||
* Fix improper LUN handling with Tyan SOL
|
||||
* Add LUN support to OpenIPMI interface
|
||||
* Add support for Kontron OEM commands
|
||||
* Update to Kontron Firmware Update command
|
||||
|
||||
version 1.8.7
|
||||
* Remove nuclear clause from license
|
||||
* Add Sun OEM command for blades
|
||||
* Increase argument size for raw commands in shell/exec
|
||||
* Fix handling of LUNs for LAN interfaces
|
||||
* Add IPMIv2 SOL loopback test
|
||||
* Add support for IBM OEM SEL messages
|
||||
* Disable file paranoia checks on read files by default
|
||||
* Support IPMIv2 SOL on older Intel boxes
|
||||
* Display message and exit if keepalive fails during SOL
|
||||
* Add support for setting VLAN id and priority
|
||||
* Add support for FreeBSD OpenIPMI-compatible driver
|
||||
* Add support for IPMIv2 Firmware Firewall
|
||||
* Fix gcc4 compile warnings
|
||||
* Make ipmievd generate pidfile
|
||||
* Add initscripts for ipmievd
|
||||
|
||||
version 1.8.6
|
||||
* Fix memory corruption when sending encrypted SOL traffic
|
||||
* Add keepalive timer to IPMIv2 SOL sessions
|
||||
|
||||
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.
|
||||
* Add support for appending distro tag to integrated RPM builds.
|
||||
* Fix LAN parameter printing to handle Invalid Data Field response
|
||||
without errors.
|
||||
* Add 5ms delay to IPMIv2 SOL retry packets
|
||||
* IPMIv2 interface will now correctly set session privilege level
|
||||
to requested level after session is opened.
|
||||
|
||||
version 1.8.2 (released May 18 2005)
|
||||
* Fix FRU reading for large (>255 bytes) areas.
|
||||
* Overhaul to ipmievd to support SEL polling in addition to OpenIPMI.
|
||||
* Fix LAN parameter segfault when no Ciphers supported by BMC.
|
||||
* Fix IPMIv2 support on Intel v2 BMCs (use -o intelplus).
|
||||
* Separate option parsing code from main ipmitool source file.
|
||||
* Add raw I2C support with IPMI Master Read-Write command.
|
||||
* Add support for new 'sdr elist' extended output format.
|
||||
* Add support for listing sensors by type with 'sdr type' command.
|
||||
* Add support for new 'sel elist' extended output format that
|
||||
cross-references events with sensors.
|
||||
* Add support for sending dynamically generated platform events
|
||||
based on existing sensor information.
|
||||
* New '-S' argument to read local SDR cache created with 'sdr dump'.
|
||||
* Updated manpage for ipmitool and ipmievd.
|
||||
|
||||
version 1.8.1
|
||||
* ipmievd installs in /usr/sbin
|
||||
|
||||
version 1.8.0
|
||||
* Fix IPMIv2.0 issues
|
||||
* Fix chassis boot parameter support
|
||||
* Add support for linear sensors
|
||||
|
||||
version 1.7.1
|
||||
* Update bmc plugin to work with new Solaris bmc driver (new ioctl
|
||||
for interface detection and new STREAMS message-based interface)
|
||||
|
||||
version 1.7.0
|
||||
* Propogate errors correctly so exit status will be useful
|
||||
* More consistent display of errors including completion code text
|
||||
* Errors and debug is send to stderr now
|
||||
* New "sel get" command that will print details about SEL entry
|
||||
and corresponding SDR records as well as FRUs via entity association
|
||||
* Improved event generator, now supports reading events from text file
|
||||
* New "-o oemtype" option for specifying OEM boards
|
||||
exsting types are "supermicro" and "intelwv2"
|
||||
* New PEF subsystem from Tim Murphy at Dell
|
||||
* New "bmc" plugin for Solaris 10 x86
|
||||
* Many bugfixes and contributed patches
|
||||
|
||||
version 1.6.2
|
||||
* Support for Supermicro BMC OEM authentication method
|
||||
|
||||
version 1.6.1
|
||||
* Fix minor problem with LAN parameter setting
|
||||
|
||||
version 1.6.0
|
||||
* Add a README file
|
||||
* Add Solaris x86 interface plugin
|
||||
* Add support for building Solaris packages
|
||||
* Fix segfault when doing "sel list" (from Matthew Braithwaite)
|
||||
* Fix "chassis identify" on some BMCs (from ebrower@sourceforge)
|
||||
* Add command "bmc info" and related output (from ebrower@sourceforge)
|
||||
* Add support for IPMIv2 and Serial-over-LAN from Jeremy at Newisys
|
||||
* Add support for building RPMs as non-root user
|
||||
* Add new "shell" and "exec" commands
|
||||
* Lots of other contributed patches
|
||||
|
||||
version 1.5.9
|
||||
* Add ability to get a particular sensor by name
|
||||
* Add ability to set a particular sensor threshold
|
||||
* Add support for displaying V2 channel authentication levels
|
||||
* Add README for rrdtool scripts in contrib directory
|
||||
* Improve lan interface retry handling
|
||||
* Support prompting for password or reading from environment
|
||||
* Move chaninfo command into channel subcommand
|
||||
* Fix reservation ID handling when two sessions open to BMC
|
||||
* Fix reading of large FRU data
|
||||
* Add configure option for changing binary to ipmiadm for Solaris
|
||||
* Fix compile problem on Solaris 8
|
||||
|
||||
version 1.5.8
|
||||
* Enable static compilation of interfaces
|
||||
* Fix types to be 64-bit safe
|
||||
* Fix compilation problems on Solaris
|
||||
* Fix multiple big-endian problems for Solaris/SPARC
|
||||
* Fix channel access to save settings to NVRAM
|
||||
* Set channel privilege limit to ADMIN during "access on"
|
||||
* Enable gratuitous ARP in bmcautoconf.sh
|
||||
* Add support for Linux kernel panic messages in SEL output
|
||||
* Add support for type 3 SDR records
|
||||
|
||||
version 1.5.7
|
||||
* Add IPMIv1.5 eratta fixes
|
||||
* Additions to FRU printing and FRU multirecords
|
||||
* Better handling of SDR printing
|
||||
* Contrib scripts for creating rrdtool graphs
|
||||
|
||||
version 1.5.6
|
||||
* Fix SEL event decoding for generic events
|
||||
* Handle empty SEL gracefully when doing "sel list"
|
||||
* Fix sdr handling of sensors that do not return a reading
|
||||
* Fix for CSV display of sensor readings/units from Fredrik <20>hrn
|
||||
|
||||
version 1.5.5
|
||||
* Add -U option for setting LAN username
|
||||
* Fix -v usage for plugin interfaces
|
||||
|
||||
version 1.5.4
|
||||
* Put interface plugin API into library
|
||||
* Fix ipmievd
|
||||
|
||||
version 1.5.3
|
||||
* Add -g option to work with grizzly bmc
|
||||
|
||||
version 1.5.2
|
||||
* Add support for setting gratuitous arp interval
|
||||
|
||||
version 1.5.1
|
||||
* Better SEL support
|
||||
* Fix display bug in SDR list
|
||||
|
||||
version 1.5.0
|
||||
* More robust UDP packet handling
|
||||
* Add Intel IMB driver support
|
||||
* Use autoconf/automake/libtool
|
||||
|
@ -27,55 +27,19 @@
|
||||
# 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 = $(datadir)/doc/$(PACKAGE)
|
||||
DOCLIST = $(top_srcdir)/README $(top_srcdir)/COPYING $(top_srcdir)/AUTHORS $(top_srcdir)/ChangeLog
|
||||
|
||||
EXTRA_DIST = $(DOCLIST) \
|
||||
debian/changelog debian/control debian/copyright \
|
||||
debian/dirs debian/docs debian/rules
|
||||
|
||||
AUTOMAKE_OPTIONS = dist-bzip2
|
||||
EXTRA_DIST = ipmitool.spec.in AUTHORS COPYING debian/*
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure configure-stamp \
|
||||
config.guess config.sub depcomp install-sh ltmain.sh missing \
|
||||
mkinstalldirs config.h.in stamp-h.in \
|
||||
$(distdir).tar.gz $(distdir).tar.bz2
|
||||
mkinstalldirs config.h.in stamp-h.in $(distdir).tar.gz
|
||||
|
||||
SUBDIRS = lib src include doc contrib control
|
||||
SUBDIRS = lib src include doc contrib
|
||||
|
||||
dist-hook:
|
||||
cp control/ipmitool.spec $(distdir)
|
||||
dist-hook: ipmitool.spec
|
||||
cp ipmitool.spec $(distdir)
|
||||
|
||||
install-data-local:
|
||||
mkdir -p $(DESTDIR)$(DOCDIR)
|
||||
$(INSTALL_DATA) $(DOCLIST) $(DESTDIR)$(DOCDIR)
|
||||
|
||||
uninstall-local:
|
||||
-rm -rf $(DESTDIR)$(DOCDIR)
|
||||
|
||||
.PHONY: pkg
|
||||
pkg: PKG := ipmitool-@VERSION@-@OS@-@ARCH@
|
||||
pkg: control/pkginfo
|
||||
$(STRIP) src/ipmitool
|
||||
$(STRIP) src/ipmitool
|
||||
(cd control ; pkgmk -o -d /tmp)
|
||||
pkgtrans -s /tmp $(PKG) ipmitool
|
||||
gzip -c /tmp/$(PKG) > $(PKG).gz
|
||||
-rm -rf /tmp/ipmitool /tmp/$(PKG)
|
||||
|
||||
BUILDDIR = ${shell cd $(top_builddir) ; pwd | sed -e 's,^[^:\\/]:[\\/],/,'}
|
||||
SRCDIR = ${shell cd $(top_srcdir) ; pwd | sed -e 's,^[^:\\/]:[\\/],/,'}
|
||||
RPMDIR = $(BUILDDIR)/rpmbuild
|
||||
|
||||
.PHONY: rpm
|
||||
rpm: control/ipmitool.spec dist
|
||||
mkdir -p $(RPMDIR)/{BUILD,RPMS,SRPMS,SOURCES,SPECS,tmp}
|
||||
cp control/ipmitool.spec $(RPMDIR)/SPECS
|
||||
BUILDDIR=$(RPMDIR) CONFIGDIR=$(BUILDDIR)/control \
|
||||
@RPMBUILD@ -ba --rcfile $(SRCDIR)/control/rpmrc \
|
||||
$(RPMDIR)/SPECS/ipmitool.spec
|
||||
|
||||
.PHONY: clean-rpm
|
||||
clean-rpm:
|
||||
-rm -rf $(RPMDIR)
|
||||
|
412
ipmitool/README
412
ipmitool/README
@ -1,412 +0,0 @@
|
||||
|
||||
ipmitool
|
||||
Duncan Laurie
|
||||
ipmitool-devel@lists.sourceforge.net
|
||||
|
||||
Overview
|
||||
========
|
||||
ipmitool is a utility for managing and configuring devices that support
|
||||
the Intelligent Platform Management Interface. IPMI is an open standard
|
||||
for monitoring, logging, recovery, inventory, and control of hardware
|
||||
that is implemented independent of the main CPU, BIOS, and OS. The
|
||||
service processor (or Baseboard Management Controller, BMC) is the brain
|
||||
behind platform management and its primary purpose is to handle the
|
||||
autonomous sensor monitoring and event logging features.
|
||||
|
||||
The ipmitool program provides a simple command-line interface to this BMC.
|
||||
It features the ability to read the sensor data repository (SDR) and print
|
||||
sensor values, display the contents of the System Event Log (SEL), print
|
||||
Field Replaceable Unit (FRU) inventory information, read and set LAN
|
||||
configuration parameters, and perform remote chassis power control.
|
||||
|
||||
|
||||
Background
|
||||
==========
|
||||
I originally wrote ipmitool while between projects and employeed at Sun
|
||||
Microsystems. Sun had just embarked on a new line of general-purpose x86
|
||||
servers that inclued an OEM Intel board with an IPMIv1.5 BMC on board.
|
||||
It started with an idea that remote chassis power control would be a handy
|
||||
feature for my systems in the lab and from there it grew into a multi-
|
||||
purpose tool that lots of people found useful. I decided to release it
|
||||
under a BSD license and give others the chance to make use of it.
|
||||
|
||||
ipmitool was not written to provide large-scale (aka Enterprise) management
|
||||
application functionality. The functionality that ipmitool proivides is
|
||||
easily accomplished by sending simple IPMI request messages and parsing
|
||||
the returned response. It is intended to be used by system administrators
|
||||
who like the simplicity and scriptability of command-line utilities, as
|
||||
well as those debugging or developing their own BMC implementations.
|
||||
|
||||
|
||||
Requirements
|
||||
============
|
||||
Obviously the largest requirement is hardware with a service processor
|
||||
that supports the IPMI specification. Many x86-based servers are now
|
||||
comming with IPMI support, check with your preferred hardware vendor
|
||||
about available prodcuts.
|
||||
|
||||
Once you are certain you have the required hardware, you then need to
|
||||
decide how you want to access the BMC. The most common case involve
|
||||
access through the System Interface or over the LAN. (or serial, but
|
||||
currently ipmitool does not support the serial interface)
|
||||
|
||||
|
||||
System Interface
|
||||
----------------
|
||||
There are multiple types of system interfaces, but they are all similar
|
||||
enough to allow a single well-designed driver to support them all.
|
||||
Different types of system interfaces include Keyboard Controller Style
|
||||
(KCS), Block Transfer (BT), System Management Interface Chip (SMIC) and
|
||||
SMBus. Different hardware vendors will have different preference and
|
||||
implementations.
|
||||
|
||||
On Linux the OpenIPMI kernel driver should support all of these system
|
||||
interfaces and it should be a simple matter of loading the right
|
||||
kernel modules and setting up the device node to use it. The driver
|
||||
module names vary slightly in different kernel versions, but for all
|
||||
releases you need these two modules:
|
||||
|
||||
ipmi_msghandler: incoming and outgoing message handler
|
||||
ipmi_devintf: character device interface to IPMI driver
|
||||
|
||||
For 2.4.x and early 2.6.x kernels you need to choose a module based on
|
||||
the type of system interface your hardware supports. For example:
|
||||
|
||||
ipmi_kcs_drv: Keyboard Controller Style driver
|
||||
|
||||
More recent 2.6.x kernels have combined these into a single module:
|
||||
|
||||
ipmi_si: a universal IPMI system interface driver
|
||||
|
||||
See the documentation that comes with your distribution and/or kernel
|
||||
for more information on what kernel modules are required. Once the
|
||||
required modules are loaded and the driver has found a suitable system
|
||||
interface to the BMC then you need to ensure the device node at
|
||||
/dev/ipmi0 is pointing at the correct major number.
|
||||
|
||||
This is because OpenIPMI is given a dynamically assigned major number
|
||||
when it is loaded, but depending on what other modules are present
|
||||
this number may be anywhere from 254 on down. The easiest way to tell
|
||||
is to check the output of /proc/devices and see what major number the
|
||||
"ipmidev" device is assigned to.
|
||||
|
||||
There is a sample script included with ipmitool called ipmi.init that
|
||||
can be used to automate this process at bootup.
|
||||
|
||||
|
||||
LAN Interface
|
||||
-------------
|
||||
This is often referred to as "IPMI-over-LAN" and defines how IPMI messages
|
||||
can be sent to and from the BMC encapsulated in Remote Management Control
|
||||
Protocol (RMCP) packets which are then transferred as UDP datagrams.
|
||||
|
||||
IPMI-over-LAN is only supported with version 1.5 and higher of the IPMI
|
||||
specification. The RMCP packet format is defined by the Alert Standard
|
||||
Forum, and it has been followed up with the RMCP+ protocol that adds
|
||||
encryption and payload support. The IPMIv2 specification was updated
|
||||
accordingly to to support the RMCP+ protocol and brings with it enhanced
|
||||
security with encryption as well as support for Serial over LAN.
|
||||
|
||||
There are different types of LAN interfaces as well. Some systems have
|
||||
shared management networks where the NIC will intercept UDP packets to
|
||||
port 623 and redirect them to the BMC over SMBUS. This type of LAN
|
||||
interface requires that the BMC be configured with the same settings that
|
||||
the system uses. It also suffers from an increased security risk just by
|
||||
the nature of sharing that interface with normal traffic.
|
||||
|
||||
I have also seen bugs in some implementations that have rendered the
|
||||
IPMI-over-LAN feature "dangerous" to enable in some situations. (in
|
||||
particular there can be an issue with RPC because it will sometimes choose
|
||||
to use port 623 and you will lose response packets...)
|
||||
|
||||
There is a sample shell script included with ipmitool called bmclanconf
|
||||
that can be used to simplify the LAN settings configuration process using
|
||||
the System Interface to configure the settings. In some cases the
|
||||
hardware will come with a utility (often a DOS bootable CD) for configuring
|
||||
enabling the LAN interface as well.
|
||||
|
||||
In order to support the IPMIv2.0 interface you must have an OpenSSL library
|
||||
with the required encrytion functions. Recent distributions should have
|
||||
no problems. The IPMIv1.5 interface will attempt to use OpenSSL for MD5
|
||||
hash function at compile time but if that is not found it will use an
|
||||
internal library.
|
||||
|
||||
IPMB Dual Bridging in IPMITOOL
|
||||
-------------------------------
|
||||
|
||||
IPMI offers a standard messaging interface.
|
||||
|
||||
The following concepts are related to this messaging interface:
|
||||
|
||||
Channel type : Communication channel type (SMS/KCS, IPMB, LAN)
|
||||
Channel number : Channel descriptor
|
||||
Requester : Address of the requester
|
||||
Responder : Address of the responder
|
||||
NetFN : The logical function for the request/response.
|
||||
Command : The command number
|
||||
Sequence : An ID identifiying the request/response pair
|
||||
Message tracking : The ability to match request/response pair.
|
||||
|
||||
When a communication is issued through any of the channels, an application
|
||||
formats a request and expect a response.
|
||||
|
||||
Direct Command
|
||||
--------------
|
||||
The simplest form of communication is a "direct command" using SMS/KCS
|
||||
|
||||
Example:
|
||||
ipmitool raw 6 4
|
||||
55 00
|
||||
|
||||
This send raw command 4 (selftest) from netfn 6(application) to KCS, the driver
|
||||
takes care of 'message tracking' and provides the answer.
|
||||
|
||||
Hopefully, the application also includes a "human readable" instance of the API:
|
||||
ipmitool mc selftest
|
||||
Selftest: passed
|
||||
|
||||
Bridged Command
|
||||
---------------
|
||||
One slightly more complicated communication mode is the so-called
|
||||
"bridged command" using IPMB.
|
||||
|
||||
Example:
|
||||
ipmitool -m 0x94 -t 0x9a raw 6 4
|
||||
55 00
|
||||
|
||||
or
|
||||
|
||||
ipmitool -m 0x94 -t 0x9a mc selftest
|
||||
Selftest: passed
|
||||
|
||||
|
||||
This still sends the same command 4 (selftest) from netfn 6(application) to
|
||||
the target. However, to do so, the command is encapsulated (by the driver) and
|
||||
sent using the command 0x34 (send message) from netfn 6(application) to KCS.
|
||||
Then KCS is polled by the driver until a message has been received, then the
|
||||
driver uses command 0x33 (get message). The driver also tracks the message
|
||||
and makes sure the response matches the request. Then it decapsultates the
|
||||
message and gives the response back to the application.
|
||||
|
||||
Dual Bridged Command
|
||||
--------------------
|
||||
Things get a little more ugly when the application needs to reach a management
|
||||
controller sitting on an interface (or channel) not directly connected to the
|
||||
BMC/IPMC. In the case the application must encapsulate its message itself and
|
||||
request the IPMC to deal with message tracking itself.
|
||||
|
||||
Its been working well with IPMITOOL on the LAN interface with:
|
||||
ipmitool -H <ip> -U <user> -P <password> -B 0 -T 0x8a -m 0x20 -t 0x7a -b 7
|
||||
mc selftest
|
||||
|
||||
However, trying to dual bridge commands locally with :
|
||||
ipmitool -B 0 -T 0x9a -m 0x94 -t 0x7a -b 7 mc selftest didn't work
|
||||
(it returned the same data as ipmitool -m 0x20 -t 0x7a -b 7 mc selftest )
|
||||
|
||||
The reason was that the "openipmi" interface pluging didn't
|
||||
encapsulate/decapsulate the message and didn't even detect the intent
|
||||
to double bridge the request.
|
||||
|
||||
./src/ipmitool -B 0 -T 0x8a -m 0x94 -t 0x7a -b 7 mc selftest
|
||||
|
||||
-B 0 : transit channel for first bridge level (channel 0: IPMB-0)
|
||||
-T 0x8a : transit destination address (remote IPMC address)
|
||||
-m 0x94 : source address (local IPMC address on IPMB-0)
|
||||
-t 0x7a : remote target (AMC IPMB-L address)
|
||||
-b 7 : remote channel (channel 7: IPMB-L)
|
||||
|
||||
The transit source address (remote IPMC address on remote channel) is
|
||||
automatically assigned by the remote IPMC.
|
||||
|
||||
Payload Size Limit
|
||||
------------------
|
||||
Because some commands return a lot of data (fru read/get sdr) and because 2
|
||||
levels of encapsulation are used, some command will fail.
|
||||
|
||||
For instance this works.
|
||||
|
||||
ipmitool -H <ip> -U <user> -P <password> -B 0 -T 0x8a -m 0x94 -t 0x7a -b 7
|
||||
mc selftest
|
||||
|
||||
but this does not:
|
||||
|
||||
ipmitool -H <ip> -U <user> -P <password> -B 0 -T 0x8a -m 0x94 -t 0x7a -b 7
|
||||
fru print.
|
||||
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
All invocations of ipmitool require specifying an interface to use, unless
|
||||
you want to use the default interface as set at compile time. Each call
|
||||
must also specify a command to run. You can see the list of supported
|
||||
interfaces and which is default as well as a list of top level commands in
|
||||
the usage output available with the -h option:
|
||||
|
||||
usage: ipmitool [options...] <command>
|
||||
|
||||
-h This help
|
||||
-V Show version information
|
||||
-v Verbose (can use multiple times)
|
||||
-c Display output in comma separated format
|
||||
-I intf Interface to use
|
||||
-H hostname Remote host name for LAN interface
|
||||
-p port Remote RMCP port [default=623]
|
||||
-L level Remote session privilege level [default=USER]
|
||||
-A authtype Force use of authtype NONE, PASSWORD, MD2 or MD5
|
||||
-U username Remote session username
|
||||
-P password Remote session password
|
||||
-f file Read remote session password from file
|
||||
-a Prompt for remote password
|
||||
-E Read password from IPMI_PASSWORD environment variable
|
||||
-m address Set local IPMB address
|
||||
-t address Bridge request to remote target address
|
||||
|
||||
Interfaces:
|
||||
open Linux OpenIPMI Interface [default]
|
||||
imb Intel IMB Interface
|
||||
lan IPMI v1.5 LAN Interface
|
||||
lanplus IPMI v2.0 RMCP+ LAN Interface
|
||||
|
||||
Commands:
|
||||
raw Send a RAW IPMI request and print response
|
||||
lan Configure LAN Channels
|
||||
chassis Get chassis status and set power state
|
||||
event Send pre-defined events to BMC
|
||||
bmc Print BMC status and configure global enables
|
||||
sdr Print Sensor Data Repository entries and readings
|
||||
sensor Print detailed sensor information
|
||||
fru Print built-in FRU and scan SDR for FRU locators
|
||||
sel Print System Evelnt Log
|
||||
sol Configure IPMIv2.0 Serial-over-LAN
|
||||
user Configure BMC users
|
||||
channel Configure BMC channels
|
||||
session Print session information
|
||||
shell Launch interactive IPMI shell
|
||||
exec Run list of commands from file
|
||||
set Set runtime variable for shell and exec
|
||||
|
||||
|
||||
Commands
|
||||
========
|
||||
More help on the supported commands can be found by running them with the
|
||||
help argument, for example "chassis help". There are a few commands with
|
||||
special meaning:
|
||||
|
||||
> shell: This command will launch an shell interface to the ipmitool
|
||||
command set. You can use this for interactively entering commands to
|
||||
monitor system status. An example session:
|
||||
|
||||
# ipmitool -I open shell
|
||||
ipmitool> chassis status
|
||||
System Power : off
|
||||
Power Overload : false
|
||||
Power Interlock : inactive
|
||||
Main Power Fault : false
|
||||
Power Control Fault : false
|
||||
Power Restore Policy : always-off
|
||||
Last Power Event : command
|
||||
Chassis Intrusion : active
|
||||
Front-Panel Lockout : inactive
|
||||
Drive Fault : false
|
||||
Cooling/Fan Fault : false
|
||||
ipmitool> user list 7
|
||||
ID Name Callin Link Auth IPMI Msg Channel Priv Limit
|
||||
1 true false true ADMINISTRATOR
|
||||
ipmitool> exit
|
||||
|
||||
> exec: This command will read a text file and execute ipmitool commands
|
||||
in sequence. It can be used for scriptable commands:
|
||||
|
||||
# cat lansetup.scr
|
||||
lan set 7 ipsrc static
|
||||
lan set 7 ipaddr 10.1.1.10
|
||||
lan set 7 netmask 255.255.255.0
|
||||
lan set 7 defgw ipaddr 10.1.1.254
|
||||
# ipmitool -I open exec lansetup.scr
|
||||
Setting LAN IP Address to 10.1.1.10
|
||||
Setting Lan Subnet Mask to 255.255.255.0
|
||||
Setting Lan Default Gateway IP to 10.1.1.254
|
||||
|
||||
> set: This command can be used by the shell and exec modes to configure
|
||||
various session parameters:
|
||||
|
||||
hostname <host> Session hostname
|
||||
username <user> Session username
|
||||
password <pass> Session password
|
||||
privlvl <level> Session privilege level force
|
||||
authtype <type> Authentication type force
|
||||
localaddr <addr> Local IPMB address
|
||||
targetaddr <addr> Remote target IPMB address
|
||||
port <port> Remote RMCP port
|
||||
csv [level] enable output in comma separated format
|
||||
verbose [level] Verbose level
|
||||
|
||||
# cat getstatus.scr
|
||||
set hostname sf-v20z-1
|
||||
set password admin
|
||||
chassis status
|
||||
# ipmitool -I lan exec getstatus.scr
|
||||
Set session hostname to lx50
|
||||
Set session password
|
||||
System Power : off
|
||||
Power Overload : false
|
||||
Power Interlock : inactive
|
||||
Main Power Fault : false
|
||||
Power Control Fault : false
|
||||
Power Restore Policy : always-off
|
||||
Last Power Event : command
|
||||
Chassis Intrusion : active
|
||||
Front-Panel Lockout : inactive
|
||||
Drive Fault : false
|
||||
Cooling/Fan Fault : false
|
||||
|
||||
|
||||
ipmievd
|
||||
=======
|
||||
Included with ipmitool is another utility called ipmievd that 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. By default when run (as root) with
|
||||
no arguments it will daemonize and poll on the OpenIPMI device waiting for
|
||||
an event notification. Upon receipt of an event it will log it to syslog
|
||||
with the LOG_LOCAL4 facility. You can test ipmievd by sending test events
|
||||
over the LAN interface with ipmitool:
|
||||
|
||||
remote# ipmievd
|
||||
|
||||
local$ ipmitool -I lan -H lx50 -P admin event help
|
||||
usage: event <num>
|
||||
1 : Temperature - Upper Critical - Going High
|
||||
2 : Voltage Threshold - Lower Critical - Going Low
|
||||
3 : Memory - Correctable ECC
|
||||
local$ ipmitool -I lan -H lx50 -P admin event 1
|
||||
Sending Temperature - Upper Critical - Going High event to BMC
|
||||
local$ ipmitool -I lan -H lx50 -P admin event 2
|
||||
Sending Voltage Threshold - Lower Critical - Going Low event to BMC
|
||||
local$ ipmitool -I lan -H lx50 -P admin event 3
|
||||
Sending Memory - Correctable ECC event to BMC
|
||||
|
||||
remote# tail /var/log/messages (timestamps removed)
|
||||
ipmievd: Waiting for events...
|
||||
ipmievd: Temperature Sensor 30 - Upper Critical - going high
|
||||
ipmievd: Voltage Sensor 60 - Lower Critical - going low
|
||||
ipmievd: Memory Sensor 01 - Correctable ECC
|
||||
|
||||
|
||||
Resources
|
||||
=========
|
||||
IPMItool homepage
|
||||
http://ipmitool.sourceforge.net
|
||||
|
||||
IPMItool manpage
|
||||
http://ipmitool.sourceforge.net/manpage.html
|
||||
|
||||
IPMItool overview paper from Linux.conf.au 2004
|
||||
http://ipmitool.sourceforge.net/lca2004_ipmitool.pdf
|
||||
|
||||
Intelligent Platform Management Interface specification
|
||||
http://www.intel.com/design/servers/ipmi/spec.htm
|
||||
|
||||
OpenIPMI project: Linux IPMI kernel driver and userland library
|
||||
http://openipmi.sourceforge.net
|
||||
|
@ -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
|
||||
|
@ -2,46 +2,78 @@ dnl
|
||||
dnl autoconf for ipmitool
|
||||
dnl
|
||||
AC_INIT([src/ipmitool.c])
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE([ipmitool], [1.8.13-cvs])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE([ipmitool], [1.5.7])
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
AC_CONFIG_SRCDIR([src/ipmitool.c])
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
IPMITOOL_PKG=ipmitool
|
||||
AC_SUBST(IPMITOOL_PKG)
|
||||
AC_SUBST(ac_configure_args)
|
||||
|
||||
dnl check for requirements
|
||||
dnl check for programs
|
||||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
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([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/socket.h])
|
||||
AC_CHECK_HEADERS([sys/byteorder.h byteswap.h])
|
||||
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_FUNC_STRTOD
|
||||
AC_CHECK_FUNCS([alarm gethostbyname socket select])
|
||||
AC_CHECK_FUNCS([memmove memset strchr strdup strerror])
|
||||
AC_CHECK_FUNCS([getpassphrase])
|
||||
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing -Wreturn-type"
|
||||
AC_CHECK_PROG(SED, sed, sed)
|
||||
|
||||
dnl setup libtool
|
||||
AC_LIBTOOL_DLOPEN
|
||||
AM_PROG_LIBTOOL
|
||||
LIBTOOL="$LIBTOOL --silent"
|
||||
|
||||
AC_SEARCH_LIBS([gethostbyname], [nsl])
|
||||
AC_SEARCH_LIBS([socket], [socket], [],
|
||||
[AC_CHECK_LIB([nsl], [socket],
|
||||
[LIBS="$LIBS -lsocket -lnsl"], [], [-lsocket])])
|
||||
AC_CHECK_LIB([m], [pow], [], [
|
||||
echo "** libm library pow() not found!"
|
||||
exit 1
|
||||
])
|
||||
|
||||
AC_SEARCH_LIBS(gethostbyname, nsl)
|
||||
AC_SEARCH_LIBS(socket, socket, ,
|
||||
[AC_CHECK_LIB(nsl, socket, LIBS="$LIBS -lsocket -lnsl", , -lsocket)])
|
||||
|
||||
AC_CHECK_LIB([ltdl], [lt_dlopen], [], [
|
||||
echo "** libltdl library lt_dlopen() not found!"
|
||||
exit 1
|
||||
])
|
||||
|
||||
dnl check for headers
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h sys/stat.h unistd.h])
|
||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/socket.h])
|
||||
|
||||
dnl check for typedefs, structs, and compiler options
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
|
||||
dnl check for lib functions
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
AC_FUNC_MALLOC
|
||||
AC_FUNC_SELECT_ARGTYPES
|
||||
AC_FUNC_STAT
|
||||
AC_FUNC_STRTOD
|
||||
AC_CHECK_FUNCS([alarm gethostbyname socket select])
|
||||
AC_CHECK_FUNCS([memmove memset strchr strdup strerror])
|
||||
|
||||
dnl check for byteswap functionality
|
||||
AC_CHECK_HEADERS([asm/byteorder.h byteswap.h])
|
||||
AC_CHECK_FUNCS([bswap_16 bswap_32])
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
dnl set kernel directory for openipmi header files
|
||||
AC_ARG_WITH([kerneldir],
|
||||
[[ --with-kerneldir=DIR Set kernel path to DIR]],
|
||||
[kerneldir="$withval"],
|
||||
[kerneldir="/usr/src/linux-2.4"])
|
||||
CFLAGS="$CFLAGS -I${kerneldir}/include"
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
have_openipmi=no
|
||||
AC_CHECK_HEADER([linux/ipmi.h],
|
||||
[have_openipmi=yes],
|
||||
[AC_MSG_WARN([Unable to find OpenIPMI header files])])
|
||||
|
||||
if test "x$prefix" = "xNONE"; then
|
||||
prefix="$ac_default_prefix"
|
||||
@ -51,576 +83,55 @@ if test "x$exec_prefix" = "xNONE"; then
|
||||
exec_prefix="$prefix"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl set default option values
|
||||
dnl
|
||||
dnl enable plugins for interfaces
|
||||
AC_ARG_WITH([plugin-path],
|
||||
[[ --with-plugin-path=DIR Set plugin path to DIR]],
|
||||
[pluginpath="$withval"],
|
||||
[pluginpath="${exec_prefix}/lib/ipmitool"])
|
||||
|
||||
xenable_intf_bmc=no
|
||||
xenable_intf_imb=yes
|
||||
xenable_intf_open=yes
|
||||
xenable_intf_lipmi=yes
|
||||
#xenable_intf_serial=yes
|
||||
xenable_all_options=yes
|
||||
xenable_ipmishell=yes
|
||||
AC_DEFINE_UNQUOTED(PLUGIN_PATH, "$pluginpath", "IPMI interface plugin path")
|
||||
AC_SUBST(pluginpath)
|
||||
|
||||
dnl set some things so we build with GNU tools on Solaris
|
||||
case "$host_os" in
|
||||
solaris*)
|
||||
MAKE=gmake
|
||||
STRIP=gstrip
|
||||
LD=gld
|
||||
AR=gar
|
||||
# openssl libs are in /usr/sfw/lib on solaris 10
|
||||
LIBS="$LIBS -R/usr/sfw/lib"
|
||||
# disable the linux-specific interfaces
|
||||
xenable_intf_bmc=yes
|
||||
xenable_intf_imb=no
|
||||
xenable_intf_open=no
|
||||
xenable_intf_lipmi=no
|
||||
xenable_ipmishell=no
|
||||
xenable_all_options=no
|
||||
;;
|
||||
*cygwin*)
|
||||
# disable the linux and solaris-specific interfaces
|
||||
xenable_intf_imb=no
|
||||
xenable_intf_open=no
|
||||
xenable_intf_lipmi=no
|
||||
xenable_intf_bmc=no
|
||||
;;
|
||||
*darwin*|aix*)
|
||||
# disable the linux and solaris-specific interfaces
|
||||
xenable_intf_imb=no
|
||||
xenable_intf_open=no
|
||||
xenable_intf_lipmi=no
|
||||
xenable_intf_bmc=no
|
||||
xenable_ipmishell=no
|
||||
;;
|
||||
*freebsd*)
|
||||
xenable_intf_imb=no
|
||||
xenable_intf_lipmi=no
|
||||
xenable_intf_bmc=no
|
||||
;;
|
||||
*netbsd*)
|
||||
xenable_intf_imb=no
|
||||
xenable_intf_lipmi=no
|
||||
xenable_intf_bmc=no
|
||||
xenable_intf_open=no
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(ARCH, $host_cpu)
|
||||
AC_SUBST(OS, $host_os)
|
||||
AC_SUBST(PSTAMP, $host)
|
||||
AC_SUBST(BASEDIR, $prefix)
|
||||
|
||||
dnl allow solaris builds to include all options
|
||||
AC_ARG_ENABLE([solaris-opt],
|
||||
[AC_HELP_STRING([--enable-solaris-opt],
|
||||
[enable all options for Solaris [default=no]])],
|
||||
[xenable_solaris_opt=$enableval],
|
||||
[xenable_solaris_opt=no])
|
||||
if test "x$xenable_all_options" = "xyes" || test "x$xenable_solaris_opt" = "xyes"; then
|
||||
AC_DEFINE(ENABLE_ALL_OPTIONS, [1], [Define to 1 to enable all command line options.])
|
||||
fi
|
||||
|
||||
dnl check for OpenSSL functionality
|
||||
AC_ARG_ENABLE([internal-md5],
|
||||
[AC_HELP_STRING([--enable-internal-md5],
|
||||
[enable internal MD5 library [default=no]])],
|
||||
[xenable_internal_md5=$enableval],
|
||||
[xenable_internal_md5=no])
|
||||
|
||||
AC_CHECK_LIB([crypto], [EVP_aes_128_cbc],
|
||||
[if test "x$xenable_internal_md5" != "xyes"; then
|
||||
have_crypto=yes; LIBS="$LIBS -lcrypto"
|
||||
fi],
|
||||
[have_crypto=no], [-lcrypto])
|
||||
|
||||
AC_CHECK_LIB([crypto], [MD5_Init],
|
||||
[if test "x$xenable_internal_md5" != "xyes"; then
|
||||
if test "x$have_crypto" != "xyes"; then
|
||||
LIBS="$LIBS -lcrypto"
|
||||
have_md5=yes
|
||||
fi
|
||||
AC_DEFINE(HAVE_CRYPTO_MD5, [1], [Define to 1 if libcrypto supports MD5.])
|
||||
fi],
|
||||
[], [-lcrypto])
|
||||
|
||||
AC_CHECK_LIB([crypto], [MD2_Init],
|
||||
[if test "x$xenable_internal_md5" != "xyes"; then
|
||||
if test "x$have_crypto" != "xyes" && test "x$have_md5" != "xyes"; then
|
||||
LIBS="$LIBS -lcrypto"
|
||||
have_md2=yes
|
||||
fi
|
||||
AC_DEFINE(HAVE_CRYPTO_MD2, [1], [Define to 1 if libcrypto supports MD2.])
|
||||
fi],
|
||||
[], [-lcrypto])
|
||||
|
||||
dnl enable IPMIv1.5 LAN interface
|
||||
AC_ARG_ENABLE([intf-lan],
|
||||
[AC_HELP_STRING([--enable-intf-lan],
|
||||
[enable IPMIv1.5 LAN interface [default=yes]])],
|
||||
[xenable_intf_lan=$enableval],
|
||||
[xenable_intf_lan=yes])
|
||||
if test "x$xenable_intf_lan" = "xstatic" || test "x$xenable_intf_lan" = "xplugin"; then
|
||||
xenable_intf_lan=yes
|
||||
fi
|
||||
if test "x$xenable_intf_lan" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_LAN, [1], [Define to 1 to enable LAN IPMIv1.5 interface.])
|
||||
AC_SUBST(INTF_LAN, [lan])
|
||||
AC_SUBST(INTF_LAN_LIB, [libintf_lan.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB lan/libintf_lan.la"
|
||||
fi
|
||||
[[ --enable-intf-lan enable IPMI-over-LAN interface [default=yes]]],
|
||||
[if test "x$enableval" = "xyes"; then
|
||||
PLUGINS="$PLUGINS lan"
|
||||
fi],
|
||||
[PLUGINS="$PLUGINS lan"])
|
||||
|
||||
dnl enable IPMIv2.0 RMCP+ LAN interface
|
||||
AC_ARG_ENABLE([intf-lanplus],
|
||||
[AC_HELP_STRING([--enable-intf-lanplus],
|
||||
[enable IPMIv2.0 RMCP+ LAN interface [default=auto]])],
|
||||
[xenable_intf_lanplus=$enableval],
|
||||
[xenable_intf_lanplus=$have_crypto])
|
||||
if test "x$xenable_intf_lanplus" = "xstatic" || test "x$xenable_intf_lanplus" = "xplugin"; then
|
||||
xenable_intf_lanplus=yes
|
||||
fi
|
||||
if test "x$xenable_intf_lanplus" != "xno" && test "x$have_crypto" != "xyes"; then
|
||||
echo "** The lanplus interface requires an SSL library with EVP_aes_128_cbc defined."
|
||||
xenable_intf_lanplus=no
|
||||
fi
|
||||
if test "x$xenable_intf_lanplus" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_LANPLUS, [1], [Define to 1 to enable LAN+ IPMIv2 interface.])
|
||||
AC_SUBST(INTF_LANPLUS, [lanplus])
|
||||
AC_SUBST(INTF_LANPLUS_LIB, [libintf_lanplus.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB lanplus/libintf_lanplus.la"
|
||||
else
|
||||
xenable_intf_lanplus=no
|
||||
fi
|
||||
|
||||
ORIG_CPPFLAGS=$CPPFLAGS
|
||||
|
||||
dnl enable serial interface
|
||||
AC_ARG_ENABLE([intf-serial],
|
||||
[AC_HELP_STRING([--enable-intf-serial],
|
||||
[enable direct Serial Basic/Terminal mode interface [default=yes]])],
|
||||
[xenable_intf_serial=$enableval], [xenable_intf_serial=yes])
|
||||
if test "x$enable_intf_serial" = "xstatic" || test "x$enable_intf_serial" = "xplugin"; then
|
||||
xenable_intf_serial=yes
|
||||
fi
|
||||
if test "x$xenable_intf_serial" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_SERIAL, [1], [Define to 1 to enable serial interface.])
|
||||
AC_SUBST(INTF_SERIAL, [serial])
|
||||
AC_SUBST(INTF_SERIAL_LIB, [libintf_serial.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB serial/libintf_serial.la"
|
||||
else
|
||||
xenable_intf_serial=no
|
||||
fi
|
||||
|
||||
dnl look for OpenIPMI header files
|
||||
AC_ARG_WITH([kerneldir],
|
||||
[AC_HELP_STRING([--with-kerneldir=DIR],
|
||||
[set kernel include path to DIR])],
|
||||
[if test "x$with_kerneldir" = "xyes"; then
|
||||
with_kerneldir="/lib/modules/`uname -r`/build"
|
||||
fi
|
||||
CFLAGS="$CFLAGS -I ${with_kerneldir}/include"
|
||||
AC_SUBST(CFLAGS)
|
||||
CPPFLAGS="$CPPFLAGS -I ${with_kerneldir}/include"
|
||||
AC_SUBST(CPPFLAGS)
|
||||
if test -s ${with_kerneldir}/include/linux/version.h ; then
|
||||
kernelver=`grep UTS_RELEASE ${with_kerneldir}/include/linux/version.h | \
|
||||
sed 's/^\#define UTS_RELEASE \"\(2\.[0-9]\)\..*/\1/'`
|
||||
if test "x$kernelver" = "x2.6"; then
|
||||
CPPFLAGS="$CPPFLAGS -D__user="
|
||||
AC_SUBST(CPPFLAGS)
|
||||
AC_ARG_ENABLE([intf-open],
|
||||
[[ --enable-intf-open enable OpenIPMI device interface [default=no]]],
|
||||
[if test "x$enableval" = "xyes"; then
|
||||
if test "x$have_openipmi" = "xyes"; then
|
||||
PLUGINS="$PLUGINS open"
|
||||
else
|
||||
echo "** Unable to build OpenIPMI interface support!"
|
||||
exit 1
|
||||
fi
|
||||
fi])
|
||||
|
||||
AH_TEMPLATE([HAVE_LINUX_COMPILER_H], [])
|
||||
AC_MSG_CHECKING([for linux/compiler.h])
|
||||
AC_SUBST(PLUGINS)
|
||||
|
||||
m4_version_prereq([2.68],
|
||||
[AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <linux/compiler.h>]])],
|
||||
[AC_DEFINE(HAVE_LINUX_COMPILER_H, [1],
|
||||
[Define to 1 if you have the <linux/compiler.h> header file.])
|
||||
AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])])],
|
||||
[AC_PREPROC_IFELSE([#include <linux/compiler.h>],
|
||||
[AC_DEFINE(HAVE_LINUX_COMPILER_H, [1],
|
||||
[Define to 1 if you have the <linux/compiler.h> header file.])
|
||||
AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])])])
|
||||
AC_ARG_ENABLE([ipmievd],
|
||||
[[ --enable-ipmievd enable IPMI event daemon [default=no]]],,)
|
||||
|
||||
CPPFLAGS=$ORIG_CPPFLAGS
|
||||
AC_SUBST(CPPFLAGS)
|
||||
AM_CONDITIONAL(IPMIEVD, test "x$enable_ipmievd" = "xyes")
|
||||
|
||||
AC_CHECK_HEADER([sys/ioccom.h],
|
||||
[AC_DEFINE(HAVE_SYS_IOCCOM_H, [1],
|
||||
[Define to 1 if you have the <sys/ioccom.h> header file.])])
|
||||
|
||||
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 FreeIPMI files
|
||||
AC_CHECK_LIB(freeipmi, ipmi_open_inband, [have_free=yes], [have_free=no])
|
||||
if test "x$have_free" != "xyes"; then
|
||||
AC_CHECK_LIB(freeipmi, ipmi_ctx_open_inband, [have_free=yes], [have_free=no])
|
||||
fi
|
||||
AC_ARG_ENABLE([intf-free],
|
||||
[AC_HELP_STRING([--enable-intf-free],
|
||||
[enable FreeIPMI IPMI interface [default=auto]])],
|
||||
[xenable_intf_free=$enableval],
|
||||
[xenable_intf_free=$have_free])
|
||||
if test "x$xenable_intf_free" = "xstatic" || test "x$xenable_intf_free" = "xplugin"; then
|
||||
xenable_intf_free=yes
|
||||
fi
|
||||
if test "x$xenable_intf_free" != "xno" && test "x$have_free" != "xyes"; then
|
||||
echo "** Unable to build FreeIPMI interface support!"
|
||||
xenable_intf_free=no
|
||||
fi
|
||||
if test "x$xenable_intf_free" = "xyes"; then
|
||||
dnl Determine if you got the right FreeIPMI version
|
||||
AC_MSG_CHECKING([for libfreeipmi version 0.3.0])
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h> /* For size_t */
|
||||
#include <stdio.h> /* For NULL */
|
||||
#include <freeipmi/freeipmi.h>
|
||||
#include <freeipmi/udm/ipmi-udm.h>
|
||||
], [
|
||||
ipmi_device_t dev;
|
||||
dev = ipmi_open_inband(IPMI_DEVICE_KCS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
0);
|
||||
], ac_free_version_0_3_0=yes, ac_free_version_0_3_0=no)
|
||||
AC_MSG_RESULT($ac_free_version_0_3_0)
|
||||
AC_MSG_CHECKING([for libfreeipmi version 0.4.0])
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h> /* For size_t */
|
||||
#include <stdio.h> /* For NULL */
|
||||
#include <freeipmi/freeipmi.h>
|
||||
#include <freeipmi/udm/ipmi-udm.h>
|
||||
], [
|
||||
ipmi_device_t dev = NULL;
|
||||
int rv;
|
||||
dev = ipmi_device_create();
|
||||
rv = ipmi_open_inband(dev,
|
||||
IPMI_DEVICE_KCS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
0);
|
||||
], ac_free_version_0_4_0=yes, ac_free_version_0_4_0=no)
|
||||
AC_MSG_RESULT($ac_free_version_0_4_0)
|
||||
AC_MSG_CHECKING([for libfreeipmi version 0.5.0])
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h> /* For size_t */
|
||||
#include <stdio.h> /* For NULL */
|
||||
#include <freeipmi/freeipmi.h>
|
||||
#include <freeipmi/udm/ipmi-udm.h>
|
||||
], [
|
||||
ipmi_device_t dev = NULL;
|
||||
int rv;
|
||||
dev = ipmi_device_create();
|
||||
rv = ipmi_open_inband(dev,
|
||||
IPMI_DEVICE_KCS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
0,
|
||||
0);
|
||||
], ac_free_version_0_5_0=yes, ac_free_version_0_5_0=no)
|
||||
AC_MSG_RESULT($ac_free_version_0_5_0)
|
||||
|
||||
AC_MSG_CHECKING([for libfreeipmi version 0.6.0])
|
||||
AC_TRY_COMPILE([
|
||||
#include <stdio.h> /* For NULL */
|
||||
#include <freeipmi/freeipmi.h>
|
||||
], [
|
||||
ipmi_ctx_t ctx = NULL;
|
||||
int rv;
|
||||
ctx = ipmi_ctx_create();
|
||||
rv = ipmi_ctx_open_inband(ctx,
|
||||
IPMI_DEVICE_KCS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
0,
|
||||
0);
|
||||
], ac_free_version_0_6_0=yes, ac_free_version_0_6_0=no)
|
||||
AC_MSG_RESULT($ac_free_version_0_6_0)
|
||||
|
||||
if test "x$ac_free_version_0_3_0" = "xyes" \
|
||||
|| test "x$ac_free_version_0_4_0" = "xyes" \
|
||||
|| test "x$ac_free_version_0_5_0" = "xyes" \
|
||||
|| test "x$ac_free_version_0_6_0" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_FREE, [1], [Define to 1 to enable FreeIPMI interface.])
|
||||
AC_SUBST(INTF_FREE, [free])
|
||||
AC_SUBST(INTF_FREE_LIB, [libintf_free.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB free/libintf_free.la"
|
||||
if test "x$ac_free_version_0_3_0" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_FREE_0_3_0, [1], [Define to 1 for FreeIPMI 0.3.0.])
|
||||
fi
|
||||
if test "x$ac_free_version_0_4_0" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_FREE_0_4_0, [1], [Define to 1 for FreeIPMI 0.4.0.])
|
||||
fi
|
||||
if test "x$ac_free_version_0_5_0" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_FREE_0_5_0, [1], [Define to 1 for FreeIPMI 0.5.0.])
|
||||
fi
|
||||
if test "x$ac_free_version_0_6_0" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_FREE_0_6_0, [1], [Define to 1 for FreeIPMI 0.6.0.])
|
||||
fi
|
||||
else
|
||||
xenable_intf_free=no
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(freeipmi,
|
||||
ipmi_cmd_raw_ipmb,
|
||||
AC_DEFINE(IPMI_INTF_FREE_BRIDGING, [1],
|
||||
[Define to 1 to enable FreeIPMI Bridging Support.]))
|
||||
fi
|
||||
|
||||
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."])])
|
||||
|
||||
dnl set RPM distro tag for use in RPM name
|
||||
AC_ARG_WITH([rpm-distro],
|
||||
[AC_HELP_STRING([--with-rpm-distro=DISTRO],
|
||||
[set Linux distribution tag for use in RPM version string])],
|
||||
[AC_SUBST(DISTRO, $with_rpm_distro)])
|
||||
|
||||
dnl set RPM release tag
|
||||
AC_ARG_WITH([rpm-release],
|
||||
[AC_HELP_STRING([--with-rpm-release=RELEASE],
|
||||
[set release number for RPM release field])],
|
||||
[], [with_rpm_release=1])
|
||||
AC_SUBST(RPM_RELEASE, $with_rpm_release)
|
||||
|
||||
dnl enable Linux OpenIPMI interface
|
||||
AC_ARG_ENABLE([intf-open],
|
||||
[AC_HELP_STRING([--enable-intf-open],
|
||||
[enable Linux OpenIPMI interface [default=auto]])],
|
||||
[xenable_intf_open=$enableval],
|
||||
[])
|
||||
if test "x$xenable_intf_open" = "xstatic" || test "x$xenable_intf_open" = "xplugin"; then
|
||||
xenable_intf_open=yes
|
||||
fi
|
||||
if test "x$xenable_intf_open" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_OPEN, [1], [Define to 1 to enable Linux OpenIPMI interface.])
|
||||
AC_SUBST(INTF_OPEN, [open])
|
||||
AC_SUBST(INTF_OPEN_LIB, [libintf_open.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB open/libintf_open.la"
|
||||
|
||||
dnl Check for dual bridge support in OpenIPMI
|
||||
AC_MSG_CHECKING([for OpenIPMI dual bridge support])
|
||||
have_openipmi_dual_bridge=no
|
||||
ORIG_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS -Isrc/plugins/open -DENABLE_INTF_OPEN_DUAL_BRIDGE"
|
||||
AC_TRY_COMPILE([
|
||||
#if defined(HAVE_OPENIPMI_H)
|
||||
# if defined(HAVE_LINUX_COMPILER_H)
|
||||
# include <linux/compiler.h>
|
||||
# endif
|
||||
# include <linux/ipmi.h>
|
||||
#elif defined(HAVE_FREEBSD_IPMI_H)
|
||||
# include <sys/ipmi.h>
|
||||
#else
|
||||
# include "open.h"
|
||||
#endif
|
||||
], [
|
||||
struct ipmi_ipmb_addr a;
|
||||
a.transit_slave_addr = 0;
|
||||
], [have_openipmi_dual_bridge=yes])
|
||||
if test x"$have_openipmi_dual_bridge" = x"yes"; then
|
||||
AC_DEFINE(ENABLE_INTF_OPEN_DUAL_BRIDGE, [1],
|
||||
[Define to 1 to enable OpenIPMI interface dual bridge support])
|
||||
fi
|
||||
CPPFLAGS="$ORIG_CPPFLAGS"
|
||||
AC_MSG_RESULT([$have_openipmi_dual_bridge])
|
||||
fi
|
||||
|
||||
dnl enable Intel IMB interface
|
||||
AC_ARG_ENABLE([intf-imb],
|
||||
[AC_HELP_STRING([--enable-intf-imb],
|
||||
[enable Intel IMB driver interface [default=auto]])],
|
||||
[xenable_intf_imb=$enableval],
|
||||
[])
|
||||
if test "x$xenable_intf_imb" = "xstatic" || test "x$xenable_intf_imb" = "xplugin"; then
|
||||
xenable_intf_imb=yes
|
||||
fi
|
||||
if test "x$xenable_intf_imb" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_IMB, [1], [Define to 1 to enable Intel IMB interface.])
|
||||
AC_SUBST(INTF_IMB, [imb])
|
||||
AC_SUBST(INTF_IMB_LIB, [libintf_imb.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB imb/libintf_imb.la"
|
||||
fi
|
||||
|
||||
dnl enable Solaris LIPMI interface
|
||||
AC_CHECK_HEADER([sys/lipmi/lipmi_intf.h], [have_lipmi=yes], [have_lipmi=no])
|
||||
AC_ARG_ENABLE([intf-lipmi],
|
||||
[AC_HELP_STRING([--enable-intf-lipmi],
|
||||
[enable Solaris 9 x86 IPMI interface [default=no]])],
|
||||
[xenable_intf_lipmi=$enableval],
|
||||
[])
|
||||
if test "x$xenable_intf_lipmi" = "xstatic" || test "x$xenable_intf_lipmi" = "xplugin"; then
|
||||
xenable_intf_lipmi=yes
|
||||
fi
|
||||
if test "x$xenable_intf_lipmi" != "xno" && test "x$have_lipmi" != "xyes"; then
|
||||
echo "** Unable to build Solaris 9 x86 IPMI interface support!"
|
||||
xenable_intf_lipmi=no
|
||||
fi
|
||||
if test "x$xenable_intf_lipmi" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_LIPMI, [1], [Define to 1 to enable Solaris 9 LIPMI interface.])
|
||||
AC_SUBST(INTF_LIPMI, [lipmi])
|
||||
AC_SUBST(INTF_LIPMI_LIB, [libintf_lipmi.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB lipmi/libintf_lipmi.la"
|
||||
fi
|
||||
|
||||
dnl enable Solaris BMC interface
|
||||
AC_ARG_ENABLE([intf-bmc],
|
||||
[AC_HELP_STRING([--enable-intf-bmc],
|
||||
[enable Solaris 10 x86 IPMI interface [default=auto]])],
|
||||
[xenable_intf_bmc=$enableval],
|
||||
[xenable_intf_bmc=no])
|
||||
if test "x$xenable_intf_bmc" = "xstatic" || test "x$xenable_intf_bmc" = "xplugin"; then
|
||||
xenable_intf_bmc=yes
|
||||
fi
|
||||
if test "x$xenable_intf_bmc" = "xyes"; then
|
||||
AC_DEFINE(IPMI_INTF_BMC, [1], [Define to 1 to enable Solaris 10 BMC interface.])
|
||||
AC_SUBST(INTF_BMC, [bmc])
|
||||
AC_SUBST(INTF_BMC_LIB, [libintf_bmc.la])
|
||||
IPMITOOL_INTF_LIB="$IPMITOOL_INTF_LIB bmc/libintf_bmc.la"
|
||||
fi
|
||||
|
||||
AC_SUBST(IPMITOOL_INTF_LIB)
|
||||
|
||||
if test "x$xenable_ipmishell" = "xyes"; then
|
||||
AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses readline termcap])
|
||||
AC_SEARCH_LIBS([initscr], [ncurses curses], [have_curses=yes])
|
||||
AC_SEARCH_LIBS([readline], [readline edit], [have_readline=yes])
|
||||
if test "x$have_curses" != "xyes" || test "x$have_readline" != "xyes"; then
|
||||
xenable_ipmishell=no
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl check for readline library to enable ipmi shell
|
||||
AC_ARG_ENABLE([ipmishell],
|
||||
[AC_HELP_STRING([--enable-ipmishell],
|
||||
[enable IPMI shell interface [default=auto]])],
|
||||
[xenable_ipmishell=$enableval],
|
||||
[])
|
||||
if test "x$xenable_ipmishell" = "xyes"; then
|
||||
AC_SEARCH_LIBS([tgetent], [tinfo ncurses curses readline termcap])
|
||||
AC_SEARCH_LIBS([initscr], [ncurses curses], [have_curses=yes])
|
||||
AC_SEARCH_LIBS([readline], [readline edit], [have_readline=yes])
|
||||
if test "x$have_curses" != "xyes"; then
|
||||
AC_MSG_ERROR([** Unable to find curses required by ipmishell.])
|
||||
fi
|
||||
if test "x$have_readline" != "xyes"; then
|
||||
AC_MSG_ERROR([** Unable to find readline required by ipmishell.])
|
||||
fi
|
||||
AC_DEFINE(HAVE_READLINE, [1], [Define to 1 if readline present.])
|
||||
fi
|
||||
|
||||
dnl Enable -Wall -Werror
|
||||
AC_ARG_ENABLE([buildcheck],
|
||||
[AC_HELP_STRING([--enable-buildcheck],
|
||||
[enable -Wall -Werror for build testing [default=no]])],
|
||||
[xenable_buildcheck=$enableval],
|
||||
[xenable_buildcheck=no])
|
||||
if test "x$xenable_buildcheck" != "xno"; then
|
||||
CFLAGS="$CFLAGS -Wall -Werror -Wpointer-arith -Wstrict-prototypes"
|
||||
fi
|
||||
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]])],
|
||||
[xenable_file_security=$enableval],
|
||||
[xenable_file_security=no])
|
||||
if test "x$xenable_file_security" != "xno"; then
|
||||
AC_DEFINE(ENABLE_FILE_SECURITY, [1], [Define to 1 for extra file security.])
|
||||
fi
|
||||
|
||||
|
||||
AC_TRY_COMPILE([],[
|
||||
#include <stdio.h>
|
||||
|
||||
struct packstruct {
|
||||
unsigned char t0 :5;
|
||||
unsigned char t1 :5;
|
||||
unsigned char t2 :5;
|
||||
unsigned char t3 :5;
|
||||
unsigned char t4 :4;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
int
|
||||
main(int argc, char ** argv)
|
||||
{
|
||||
if(sizeof(struct packstruct) != 3)
|
||||
return(1);
|
||||
else
|
||||
return(0);
|
||||
}
|
||||
],
|
||||
[],
|
||||
[AC_DEFINE(HAVE_PRAGMA_PACK,[1],
|
||||
[Define to 1 if you need to use #pragma pack instead of __attribute__ ((packed))])]
|
||||
)
|
||||
|
||||
|
||||
dnl Generate files for build
|
||||
AC_CONFIG_FILES([Makefile
|
||||
AC_CONFIG_FILES([ipmitool.spec
|
||||
Makefile
|
||||
doc/Makefile
|
||||
contrib/Makefile
|
||||
control/Makefile
|
||||
control/pkginfo
|
||||
control/prototype
|
||||
control/rpmmacros
|
||||
control/ipmitool.spec
|
||||
lib/Makefile
|
||||
include/Makefile
|
||||
include/ipmitool/Makefile
|
||||
src/Makefile
|
||||
src/plugins/Makefile
|
||||
src/plugins/lan/Makefile
|
||||
src/plugins/lanplus/Makefile
|
||||
src/plugins/open/Makefile
|
||||
src/plugins/free/Makefile
|
||||
src/plugins/imb/Makefile
|
||||
src/plugins/bmc/Makefile
|
||||
src/plugins/lipmi/Makefile
|
||||
src/plugins/serial/Makefile])
|
||||
src/plugins/open/Makefile])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_RESULT([ipmitool $VERSION])
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_RESULT([Interfaces])
|
||||
AC_MSG_RESULT([ lan : $xenable_intf_lan])
|
||||
AC_MSG_RESULT([ lanplus : $xenable_intf_lanplus])
|
||||
AC_MSG_RESULT([ open : $xenable_intf_open])
|
||||
AC_MSG_RESULT([ free : $xenable_intf_free])
|
||||
AC_MSG_RESULT([ imb : $xenable_intf_imb])
|
||||
AC_MSG_RESULT([ bmc : $xenable_intf_bmc])
|
||||
AC_MSG_RESULT([ lipmi : $xenable_intf_lipmi])
|
||||
AC_MSG_RESULT([ serial : $xenable_intf_serial])
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_RESULT([Extra tools])
|
||||
AC_MSG_RESULT([ ipmievd : yes])
|
||||
AC_MSG_RESULT([ ipmishell : $xenable_ipmishell])
|
||||
AC_MSG_RESULT([])
|
||||
|
||||
echo
|
||||
echo Building $PACKAGE version $VERSION with interface plugins: $PLUGINS
|
||||
echo Plugin Path: $pluginpath
|
||||
echo
|
||||
|
@ -27,13 +27,12 @@
|
||||
# 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 = oem_ibm_sel_map
|
||||
EXTRA_DIST = collect_data.sh create_rrds.sh create_webpage.sh
|
||||
|
||||
EXTRA_DIST = README \
|
||||
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 \
|
||||
bmc-snmp-proxy bmc-snmp-proxy.service bmc-snmp-proxy.sysconf
|
||||
|
@ -1,95 +0,0 @@
|
||||
|
||||
Graphs for ipmitool
|
||||
-------------------
|
||||
|
||||
This is a set of shell-scripts to quickly create a webpage with pretty graphs!
|
||||
|
||||
Prerequisites are a webserver with cgi-bin support and RRDtool, a data
|
||||
collection and graphing utility you can get here:
|
||||
|
||||
http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
|
||||
|
||||
|
||||
First, decide on a directory where to store the RRDtool database files and make
|
||||
sure it exists. The user that will run the cronjob to collect updates must have
|
||||
write permissions in this dir.
|
||||
|
||||
Next, you'll need to edit some variables at the top of each script.
|
||||
|
||||
Common to all scripts:
|
||||
|
||||
hostname Override this if you are collecting data from a remote host,
|
||||
or if the $HOSTNAME variable is incorrect.
|
||||
|
||||
ipmi_cmd Command line used to call ipmitool. Default is to collect
|
||||
data from the local server using OpenIPMI.
|
||||
|
||||
If you want to collect data from a remote host, add the
|
||||
-I lan, -H, -U and -P options as necessary.
|
||||
|
||||
BIG NOTE! I do not recommend using remote data collection since
|
||||
you'll have to store the password in the script. If you do,
|
||||
make sure unauthorized people can't read or execute the scripts
|
||||
or they'll be able to wreak havoc on your server.
|
||||
|
||||
rrd_dir Enter the dir where to store the RRDtool database here.
|
||||
|
||||
|
||||
Now you can get the data collection going. Run create_rrds.sh to create the
|
||||
RDDtool database, you'll find one .rrd file per sensor in the designated dir.
|
||||
Add a line to your crontab that executes collect_data.sh every 5 minutes.
|
||||
|
||||
Something like this:
|
||||
*/5 * * * * /usr/local/bin/collect_data.sh
|
||||
|
||||
If you are a Solaris user you'll have to write the more verbose:
|
||||
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/bin/collect_data.sh
|
||||
|
||||
|
||||
Finally it's time to create the webpage, begin with editing some more variables
|
||||
in the create_webpage.sh and/or create_webpage_compact.sh scripts:
|
||||
|
||||
rrdcgi Full path to the rrdcgi executable.
|
||||
|
||||
img_dir Directory to store the graph images. This path must be within
|
||||
the document root and writable by the web server user.
|
||||
|
||||
Example: /usr/local/apache2/htdocs/images/graphs
|
||||
|
||||
web_dir Relative path of the URL where the images will show up
|
||||
on the web server.
|
||||
|
||||
Example: With the img_dir path above the corresponding web_dir
|
||||
would be /images/graphs
|
||||
|
||||
graph_width Size of the graph area in pixels (excluding title, legends etc.)
|
||||
graph_height
|
||||
|
||||
graph_daily Decide which of daily, weekly and monthly graphs you want
|
||||
graph_weekly included on the page.
|
||||
graph_monthly
|
||||
|
||||
|
||||
Finally run the create webpage script and store the output as a cgi-script and
|
||||
don't forget to make it executable.
|
||||
|
||||
Example:
|
||||
|
||||
create_webpage.sh > /usr/local/apache2/cgi-bin/my_ipmi_graphs.cgi
|
||||
chmod 755 /usr/local/apache2/cgi-bin/my_ipmi_graphs.cgi
|
||||
|
||||
Now you can surf to http://my.server.com/cgi-bin/my_ipmi_graphs.cgi and enjoy!
|
||||
|
||||
|
||||
The difference between create_webpage.sh and create_webpage_compact.sh is that
|
||||
the first script displays sensor thresholds in the graphs. The second script
|
||||
collects all sensors that measure the same unit into the same graph thus
|
||||
producing a lot fewer graphs.
|
||||
|
||||
Note, RRDtool sometimes scales the graphs such that the sensor thresholds
|
||||
fall outside the visible area.
|
||||
|
||||
|
||||
Happy graphing!
|
||||
|
||||
|
@ -1,381 +0,0 @@
|
||||
#!/bin/sh
|
||||
#############################################################################
|
||||
#
|
||||
# bmc-snmp-proxy: Set SNMP proxy to BMC (Baseboard Management Controller)
|
||||
#
|
||||
# version: 0.6
|
||||
#
|
||||
# Authors: Charles Rose <charles_rose@dell.com>
|
||||
# Jordan Hargrave <jordan_hargrave@dell.com>
|
||||
#
|
||||
# Description: Script to set snmp proxy to the BMC for certain OID
|
||||
# See here for details:
|
||||
# https://fedoraproject.org/wiki/Features/AgentFreeManagement
|
||||
#
|
||||
# Assumptions: This script will work only when /etc/snmp/ is writable.
|
||||
#
|
||||
#############################################################################
|
||||
# GLOBALS
|
||||
#############################################################################
|
||||
SYSCONF_DIR="/etc/sysconfig"
|
||||
CONFIG="${SYSCONF_DIR}/bmc-snmp-proxy"
|
||||
|
||||
SNMPD_LOCAL_CONF_DIR="/etc/snmp/bmc"
|
||||
SNMPD_LOCAL_CONF="${SNMPD_LOCAL_CONF_DIR}/snmpd.local.conf"
|
||||
TRAPD_LOCAL_CONF="${SNMPD_LOCAL_CONF_DIR}/snmptrapd.local.conf"
|
||||
|
||||
TRAPD_CONF="/etc/snmp/snmptrapd.conf"
|
||||
|
||||
LOCKFILE="/var/lock/subsys/bmc-snmp-proxy"
|
||||
BMC_INFO="/var/run/bmc-info"
|
||||
|
||||
IPMITOOL=`which ipmitool`
|
||||
|
||||
#Default config
|
||||
BMC_COMMUNITY="public"
|
||||
BMC_OID=".1.3.6.1.4.1.674.10892.2" # Dell iDRAC
|
||||
TRAP_FORWARD="no"
|
||||
RELOAD_SERVICES="yes"
|
||||
|
||||
#############################################################################
|
||||
|
||||
#TODO: Use inotify and daemonize when $BMC_INFO changes
|
||||
|
||||
# source config
|
||||
[ -r ${CONFIG} ] && . ${CONFIG}
|
||||
|
||||
. gettext.sh
|
||||
|
||||
SCRIPT_NAME=$(basename $0)
|
||||
RETVAL=0
|
||||
|
||||
# Check if bmc-info created by exchange-bmc-os-info
|
||||
bmc_info_exists()
|
||||
{
|
||||
if [ -r "${BMC_INFO}" ]; then
|
||||
. ${BMC_INFO}
|
||||
else
|
||||
RETVAL=2
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
check_snmp()
|
||||
{
|
||||
if [ ! -d /etc/snmp ] && [ ! -x /usr/sbin/snmpd ]; then
|
||||
RETVAL=12
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
# configure SNMP proxy
|
||||
#############################################################################
|
||||
write_snmp_conf()
|
||||
{
|
||||
# SNMPv3 security: bmcview, bmc_ctx, bmc_sec, bmc_grp, bmc_cmty
|
||||
printf "###############################################\n"
|
||||
printf "# Automatically created by %s #\n" "${SCRIPT_NAME}"
|
||||
printf "###############################################\n"
|
||||
printf "view bmcview included %s 80\n" "${BMC_OID}"
|
||||
printf "com2sec -Cn bmc_ctx bmc_sec default bmc_cmty\n"
|
||||
printf "group bmc_grp v1 bmc_sec\n"
|
||||
printf "access bmc_grp bmc_ctx any noauth exact bmcview none none\n"
|
||||
printf "proxy -Cn bmc_ctx -v 1 %s\n" "${PROXY_TOKEN}"
|
||||
printf "###############################################\n"
|
||||
}
|
||||
|
||||
valid_ip()
|
||||
{
|
||||
#Thanks to mkyong.com
|
||||
octet="([01]?[[:digit:]][[:digit:]]?|2[0-4][[:digit:]]|25[0-5])"
|
||||
|
||||
printf -- "%s" "${1}"| grep -Eq \
|
||||
"^${octet}\\.${octet}\\.${octet}\\.${octet}$"
|
||||
return $?
|
||||
}
|
||||
|
||||
check_vars()
|
||||
{
|
||||
[ -z ${BMC_COMMUNITY} ] && BMC_COMMUNITY="public"
|
||||
[ -z ${BMC_OID} ] && return 1
|
||||
|
||||
if [ -n "${BMC_IPv4}" ] && valid_ip ${BMC_IPv4}; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
set_snmp_proxy()
|
||||
{
|
||||
if check_vars; then
|
||||
PROXY_TOKEN="-c ${BMC_COMMUNITY} ${BMC_IPv4} ${BMC_OID}"
|
||||
|
||||
if [ ! -d ${SNMPD_LOCAL_CONF_DIR} ] && \
|
||||
mkdir ${SNMPD_LOCAL_CONF_DIR}; then
|
||||
write_snmp_conf > ${SNMPD_LOCAL_CONF}
|
||||
[ $? -ne 0 ] && RETVAL=4
|
||||
fi
|
||||
else
|
||||
RETVAL=3
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
set_snmpd_conf_path()
|
||||
{
|
||||
for SYSCONF in ${SYSCONF_DIR}/snmp*d;
|
||||
do
|
||||
if grep -q "${SNMPD_LOCAL_CONF_DIR}" "${SYSCONF}" > \
|
||||
/dev/null 2>&1; then
|
||||
continue
|
||||
else
|
||||
printf "SNMPCONFPATH=%s\n" "${SNMPD_LOCAL_CONF_DIR}" \
|
||||
>> ${SYSCONF} || RETVAL=7
|
||||
fi
|
||||
done
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
disable_snmp_proxy()
|
||||
{
|
||||
if [ -f ${SNMPD_LOCAL_CONF} ]; then
|
||||
rm -f ${SNMPD_LOCAL_CONF}
|
||||
[ $? -ne 0 ] && RETVAL=5
|
||||
fi
|
||||
}
|
||||
#############################################################################
|
||||
# Trap Forwarding
|
||||
#############################################################################
|
||||
|
||||
pick_alert_dest()
|
||||
{
|
||||
test_ip="$1"
|
||||
for ALERT_DEST in `seq 1 4`
|
||||
do
|
||||
temp_ip=$(${IPMITOOL} lan alert print ${CHANNEL} ${ALERT_DEST}\
|
||||
2>/dev/null| sed -n "s#^Alert IP Address.*: ##p")
|
||||
|
||||
[ "${temp_ip}" = "${test_ip}" ] && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
set_alert_dest_ip()
|
||||
{
|
||||
${IPMITOOL} lan alert set ${CHANNEL} ${ALERT_DEST} ipaddr ${1} \
|
||||
retry 4 type pet >/dev/null 2>&1
|
||||
[ $? -ne 0 ] && RETVAL=8
|
||||
}
|
||||
|
||||
bmc_alert_dest()
|
||||
{
|
||||
# Pick the first active LAN channel
|
||||
for CHANNEL in `seq 1 14`
|
||||
do
|
||||
[ $(${IPMI_TOOL} -I open channel info ${CHANNEL} 2>/dev/null \
|
||||
| grep -q "802\.3") ] || break
|
||||
done
|
||||
|
||||
# If TRAPD_IP is already set as an alert dest,
|
||||
if pick_alert_dest "${TRAPD_IP}"; then
|
||||
# reset: reset it if we are called with reset
|
||||
[ "${1}" = "reset" ] && \
|
||||
set_alert_dest_ip "0.0.0.0"
|
||||
# else, find the next free alert dest,
|
||||
elif pick_alert_dest "0.0.0.0"; then
|
||||
[ "${1}" = "reset" ] && \
|
||||
return $RETVAL
|
||||
# set: the TRAPD_IP
|
||||
set_alert_dest_ip "${TRAPD_IP}"
|
||||
else
|
||||
# No free alert destinations
|
||||
RETVAL=9
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
set_ipmi_alert()
|
||||
{
|
||||
${IPMITOOL} lan set ${CHANNEL} alert "${1}" >/dev/null 2>&1
|
||||
[ $? -ne 0 ] && RETVAL=10
|
||||
}
|
||||
|
||||
get_host_ip()
|
||||
{
|
||||
# Get host's IP that the BMC can reach.
|
||||
IFACE=$(/usr/sbin/ip -o -f inet address |awk '!/: lo/ {print $2}')
|
||||
for dev in ${IFACE}
|
||||
do
|
||||
ping -c 1 -I ${dev} ${BMC_IPv4} > /dev/null 2>&1
|
||||
done
|
||||
}
|
||||
|
||||
config_bmc_alert()
|
||||
{
|
||||
# Get Host's IP that the BMC can send traps to
|
||||
TRAPD_IP=$(get_host_ip)
|
||||
|
||||
# Set Host's IP as the alert destination in the BMC
|
||||
valid_ip ${TRAPD_IP} && bmc_alert_dest "${ACTION}"
|
||||
|
||||
# Enable alerting on the LAN channel
|
||||
[ $RETVAL -eq 0 ] && set_ipmi_alert "${ACTION}"
|
||||
}
|
||||
|
||||
write_trapd_conf()
|
||||
{
|
||||
printf "###############################################\n"
|
||||
printf "# Automatically created by %s #\n" "${SCRIPT_NAME}"
|
||||
printf "forward %s %s\n" "${BMC_OID}*" "${FORWARD_HOST}"
|
||||
printf "###############################################\n"
|
||||
}
|
||||
|
||||
config_trapd()
|
||||
{
|
||||
# Proceed only if snmptrapd is available on the system
|
||||
if [ -f ${TRAPD_CONF} ]; then
|
||||
write_trapd_conf > ${TRAPD_LOCAL_CONF}
|
||||
[ $? -ne 0 ] && RETVAL=11
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
trap_sink_exists()
|
||||
{
|
||||
# TODO: We only set the first match. We should be able to set
|
||||
# multiple
|
||||
FORWARD_HOST=$(awk '/^trap.*sink/{print $2}; /^informsink/{print $2}' \
|
||||
/etc/snmp/snmpd*conf | head -1)
|
||||
if [ -z "${FORWARD_HOST}" ]; then
|
||||
# there is no trapsink setup.
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
# Forward SNMP traps from the BMC to trapsink.
|
||||
trap_forward()
|
||||
{
|
||||
NO_TRAP=0
|
||||
ACTION=${1} # set or reset
|
||||
|
||||
if [ "${ACTION}" = "set" ]; then
|
||||
# Get trapd config,
|
||||
if trap_sink_exists; then
|
||||
config_trapd && config_bmc_alert
|
||||
else
|
||||
# exit silently if there is no sink
|
||||
NO_TRAP=1
|
||||
fi
|
||||
else
|
||||
if [ -f ${TRAPD_LOCAL_CONF} ]; then
|
||||
rm -f ${TRAPD_LOCAL_CONF} >/dev/null 2>&1
|
||||
else
|
||||
NO_TRAP=1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
service_reload()
|
||||
{
|
||||
#TODO: do this in systemd
|
||||
if [ ${RETVAL} -eq 0 ] && [ "${RELOAD_SERVICES}" = "yes" ]; then
|
||||
service $1 reload
|
||||
[ $? -ne 0 ] && RETVAL=6
|
||||
fi
|
||||
return
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
start()
|
||||
{
|
||||
if bmc_info_exists && check_snmp; then
|
||||
touch ${LOCKFILE}
|
||||
set_snmpd_conf_path && set_snmp_proxy
|
||||
[ $RETVAL -eq 0 ] && service_reload snmpd
|
||||
|
||||
if [ "${TRAP_FORWARD}" = "yes" ]; then
|
||||
trap_forward "set"
|
||||
[ $RETVAL -eq 0 ] && [ $NO_TRAP -eq 0 ] && \
|
||||
service_reload snmptrapd
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
stop()
|
||||
{
|
||||
[ ! -f ${LOCKFILE} ] && return
|
||||
if bmc_info_exists && check_snmp; then
|
||||
disable_snmp_proxy
|
||||
[ $RETVAL -eq 0 ] && service_reload snmpd
|
||||
|
||||
if [ "${TRAP_FORWARD}" = "yes" ]; then
|
||||
trap_forward "reset"
|
||||
[ $RETVAL -eq 0 ] && [ $NO_TRAP -eq 0 ] && \
|
||||
service_reload snmptrapd
|
||||
fi
|
||||
rm -f ${LOCKFILE}
|
||||
fi
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
status()
|
||||
{
|
||||
eval_gettext "${SCRIPT_NAME}: snmp proxy to BMC is "
|
||||
# Checking for lockfile is better.
|
||||
#if grep -q "^proxy" "${SNMPD_LOCAL_CONF}" > /dev/null 2>&1 ; then
|
||||
if [ -f ${LOCKFILE} ]; then
|
||||
eval_gettext "set"
|
||||
else
|
||||
eval_gettext "not set"
|
||||
fi
|
||||
echo
|
||||
RETVAL=0
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
usage()
|
||||
{
|
||||
eval_gettext "Usage: $0 {start|stop|status}"; echo 1>&2
|
||||
RETVAL=1
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
# MAIN
|
||||
#############################################################################
|
||||
case "$1" in
|
||||
start) start ;;
|
||||
stop) stop ;;
|
||||
status) status ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
|
||||
case "$RETVAL" in
|
||||
0|1) ;;
|
||||
2) eval_gettext "${SCRIPT_NAME}: failed to read ${BMC_INFO} " 1>&2 ;;
|
||||
3) eval_gettext "${SCRIPT_NAME}: failed to get proxy config." 1>&2 ;;
|
||||
4) eval_gettext "${SCRIPT_NAME}: failed to set ${SNMPD_LOCAL_CONF}." 1>&2 ;;
|
||||
5) eval_gettext "${SCRIPT_NAME}: failed to disable snmp proxy." 1>&2 ;;
|
||||
6) eval_gettext "${SCRIPT_NAME}: failed to reload snmpd." 1>&2 ;;
|
||||
7) eval_gettext "${SCRIPT_NAME}: failed to update ${SYSCONF}." 1>&2 ;;
|
||||
8) eval_gettext "${SCRIPT_NAME}: failed to set IPMI alert dest." 1>&2 ;;
|
||||
9) eval_gettext "${SCRIPT_NAME}: no free IPMI alert dest." 1>&2 ;;
|
||||
10) eval_gettext "${SCRIPT_NAME}: failed to set IPMI PEF." 1>&2 ;;
|
||||
11) eval_gettext "${SCRIPT_NAME}: failed to write snmptrapd.conf." 1>&2 ;;
|
||||
12) eval_gettext "${SCRIPT_NAME}: snmpd not found." 1>&2 ;;
|
||||
*) eval_gettext "${SCRIPT_NAME}: unknown error." 1>&2 ;;
|
||||
esac
|
||||
|
||||
if [ ${RETVAL} -gt 1 ]; then
|
||||
eval_gettext " Return code: ${RETVAL}"; echo
|
||||
fi
|
||||
exit ${RETVAL}
|
||||
#############################################################################
|
||||
# end of file
|
||||
#############################################################################
|
@ -1,18 +0,0 @@
|
||||
[Unit]
|
||||
Description=Setup SNMP proxy to BMC
|
||||
|
||||
After=exchange-bmc-os-info.service
|
||||
Requires=exchange-bmc-os-info.service
|
||||
PartOf=exchange-bmc-os-info.service
|
||||
|
||||
ConditionPathExists=/var/run/bmc-info
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
|
||||
ExecStart=/usr/libexec/bmc-snmp-proxy start
|
||||
ExecStop=/usr/libexec/bmc-snmp-proxy stop
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,48 +0,0 @@
|
||||
# bmc-snmp-proxy
|
||||
#
|
||||
# Config file to control SNMP redirection between
|
||||
# the OS and Service Processor/Baseboard Management Controller (BMC)
|
||||
#
|
||||
# bmc-snnmp-proxy helps redirect certain SNMP requests (to this host)
|
||||
# destined to the Service Processor. We will need the Service Processor's
|
||||
# SNMP community string and the OID of the Service Processor's SNMP agent.
|
||||
#
|
||||
# For redirecting Traps from the Service Processor to the trap sink
|
||||
# configured in the host (this system), we will have to set
|
||||
# TRAP_FORWARD below.
|
||||
#
|
||||
# See here for details
|
||||
# https://fedoraproject.org/wiki/Features/AgentFreeManagement
|
||||
|
||||
### Configure SNMP proxy to BMC/Service Processor ###
|
||||
|
||||
### Service Processor/BMC SNMP Community String.
|
||||
# Name: BMC_COMMUNITY
|
||||
# Description: Set community string of the Service Processor (BMC)'s
|
||||
# SNMP agent.
|
||||
# Default: public
|
||||
#
|
||||
BMC_COMMUNITY="public"
|
||||
|
||||
### OEM Specific OID of Service Processor
|
||||
# Name: BMC_OID
|
||||
# Description: SNMP OID that we would like to redirect to the Service
|
||||
# Processor (BMC). This can be unique to each OEM.
|
||||
# Default: ".1.3.6.1.4.1.674.10892.2"
|
||||
BMC_OID=".1.3.6.1.4.1.674.10892.2" # Dell iDRAC
|
||||
|
||||
### Forward Traps from the Service Processor to trap sink
|
||||
# Name: TRAP_FORWARD
|
||||
# Description: Enabling this will allow traps from the Service Processor
|
||||
# to be directed to this system and configure snmptrapd
|
||||
# Note: This option will have no effect if trap sink on the system is
|
||||
# not configured
|
||||
# Default: "no"
|
||||
TRAP_FORWARD="yes"
|
||||
|
||||
### Reload snmpd and snmptrapd
|
||||
# Name: RELOAD_SERVICES
|
||||
# Description: Reload snmpd and snmptrapd after making changes to their config
|
||||
# files.
|
||||
# Default: "yes"
|
||||
RELOAD_SERVICES="yes"
|
@ -1,308 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# 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.
|
||||
|
||||
|
||||
# This script is designed for Sun Fire LX50, V60x and V65x systems.
|
||||
# It may work with other setups as long as you use the correct channel
|
||||
# and interface settings. It can be used on the V20z as long as you
|
||||
# specify network settings on the command line.
|
||||
#
|
||||
# If the wrong channel is used you could lose network access to the
|
||||
# box because your BMC will be sending out bad Gratuitous ARP packets
|
||||
# with the wrong MAC address. You will need to use a console or
|
||||
# override your local ARP cache with the correct addr.
|
||||
|
||||
usage ()
|
||||
{
|
||||
echo "
|
||||
usage: $0 -c <chan> -i <interface> [options]
|
||||
$0 -c <chan> [-v|w|x|y|z address] [options]
|
||||
|
||||
-c channel Which BMC channel to configure [-c help for more info]
|
||||
-i interface Auto-configure BMC based on interface network settings
|
||||
-v address Use specified IP address
|
||||
-w address Use specified Netmask address
|
||||
-x address Use specified MAC address
|
||||
-y address Use specified Gateway IP address
|
||||
-z address Use specified Gateway MAC address
|
||||
-m interface Which IPMI interface to use [default linux=open solaris=lipmi]
|
||||
-p password Set BMC channel password
|
||||
-s string Set SNMP community string
|
||||
-a interval Set Gratuitous ARP interval, off=0, default=4
|
||||
-r Reset BMC channel, zero all network settings, disable
|
||||
-d Debug mode, does not make any changes
|
||||
"
|
||||
exit 0;
|
||||
}
|
||||
|
||||
channel_usage ()
|
||||
{
|
||||
echo "
|
||||
Sun Fire V60x and V65x - Linux 2.4
|
||||
eth0 = channel 6, top
|
||||
eth1 = channel 7, bottom
|
||||
|
||||
Sun Fire V60x and V65x - Linux 2.6
|
||||
eth0 = channel 7, bottom
|
||||
eth1 = channel 6, top
|
||||
|
||||
Sun Fire V60x and V65x - Solaris x86
|
||||
e1000g0 = channel 7, bottom
|
||||
e1000g1 = channel 6, top
|
||||
|
||||
Sun LX50 - Linux
|
||||
eth0 = channel 7, bottom
|
||||
eth1 = channel 6, top
|
||||
|
||||
Sun LX50 - Solaris x86
|
||||
le0 = channel 7, bottom
|
||||
le1 = channel 6, top
|
||||
|
||||
Sun Fire V20z (-i option does not apply)
|
||||
channel 1
|
||||
"
|
||||
exit 0
|
||||
}
|
||||
|
||||
hex_to_ip ()
|
||||
{
|
||||
test $# -ge 1 || return;
|
||||
local HEX B1 B2 B3 B4;
|
||||
HEX=`echo $1 | tr '[:lower:]' '[:upper:]'`;
|
||||
H1=`echo $HEX | cut -c1-2`
|
||||
H2=`echo $HEX | cut -c3-4`
|
||||
H3=`echo $HEX | cut -c5-6`
|
||||
H4=`echo $HEX | cut -c7-8`
|
||||
B1=`echo 10 o 16 i $H1 p | dc`
|
||||
B2=`echo 10 o 16 i $H2 p | dc`
|
||||
B3=`echo 10 o 16 i $H3 p | dc`
|
||||
B4=`echo 10 o 16 i $H4 p | dc`
|
||||
echo "$B1.$B2.$B3.$B4"
|
||||
}
|
||||
|
||||
ipmitool_lan_set ()
|
||||
{
|
||||
[ $# -lt 1 ] && return
|
||||
local PARAM=$1
|
||||
local VALUE=
|
||||
[ $# -ge 2 ] && VALUE=$2
|
||||
|
||||
if [ $DEBUG -gt 0 ]; then
|
||||
echo "Setting LAN parameter $PARAM $VALUE"
|
||||
echo "$IPMITOOL -I $IPMIINTF lan set $CHANNEL $PARAM $VALUE"
|
||||
return
|
||||
fi
|
||||
|
||||
$IPMITOOL -I $IPMIINTF lan set $CHANNEL $PARAM $VALUE
|
||||
}
|
||||
|
||||
ipmitool_lan_reset ()
|
||||
{
|
||||
ipmitool_lan_set "ipsrc" "static"
|
||||
ipmitool_lan_set "ipaddr" "0.0.0.0"
|
||||
ipmitool_lan_set "netmask" "0.0.0.0"
|
||||
ipmitool_lan_set "macaddr" "00:00:00:00:00:00"
|
||||
ipmitool_lan_set "defgw ipaddr" "0.0.0.0"
|
||||
ipmitool_lan_set "defgw macaddr" "00:00:00:00:00:00"
|
||||
ipmitool_lan_set "password"
|
||||
ipmitool_lan_set "snmp" "public"
|
||||
ipmitool_lan_set "arp generate" "off"
|
||||
ipmitool_lan_set "access" "off"
|
||||
exit 0
|
||||
}
|
||||
|
||||
DEBUG=0
|
||||
LINUX=0
|
||||
SOLARIS=0
|
||||
CHANNEL=0
|
||||
IFACE=
|
||||
PASSWORD=
|
||||
SNMP=
|
||||
GRATARP=8
|
||||
PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin
|
||||
|
||||
case `uname -s` in
|
||||
Linux)
|
||||
IPMIINTF=open
|
||||
IPMITOOL=ipmitool
|
||||
PING=ping
|
||||
IFCONFIG=ifconfig
|
||||
ARP=arp
|
||||
ROUTE=route
|
||||
;;
|
||||
SunOS)
|
||||
IPMIINTF=lipmi
|
||||
IPMITOOL=ipmiadm
|
||||
PING=ping
|
||||
IFCONFIG=ifconfig
|
||||
ARP=arp
|
||||
ROUTE=route
|
||||
;;
|
||||
*)
|
||||
echo "Invalid OS!"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
while getopts "dhri:c:m:p:s:a:v:w:x:y:z:" OPTION ; do
|
||||
case "$OPTION" in
|
||||
i) IFACE=$OPTARG ;;
|
||||
c) CHANNEL=$OPTARG ; test X$CHANNEL = Xhelp && channel_usage ;;
|
||||
m) IPMIINTF=$OPTARG ;;
|
||||
p) PASSWORD=$OPTARG ;;
|
||||
s) SNMP=$OPTARG ;;
|
||||
a) GRATARP=$OPTARG ;;
|
||||
d) DEBUG=1 ;;
|
||||
v) IP_ADDRESS=$OPTARG ;;
|
||||
w) IP_NETMASK=$OPTARG ;;
|
||||
x) MAC_ADDRESS=$OPTARG ;;
|
||||
y) GATEWAY_IP=$OPTARG ;;
|
||||
z) GATEWAY_MAC=$OPTARG ;;
|
||||
r) ipmitool_lan_reset ;;
|
||||
h) usage ;;
|
||||
*) echo "Ignoring invalid option : -$OPTARG" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! -x `which $IPMITOOL` ]; then
|
||||
echo "Error: unable to find $IPMITOOL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $CHANNEL -eq 0 ]; then
|
||||
echo
|
||||
echo "Error: you must specify a channel with -c"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$IFACE" ]; then
|
||||
if ! $IFCONFIG $IFACE 2>/dev/null | grep "inet " >/dev/null 2>&1 ; then
|
||||
echo
|
||||
echo "Error: unable to find interface $IFACE"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
echo "Auto-configuring $IFACE (channel $CHANNEL)"
|
||||
fi
|
||||
|
||||
case `uname -s` in
|
||||
SunOS)
|
||||
if [ X$IFACE != X ]; then
|
||||
if [ X$IP_ADDRESS = X ]; then
|
||||
IP_ADDRESS=`$IFCONFIG $IFACE | grep inet | awk '{print $2}'`
|
||||
fi
|
||||
if [ X$IP_NETMASK = X ]; then
|
||||
HEX_NETMASK=`$IFCONFIG $IFACE | grep netmask | awk '{print $4}'`
|
||||
IP_NETMASK=`hex_to_ip $HEX_NETMASK`
|
||||
fi
|
||||
if [ X$MAC_ADDRESS = X ]; then
|
||||
MAC_ADDRESS=`$IFCONFIG $IFACE | grep ether | awk '{print $2}'`
|
||||
fi
|
||||
if [ X$GATEWAY_IP = X ]; then
|
||||
GATEWAY_IP=`$ROUTE -n get default | grep gateway: | awk '{print $2}'`
|
||||
fi
|
||||
if [ X$GATEWAY_MAC = X ]; then
|
||||
$PING -i $IFACE $GATEWAY_IP 1 >/dev/null 2>&1
|
||||
GATEWAY_MAC=`$ARP $GATEWAY_IP | awk '{print $4}'`
|
||||
if [ X$GATEWAY_MAC = Xno ]; then
|
||||
GATEWAY_MAC=
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
Linux)
|
||||
if [ X$IFACE != X ]; then
|
||||
if [ X$IP_ADDRESS = X ]; then
|
||||
IP_ADDRESS=`$IFCONFIG $IFACE | grep "inet addr" | awk -F"[:[:space:]]+" '{print $4}'`
|
||||
fi
|
||||
if [ X$IP_NETMASK = X ]; then
|
||||
IP_NETMASK=`$IFCONFIG $IFACE | grep Bcast | awk -F"[:[:space:]]+" '{print $8}'`
|
||||
fi
|
||||
if [ X$MAC_ADDRESS = X ]; then
|
||||
MAC_ADDRESS=`$IFCONFIG $IFACE | grep HWaddr | awk '{print $5}'`
|
||||
fi
|
||||
if [ X$GATEWAY_IP = X ]; then
|
||||
GATEWAY_IP=`$ROUTE -n | awk '/^0.0.0.0/ {print $2}'`
|
||||
fi
|
||||
if [ X$GATEWAY_MAC = X ]; then
|
||||
$PING -q -c1 $GATEWAY_IP >/dev/null 2>&1
|
||||
GATEWAY_MAC=`$ARP -an | grep "$GATEWAY_IP[^0-9]" | awk '{print $4}'`
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ X$IP_ADDRESS != X ]; then
|
||||
ipmitool_lan_set "ipsrc" "static"
|
||||
ipmitool_lan_set "ipaddr" "$IP_ADDRESS"
|
||||
fi
|
||||
|
||||
if [ X$IP_NETMASK != X ]; then
|
||||
ipmitool_lan_set "netmask" "$IP_NETMASK"
|
||||
fi
|
||||
|
||||
if [ X$MAC_ADDRESS != X ]; then
|
||||
ipmitool_lan_set "macaddr" "$MAC_ADDRESS"
|
||||
fi
|
||||
|
||||
if [ X$GATEWAY_IP != X ]; then
|
||||
ipmitool_lan_set "defgw ipaddr" "$GATEWAY_IP"
|
||||
fi
|
||||
|
||||
if [ X$GATEWAY_MAC != X ]; then
|
||||
ipmitool_lan_set "defgw macaddr" "$GATEWAY_MAC"
|
||||
fi
|
||||
|
||||
if [ X$PASSWORD != X ]; then
|
||||
ipmitool_lan_set "password" "$PASSWORD"
|
||||
fi
|
||||
|
||||
if [ X$SNMP != X ]; then
|
||||
ipmitool_lan_set "snmp" "$SNMP"
|
||||
fi
|
||||
|
||||
if [ "$GRATARP" -ne 0 ]; then
|
||||
ipmitool_lan_set "arp generate" "on"
|
||||
ipmitool_lan_set "arp interval" "$GRATARP"
|
||||
else
|
||||
ipmitool_lan_set "arp generate" "off"
|
||||
fi
|
||||
|
||||
echo "Setting channel authentication capabilities"
|
||||
ipmitool_lan_set "auth callback,user,operator,admin" "md2,md5"
|
||||
|
||||
echo "Enabling channel $CHANNEL"
|
||||
ipmitool_lan_set "access" "on"
|
||||
ipmitool_lan_set "user"
|
||||
|
||||
exit 0
|
@ -1,9 +1,4 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2003 Fredrik Ohrn. All Rights Reserved.
|
||||
#
|
||||
# See the included COPYING file for license details.
|
||||
#
|
||||
|
||||
# Edit the variables
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2003 Fredrik Ohrn. All Rights Reserved.
|
||||
#
|
||||
# See the included COPYING file for license details.
|
||||
#
|
||||
|
||||
# Edit the variables
|
||||
|
||||
|
@ -1,9 +1,4 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2003-2004 Fredrik Ohrn. All Rights Reserved.
|
||||
#
|
||||
# See the included COPYING file for license details.
|
||||
#
|
||||
|
||||
# Edit the variables
|
||||
|
||||
@ -22,30 +17,20 @@ img_dir=/usr/local/apache2/htdocs/images/graphs
|
||||
# Where will the graphs show up on the webserver?
|
||||
web_dir=/images/graphs
|
||||
|
||||
# Size of graph area (excluding title, legends etc.)
|
||||
graph_width=500
|
||||
graph_height=150
|
||||
|
||||
# Graphs to include on page
|
||||
graph_daily=1
|
||||
graph_weekly=1
|
||||
graph_monthly=0
|
||||
|
||||
|
||||
# No need to edit below this point.
|
||||
|
||||
color[0]="2020FF"
|
||||
color[1]="20FF20"
|
||||
color[2]="FF2020"
|
||||
color[3]="FF21FF"
|
||||
color[4]="21FFFF"
|
||||
color[5]="FFFF21"
|
||||
color[6]="8F21FF"
|
||||
color[7]="21FF8F"
|
||||
color[8]="FF8F21"
|
||||
color[9]="FF2190"
|
||||
color[10]="2190FF"
|
||||
color[11]="90FF21"
|
||||
color[0]="0000FF"
|
||||
color[1]="00FF00"
|
||||
color[2]="FF0000"
|
||||
color[3]="FFFF00"
|
||||
color[4]="FF00FF"
|
||||
color[5]="00FFFF"
|
||||
color[6]="4444AA"
|
||||
color[7]="44AA44"
|
||||
color[8]="AA4444"
|
||||
color[9]="AAAA44"
|
||||
color[10]="AA44AA"
|
||||
color[11]="44AAAA"
|
||||
|
||||
cat << EOF
|
||||
#!$rrdcgi
|
||||
@ -161,48 +146,38 @@ for group in $groups ; do
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "<h3>${!group_title}</h3>"
|
||||
|
||||
if [ "$graph_daily" -ne 0 ] ; then
|
||||
cat << EOF
|
||||
<h3>${!group_title}</h3>
|
||||
<RRD::GRAPH "$img_dir/$hostname-$group-daily.gif"
|
||||
--imginfo "<img src="$web_dir/%s" width="%lu" height="%lu">"
|
||||
--lazy
|
||||
--height 200
|
||||
--vertical-label "${!group_unit}"
|
||||
--title "Daily graph"
|
||||
--height $graph_height
|
||||
--width $graph_width ${!group} $thres
|
||||
--width 576 ${!group} $thres
|
||||
>
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "$graph_weekly" -ne 0 ] ; then
|
||||
cat << EOF
|
||||
<RRD::GRAPH "$img_dir/$hostname-$group-weekly.gif"
|
||||
--imginfo "<img src="$web_dir/%s" width="%lu" height="%lu">"
|
||||
--lazy
|
||||
--start -7d
|
||||
--height 200
|
||||
--vertical-label "${!group_unit}"
|
||||
--title "Weelky graph"
|
||||
--height $graph_height
|
||||
--width $graph_width ${!group} $thres
|
||||
--width 672 ${!group} $thres
|
||||
>
|
||||
EOF
|
||||
fi
|
||||
#<RRD::GRAPH "$img_dir/$hostname-$group-monthly.gif"
|
||||
# --imginfo "<img src="$web_dir/%s" width="%lu" height="%lu">"
|
||||
# --lazy
|
||||
# --start -30d
|
||||
# --height 200
|
||||
# --vertical-label "${!group_unit}"
|
||||
# --title "Monthly graph"
|
||||
# --width 720 ${!group} $thres
|
||||
#>
|
||||
#EOF
|
||||
|
||||
if [ "$graph_monthly" -ne 0 ] ; then
|
||||
cat << EOF
|
||||
<RRD::GRAPH "$img_dir/$hostname-$group-monthly.gif"
|
||||
--imginfo "<img src="$web_dir/%s" width="%lu" height="%lu">"
|
||||
--lazy
|
||||
--start -30d
|
||||
--vertical-label "${!group_unit}"
|
||||
--title "Monthly graph"
|
||||
--height $graph_height
|
||||
--width $graph_width ${!group} $thres
|
||||
>
|
||||
EOF
|
||||
fi
|
||||
done
|
||||
|
||||
cat << EOF
|
||||
|
@ -1,151 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2003-2004 Fredrik Ohrn. All Rights Reserved.
|
||||
#
|
||||
# See the included COPYING file for license details.
|
||||
#
|
||||
|
||||
# Edit the variables
|
||||
|
||||
hostname=$HOSTNAME
|
||||
|
||||
ipmi_cmd="/usr/local/bin/ipmitool -I open"
|
||||
rrd_dir="/some/dir/rrd"
|
||||
|
||||
# Full path to the rrdcgi executable.
|
||||
rrdcgi=/usr/local/bin/rrdcgi
|
||||
|
||||
# Where should rrdcgi store the graphs? This path must be within the
|
||||
# document root and writable by the webserver user.
|
||||
img_dir=/usr/local/apache2/htdocs/images/graphs
|
||||
|
||||
# Where will the graphs show up on the webserver?
|
||||
web_dir=/images/graphs
|
||||
|
||||
# Size of graph area (excluding title, legends etc.)
|
||||
graph_width=500
|
||||
graph_height=150
|
||||
|
||||
# Graphs to include on page
|
||||
graph_daily=1
|
||||
graph_weekly=1
|
||||
graph_monthly=0
|
||||
|
||||
|
||||
# No need to edit below this point.
|
||||
|
||||
color[0]="2020FF"
|
||||
color[1]="20FF20"
|
||||
color[2]="FF2020"
|
||||
color[3]="FF21FF"
|
||||
color[4]="21FFFF"
|
||||
color[5]="FFFF21"
|
||||
color[6]="8F21FF"
|
||||
color[7]="21FF8F"
|
||||
color[8]="FF8F21"
|
||||
color[9]="FF2190"
|
||||
color[10]="2190FF"
|
||||
color[11]="90FF21"
|
||||
|
||||
cat << EOF
|
||||
#!$rrdcgi
|
||||
<html>
|
||||
<head>
|
||||
<title>$hostname</title>
|
||||
<RRD::GOODFOR 300>
|
||||
<body>
|
||||
<h2>$hostname</h2>
|
||||
EOF
|
||||
|
||||
|
||||
IFS="
|
||||
"
|
||||
|
||||
i=0
|
||||
groups=
|
||||
|
||||
for line in `eval $ipmi_cmd -c -v sdr list full` ; do
|
||||
|
||||
IFS=,
|
||||
|
||||
split=($line)
|
||||
|
||||
file="$rrd_dir/$hostname-${split[0]}.rrd"
|
||||
group=`echo "${split[2]}" | tr ' .-' ___`
|
||||
|
||||
group_color=${group}_color
|
||||
|
||||
if [ -z "${!group}" ] ; then
|
||||
groups="$groups $group"
|
||||
|
||||
declare $group_color=0
|
||||
|
||||
group_unit=${group}_unit
|
||||
declare $group_unit="${split[2]}"
|
||||
fi
|
||||
|
||||
declare $group="${!group}
|
||||
DEF:var$i=\"$file\":var:AVERAGE LINE1:var$i#${color[${!group_color}]}:\"${split[0]}\""
|
||||
|
||||
declare $group_color=$[ ${!group_color} + 1 ]
|
||||
|
||||
c=$[ c + 1 ]
|
||||
i=$[ i + 1 ]
|
||||
done
|
||||
|
||||
IFS=" "
|
||||
|
||||
for group in $groups ; do
|
||||
|
||||
group_unit=${group}_unit
|
||||
|
||||
IFS=,
|
||||
|
||||
echo "<h3>${!group_unit}</h3>"
|
||||
|
||||
if [ "$graph_daily" -ne 0 ] ; then
|
||||
cat << EOF
|
||||
<RRD::GRAPH "$img_dir/$hostname-$group-daily.gif"
|
||||
--imginfo "<img src="$web_dir/%s" width="%lu" height="%lu">"
|
||||
--lazy
|
||||
--vertical-label "${!group_unit}"
|
||||
--title "Daily graph"
|
||||
--height $graph_height
|
||||
--width $graph_width ${!group}
|
||||
>
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "$graph_weekly" -ne 0 ] ; then
|
||||
cat << EOF
|
||||
<RRD::GRAPH "$img_dir/$hostname-$group-weekly.gif"
|
||||
--imginfo "<img src="$web_dir/%s" width="%lu" height="%lu">"
|
||||
--lazy
|
||||
--start -7d
|
||||
--vertical-label "${!group_unit}"
|
||||
--title "Weelky graph"
|
||||
--height $graph_height
|
||||
--width $graph_width ${!group}
|
||||
>
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "$graph_monthly" -ne 0 ] ; then
|
||||
cat << EOF
|
||||
<RRD::GRAPH "$img_dir/$hostname-$group-monthly.gif"
|
||||
--imginfo "<img src="$web_dir/%s" width="%lu" height="%lu">"
|
||||
--lazy
|
||||
--start -30d
|
||||
--vertical-label "${!group_unit}"
|
||||
--title "Monthly graph"
|
||||
--height $graph_height
|
||||
--width $graph_width ${!group}
|
||||
>
|
||||
EOF
|
||||
fi
|
||||
done
|
||||
|
||||
cat << EOF
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Setting up OpenIPMI driver..."
|
||||
|
||||
# load the ipmi modules
|
||||
modprobe ipmi_msghandler
|
||||
modprobe ipmi_devintf
|
||||
if ! modprobe ipmi_si_drv ; then
|
||||
modprobe ipmi_si # try new module name
|
||||
fi
|
||||
|
||||
maj=$(cat /proc/devices | awk '/ipmidev/{print $1}')
|
||||
if [ "$maj" ]; then
|
||||
test -e /dev/ipmi0 && rm -f /dev/ipmi0
|
||||
/bin/mknod /dev/ipmi0 c $maj 0
|
||||
fi
|
||||
|
@ -1,222 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# chkconfig: 2345 11 60
|
||||
# description: start, stop, or query ipmi system monitoring tools
|
||||
# config: /etc/sysconfig/ipmi
|
||||
#
|
||||
# For Redhat, Fedora, or similar systems. Handles both 2.4 and 2.6
|
||||
# configurations. Requires an /etc/sysconfig/ipmi file to function,
|
||||
# see below.
|
||||
#
|
||||
# Phil Hollenback
|
||||
# philiph@pobox.com
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
# Exit silently if we don't have a sysconfig file,
|
||||
# and read IPMI setting from it to determine whether or
|
||||
# not to continue.
|
||||
# The only current setting is ipmi={YES|NO}, whether or not
|
||||
# to enable IPMI.
|
||||
[ -f /etc/sysconfig/ipmi ] || exit 0
|
||||
. /etc/sysconfig/ipmi
|
||||
[ "${IPMI}" = "yes" ] || exit 0
|
||||
|
||||
RETVAL=0
|
||||
|
||||
start() {
|
||||
echo -n $"Starting ipmi: "
|
||||
|
||||
# If ipmidev isn't listed in /proc/devices, try
|
||||
# loading the modules.
|
||||
if ! grep -q ipmidev /proc/devices
|
||||
then
|
||||
/sbin/modprobe ipmi_msghandler || RETVAL=1
|
||||
/sbin/modprobe ipmi_devintf || RETVAL=1
|
||||
# Try loading new driver module, fall back to old
|
||||
# module if that fails.
|
||||
if ! /sbin/modprobe ipmi_si >/dev/null 2>&1
|
||||
then
|
||||
/sbin/modprobe ipmi_si_drv || RETVAL=1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# If ipmidev still isn't listed in /proc/devices after we load
|
||||
# modules, this just isn't going to work. Set RETVAL to mark
|
||||
# this failure.
|
||||
grep -q ipmidev /proc/devices || RETVAL=1
|
||||
|
||||
# remove old device file always
|
||||
# in case ipmi gets assigned new dynamic major number from kernel
|
||||
if [ -c /dev/ipmi0 ]; then
|
||||
rm -f /dev/ipmi0
|
||||
fi
|
||||
|
||||
# Check if the device file exists and create if not.
|
||||
if [ ! -c /dev/ipmi0 ] && [ $RETVAL -eq 0 ]
|
||||
then
|
||||
major=$(awk '/ ipmidev$/{print $1}' /proc/devices)
|
||||
/bin/mknod -m 0600 /dev/ipmi0 c $major 0 || RETVAL=1
|
||||
fi
|
||||
|
||||
if [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ipmi ; then
|
||||
echo_success
|
||||
echo
|
||||
else
|
||||
echo_failure
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Shutting down ipmi: "
|
||||
|
||||
# Stop doesn't actually do anything because we currently don't
|
||||
# unload ipmi modules on stop. That might change in the future
|
||||
# if we decide unloading the ipmi modules is safe.
|
||||
RETVAL=0
|
||||
|
||||
if [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ipmi ; then
|
||||
echo_success
|
||||
echo
|
||||
else
|
||||
echo_failure
|
||||
echo
|
||||
fi
|
||||
}
|
||||
|
||||
dostatus() {
|
||||
# Extract cpu temperatures from ipmitool output.
|
||||
|
||||
# Abort if we don't have the ipmitool program.
|
||||
if ! /usr/bin/ipmitool -V >/dev/null
|
||||
then
|
||||
echo "/usr/bin/ipmitool not found!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Abort if ipmi isn't loaded.
|
||||
if ! grep -q ipmidev /proc/devices
|
||||
then
|
||||
echo "ipmi not listed in /proc/devices!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if we are running on a v1.0 IPMI system, and
|
||||
# change our processor search string appropriately.
|
||||
if /usr/bin/ipmitool -I open bmc info | \
|
||||
grep -q "IPMI Version.*1.0"
|
||||
then
|
||||
IpmiVersion="1.0"
|
||||
fi
|
||||
|
||||
# Determine # of running processors
|
||||
NumProcs=$(grep -c processor /proc/cpuinfo)
|
||||
if [ $NumProcs -eq 0 ]
|
||||
then
|
||||
echo "Can't determine number of processors!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Now build the query string. Concatenate it into
|
||||
# one string because that's more efficient on 2.4 systems.
|
||||
Count=1
|
||||
TempString=""
|
||||
while [ $Count -le $NumProcs ]
|
||||
do
|
||||
if [ x$IpmiVersion = x"1.0" ]
|
||||
then
|
||||
TempString="$TempString CPU\ $Count"
|
||||
else
|
||||
TempString="$TempString Processor$Count\ Temp"
|
||||
fi
|
||||
Count=$((Count + 1))
|
||||
done
|
||||
# building TempString like this and eval'ing it is ugly, but
|
||||
# it's the only way I could make the quoting work. Sorry.
|
||||
TempString="/usr/bin/ipmitool -I open sensor get $TempString"
|
||||
eval $TempString | awk -v "c=$Count" '
|
||||
BEGIN {
|
||||
n = 1
|
||||
}
|
||||
/Sensor Reading/ {
|
||||
printf "CPU%s Temp: %s\n",n,$4
|
||||
n++
|
||||
}
|
||||
END {
|
||||
if ( n != c) {
|
||||
printf "Error: found %s CPUs, but got temps for %s\n",--c,--n >"/dev/stderr"
|
||||
exit 1
|
||||
}
|
||||
exit 0
|
||||
}'
|
||||
RETVAL=$((RETVAL + $?))
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
RETVAL=$?
|
||||
}
|
||||
|
||||
condrestart() {
|
||||
[ -e /var/lock/subsys/ipmi ] && restart || :
|
||||
}
|
||||
|
||||
remove () {
|
||||
# Actually remove the drivers. Don't do during stop in case
|
||||
# this causes system to become unstable (a la lm_sensors)
|
||||
if /sbin/lsmod | awk '{print $1}' | grep -q ipmi_
|
||||
then
|
||||
# Try removing both 2.4 and 2.6 modules.
|
||||
/sbin/rmmod ipmi_si 2>/dev/null
|
||||
/sbin/rmmod ipmi_si_drv 2>/dev/null
|
||||
/sbin/rmmod ipmi_devintf
|
||||
/sbin/rmmod ipmi_msghandler
|
||||
else
|
||||
echo "No ipmi modules loaded!" >&2
|
||||
RETVAL=1
|
||||
return $RETVAL
|
||||
fi
|
||||
|
||||
# Wait a sec to give modules time to unload.
|
||||
sleep 1
|
||||
|
||||
# Check if we failed to remove any modules, and complain if so.
|
||||
if /sbin/lsmod | awk '{print $1}' | grep -q ipmi_
|
||||
then
|
||||
echo "ipmi modules still loaded!" >&2
|
||||
RETVAL=1
|
||||
return $RETVAL
|
||||
fi
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
dostatus
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
condrestart)
|
||||
condrestart
|
||||
;;
|
||||
remove)
|
||||
remove
|
||||
;;
|
||||
*)
|
||||
echo "Usage: ipmi {start|stop|status|restart|condrestart|remove}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
@ -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,229 +0,0 @@
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x01","0x00","Chassis Number","R","R","0x00","CPU shutdown - Potential cause "triple fault" a software address problem"
|
||||
"0xC1","XX","XX","XX","XX","XX","XX","XX","0x02","0x01","Chassis Number","Failed Memory Card","Spare Memory Card","0x00","Memory Mirrored Failover Occurred - System running from mirrored memory image"
|
||||
"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 removed, 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 added, 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","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","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","0x01","0x04","Chassis Number","R","R","R","R","R","R","R","R","R","0x00","Invalid configuration of processor card."
|
||||
"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","0x02","0x03","0x00","Chassis Number","Memory Card","R","R","R","R","R","R","R","0x00","Memory card enabled"
|
||||
"0xE0","0x02","0x03","0x01","Chassis Number","Memory Card","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)"
|
||||
"0xE0","0x02","0x00","0x05","Chassis","Memory Card","Memory DIMM","R","R","R","R","R","R","0x01","DIMM disabled, multi-bit or multi-symbol error"
|
||||
"0xE0","0x02","0x01","0x00","Chassis","Failed Channel","R","R","R","R","R","R","R","0x01","AMB Failure Detected on Channel X During Last Boot"
|
||||
"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","BUS_CORRECTABLE: 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","BUS_CORRECTABLE: 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","BUS_CORRECTABLE: 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","BUS_CORRECTABLE: 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","BUS_CORRECTABLE: 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","0x02","0x00","0x00","R","R","R","R","R","R","R","R","R","0x01","Memory sparing event, start 1"
|
||||
"0xE1","0x02","0x00","0x02","R","R","R","R","R","R","R","R","R","0x01","Memory sparing event, done 1"
|
||||
"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"
|
||||
"0xE1","0x05","0x01","0x04","Bus","Device","Function Number","R","R","R","R","R","R","0x00","Link Degrade Event"
|
||||
"0xE1","0x05","0x01","0x05","R","R","R","R","R","R","R","R","R","0x00","Spurious Memory Event"
|
||||
"0xE2","0x00","Register ID","R","First Fire Bit (0xFF=N/A)","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","0x03","0x01","0x07","R","R","0x00","Merge Failure - BIOS version is newer than secondary server BIOS"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x08","R","R","0x00","Merge Failure - BIOS version is older than secondary server BIOS"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x09","R","R","0x00","Merge Failure - Primary server booted standalone"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x0A","R","R","0x00","Merge Failure - Communication error occurred with secondary server"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x0B","R","R","0x00","Merge Failure - Timed out waiting for secondary server"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x10","R","R","0x00","Merge Failure - No path through partition"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x11","Expected Chassis Count","R","0x00","Merge Information - Expected chassis count"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x12","Actual Chassis Count","R","0x00","Merge Information - Actual chassis count"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x19","R","R","0x00","Merge Failure - No secondary servers found to merge"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x34","R","R","0x00","Merge Failure - Primary server booted standalone"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x35","R","R","0x00","Merge Failure - Communication error occurred with primary server"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x36","R","R","0x00","Merge Failure - Secondary server booted standalone"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x41","R","R","0x00","Merge Failure - Timeout occurred waiting for primary server"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x46","R","R","0x00","Merge Failure - BIOS version is newer than primary server BIOS"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x47","R","R","0x00","Merge Failure - BIOS version is older than primary server BIOS"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x52","R","R","0x00","Merge Failure - Scalability hardware not detected"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x53","R","R","0x00","Merge Failure - No partition descriptor found"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x54","R","R","0x00","Merge Failure - Error Reading partition descriptor"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x55","R","R","0x00","Merge Failure - Error Reading system UUID"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x56","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x57","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x58","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x59","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x5A","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x5B","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x03","0x01","0x5C","R","R","0x00","Merge Failure [Byte 13 value]"
|
||||
"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"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x06","0x01","PostVersion","BMCVersion","R","0x00","Incompatible BIOS-BMC Power Executive support"
|
||||
"0xC0","XX","XX","XX","XX","XX","XX","XX","0x06","0x02","R","R","R","0x00","Boot denied due to power limitations"
|
@ -1,37 +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.
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
EXTRA_DIST = pkginfo.in prototype.in \
|
||||
ipmitool.spec.in rpmmacros.in rpmrc
|
||||
|
||||
dist-hook: pkginfo prototype rpmmacros
|
||||
|
@ -1,404 +0,0 @@
|
||||
Name: ipmitool
|
||||
Summary: ipmitool - Utility for IPMI control
|
||||
Version: @VERSION@
|
||||
Release: @RPM_RELEASE@%{?_distro:.%{_distro}}
|
||||
License: BSD
|
||||
Group: Utilities
|
||||
Packager: Jim Mankovich <jmank@hp.com>
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
Buildroot: /var/tmp/ipmitool-root
|
||||
|
||||
%description
|
||||
This package contains a utility for interfacing with devices that support
|
||||
the Intelligent Platform Management Interface specification. IPMI is
|
||||
an open standard for machine health, inventory, and remote power control.
|
||||
|
||||
This utility can communicate with IPMI-enabled devices through either a
|
||||
kernel driver such as OpenIPMI or over the RMCP LAN protocol defined in
|
||||
the IPMI specification. IPMIv2 adds support for encrypted LAN
|
||||
communications and remote Serial-over-LAN functionality.
|
||||
|
||||
It provides commands for reading the Sensor Data Repository (SDR) and
|
||||
displaying sensor values, displaying the contents of the System Event
|
||||
Log (SEL), printing Field Replaceable Unit (FRU) information, reading and
|
||||
setting LAN configuration, and chassis power control.
|
||||
|
||||
%prep
|
||||
if [ "$RPM_BUILD_ROOT" ] && [ "$RPM_BUILD_ROOT" != "/" ]; then
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
fi
|
||||
|
||||
%setup
|
||||
|
||||
%build
|
||||
./configure --with-kerneldir \
|
||||
--with-rpm-distro=@DISTRO@ \
|
||||
--prefix=%{_prefix} \
|
||||
--bindir=%{_bindir} \
|
||||
--sbindir=%{_sbindir} \
|
||||
--datadir=%{_datadir} \
|
||||
--includedir=%{_includedir} \
|
||||
--libdir=%{_libdir} \
|
||||
--mandir=%{_mandir} \
|
||||
--sysconfdir=%{_sysconfdir}
|
||||
make
|
||||
|
||||
%install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install-strip
|
||||
|
||||
%clean
|
||||
if [ "$RPM_BUILD_ROOT" ] && [ "$RPM_BUILD_ROOT" != "/" ]; then
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(755,root,root)
|
||||
%attr(755,root,root) %{_bindir}/*
|
||||
%attr(755,root,root) %{_sbindir}/*
|
||||
%{_datadir}/ipmitool/*
|
||||
%{_mandir}/man*/*
|
||||
%doc %{_datadir}/doc/ipmitool
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Feb 25 2009 <pere@hungry.com> 1.8.11-1
|
||||
- Fix new GCC compilation issues in regards to Packing
|
||||
- Fix Tracker bug #1642710 - ipmi_kcs_drv being loaded/unloaded
|
||||
for 2.4 kernel instead of ipmi_si_drv driver module
|
||||
- New -y option added to allow specification of kg keys with
|
||||
non-printable characters
|
||||
- New -K option added to allow kgkey settings via environmental
|
||||
variable IPMI_KGKEY
|
||||
- Generic device support added for EEPROM with SDR Type 10h (gendev)
|
||||
- Fix to lan-bridging for a double-bridging crash and to fix
|
||||
an issue with bridging multiple concurrent requests and
|
||||
erroneous handling of raw Send Message
|
||||
- Lanplus fix for commands like 'sensor list' without the -t option
|
||||
causing wrong double bridged requests of a sensor is located
|
||||
on another satellite controller
|
||||
- Fix lan and lanplus request list entry removal bugs
|
||||
- Fix non-working issue when trying to send a bridge message with
|
||||
Cipher 3
|
||||
- Change bridge message handling to reuse command ipmi_lan_poll_recv
|
||||
- Added PICMG 2.0 and 2.3 support
|
||||
- Fix PICMG (ATCA) extension verification and reversal of BCD encoded
|
||||
values for "major" and "minor" fields
|
||||
- Add IANA support for Pigeon Point
|
||||
- Add OEM SW/FW Record identification
|
||||
- Fix to include I2C and LUN addresses so sensors are correctly managed
|
||||
- Patch ID 1990560 to get readings from non-linear analog sensors
|
||||
- Add support for SOL payload status command
|
||||
- SOL set parameter range checking added
|
||||
- Fixed SOL activate options usage
|
||||
- Fixed crashes when parsing 'sol payload' and 'tsol' cmds (#216967)
|
||||
- Added retries to SOL keepalive
|
||||
- Fixed wrong mask values for Front Panel disable/enable status
|
||||
- Add support to access fru internal use area
|
||||
- Add support for new PICMG 3.0 R3.0 (March 24, 2008) to allow
|
||||
blocks of data within the FRU storage area to be write protected.
|
||||
- Fix node reporting in GUID; Tracker bug #2339675
|
||||
- Fix watchdog use/action print strings
|
||||
- Fix endian bug in SDR add from file; Tracker bug #2075258
|
||||
- Fix crash when dumping SDRs in a file and there's an error
|
||||
getting an SDR; improve algorithm for optimal packet size
|
||||
- Fix occasional SDR dump segfault; #1793076
|
||||
- Allow ipmitool sel delete to accept hex list entry numbers
|
||||
- Fix SEL total space reporting.
|
||||
- Fix for garbage sensor threshold values reported when none
|
||||
returned. Tracker Bug #863748
|
||||
- ipmievd change to Monitor %used in SEL buffer and log warnings when
|
||||
the buffer is 80% and 100% full
|
||||
|
||||
* Fri Aug 08 2008 <pere@hungry.com> 1.8.10-1
|
||||
- Added support for BULL IANA number.
|
||||
- Fixed contrib build so the oem_ibm_sel_map file gets included in rpm
|
||||
builds again.
|
||||
- Added support for Debian packages to be built from CVS
|
||||
- Fix for sdr and sel timestamp reporting issues
|
||||
- Fix for discrete sensor state print routines to address state bits 8-14
|
||||
- Change ipmi_chassis_status() to non-static so it can be used externally
|
||||
- Added retries to SOL keepalive
|
||||
- Fix to stop sensor list command from reporting a failure due to missing
|
||||
sensor
|
||||
- Fix bug in sdr free space reporting
|
||||
- Add support for IANA number to vendor name conversion for many vendors
|
||||
- Fix segfault bug in lan set command
|
||||
- Fix bug in population of raw i2c wdata buffer
|
||||
- Fix bug in ipmb sensor reading
|
||||
- Fix misspellings, typos, incorrect strncmp lengths, white space
|
||||
- Update/fix printed help and usages for many commands
|
||||
- Add and update support for all commands in ipmitool man page
|
||||
- Fix for lanplus session re-open when the target becomes unavailable following
|
||||
a fw upgrade activation
|
||||
- Add support for watchdog timer shutoff, reset, and get info
|
||||
- Add support for more ibm systems in oem_ibm_sel_map
|
||||
- Add more JEDEC support info for DIMMs; decrease request size for DIMM FRU
|
||||
info to 16 bytes at a time to allow more DIMM FRUs to respond.
|
||||
- Fix to change hpmfwupg to version 1.02; fix to reduce hpmfwupg buffer
|
||||
length more aggressively when no response from iol
|
||||
- Fix HPM firmware activation via IOL; fake a timeout after IOL session
|
||||
re-open to force get upgrade status retry; Added retries on 0xD3
|
||||
completion code
|
||||
- Add support for freeipmi 0.6.0; adjust autoconf for changes
|
||||
- Fix for oemval2str size
|
||||
- Add support for product name resolution in mc info
|
||||
- Fix FRU display format
|
||||
- Added PICMG ekeying analyzer module support (ekanalyzer); display point
|
||||
to point physical connectivity and power supply information between
|
||||
carriers and AMC modules; display matched results of ekeying match
|
||||
between an on-carrier device and AMC module or between 2 AMC modules
|
||||
- Fix AMC GUID display support
|
||||
- Improved amcportstate operations
|
||||
- Added resolution for new sensor types
|
||||
- Fix segfault in SOL
|
||||
- Fix bug that caused infinite loop on BMCs with empty SDRs
|
||||
- Fix to move out Kontron OEM sensor resolution for other OEMs which could
|
||||
lead to bad event descriptions
|
||||
- Add new FRU edit mode thereby allowing serial numbers, etc. to be changed;
|
||||
improvements to OEM edit mode
|
||||
- Added SPD support for parms: channel number, max read size
|
||||
- Add SDR support for adding SDR records from a dumped file, clearing SDR,
|
||||
adding partial SDR records
|
||||
- Add updates and fixes to hpmfwupg: upload block size to 32 bytes for KCS,
|
||||
handle long response option, implement rollback override, garbage output fix
|
||||
- Add double bridge lan support , fix bridging issue
|
||||
- Add HPM support to pre-check which components need to be skipped
|
||||
- Fix autodetection of maximum packet size when using IPMB
|
||||
- Add new Kontron OEM command to set the BIOS boot option sequence
|
||||
- Add support for dual-bridge/ dual send message
|
||||
- Add auto-detect for local IPMB address using PICMG 2.X extension
|
||||
- Add support for HPM.1 1.0 specification compliance
|
||||
- Fix for improper lan/lanplus addressing
|
||||
- Added transit_channel and transit_addr to ipmi_intf struct
|
||||
- Fix bad password assertion bug due to rakp2 HMAC not being checked properly
|
||||
- Added ability to interpret PPS shelf manager clia sel dump
|
||||
- Corrected PICMG M7 state event definition macros
|
||||
- Added FRU parsing enhancements
|
||||
- Added "isol info", "isol set" and "isol activate" commands to support
|
||||
Intel IPMI v1.5 SOL functionality. Removed "isol setup" command.
|
||||
- Fix bug in ipmi_lan_recv_packet() in lan and lanplus interfaces.
|
||||
- Fix bug in "chassis poh" command.
|
||||
- Fix HPM.1 upgrade to apply to only given component when instructed to do so
|
||||
- Added configure auto-detection if dual bridge extension is supported
|
||||
by OpenIPMI
|
||||
|
||||
* Tue Mar 6 2007 <pere@hungry.com> 1.8.9-1
|
||||
- Added initial AMC ekey query operation support
|
||||
- Improvements to ekeying support (PICMG 3.x only)
|
||||
- Added initial interactive edition support for multirec; added IANA
|
||||
verification before interpreting PICMG records.
|
||||
- Added edit support for AMC activation "Maximum Internal Current"
|
||||
- Fix bug generating garbage on the screen when handling GetDeviceId
|
||||
and sol traffic occurs
|
||||
- Added ability to map OEM sensor types to OEM description string using
|
||||
IANA number; moved IANA number table
|
||||
- Fix lan set access command to use value already saved within parameters
|
||||
for PEF and authentication
|
||||
- Fix bug in cmd ipmitool lan stats get 1
|
||||
- Add support to allow ipmitool/ipmievd to target specific device nodes
|
||||
on multi-BMC systems
|
||||
- Add support for name+privilege lookup for lanplus sessions
|
||||
- Fix time_t conversion bug for 64-bit OS
|
||||
- Added prefix of hostname on sel ipmievd sessions
|
||||
- Fixed FWUM Get Info
|
||||
- Fix ipmievd fd closing bug
|
||||
- Add set-in-progress flag support to chassis bootdev
|
||||
- Added new chassis bootdev options
|
||||
- Add sol payload enable/disable comman
|
||||
- Fix SOL set errors when commit-write not supported
|
||||
- Fix reset of session timeout for lanplus interface
|
||||
- Fixed lan interface accessibility timeout handling
|
||||
- Fix bug with Function Get Channel Cipher Suites command when more
|
||||
than 1 page used.
|
||||
- Fix missing firmware firewall top-level command
|
||||
- Fix bug in SOL keepalive functionality
|
||||
- Fix SOLv2 NACK and retry handling for Intel ESB2 BMC
|
||||
- Added ipmi_sel_get_oem_sensor* APIs
|
||||
- Added HPM.1 support
|
||||
- Fix segfault when incorrect oem option supplied
|
||||
- Fix bus problem with spd command
|
||||
- Fix segfault in SOL when remote BMC does not return packet
|
||||
- Adjust packet length for AMC.0 retricting IPMB packets to 32 bytes
|
||||
- Added lan packet size reduction mechanism
|
||||
- Fix bug with sendMessage of bad length with different target
|
||||
- Fix for big endian (PPC) architecture
|
||||
- NetBSD fixes
|
||||
- Fix segfault and channel problem with user priv command
|
||||
- Add support for bus/chan on i2c raw command
|
||||
- Add freeipmi interface support
|
||||
- Add remote spd printing
|
||||
- Add better detection of linux/compiler.h to config
|
||||
- Makefile changes to fix makedistcheck, etc.
|
||||
|
||||
* Tue May 02 2006 <duncan@iceblink.org> 1.8.8-1
|
||||
- Fix segfaults in sensor data repository list
|
||||
- Fix ipmievd to open interface before daemonizing
|
||||
- Fix IPMIv1.5 authtype NONE to ignore supplied password
|
||||
- Fix cipher suite display bug in lan print
|
||||
- Fix typo in IPMIv2 SOL output when sending break
|
||||
- Fix improper LUN handling with Tyan SOL
|
||||
- Add LUN support to OpenIPMI interface
|
||||
- Add support for Kontron OEM commands
|
||||
- Update to Kontron Firmware Update command
|
||||
|
||||
* Sun Mar 19 2006 <duncan@iceblink.org> 1.8.7-1
|
||||
- Add Sun OEM command for blades
|
||||
- Increase argument size for raw commands in shell/exec
|
||||
- Fix handling of LUNs for LAN interfaces
|
||||
- Add IPMIv2 SOL loopback test
|
||||
- Add support for IBM OEM SEL messages
|
||||
- Disable file paranoia checks on read files by default
|
||||
- Support IPMIv2 SOL on older Intel boxes
|
||||
- Display message and exit if keepalive fails during SOL
|
||||
- Add support for setting VLAN id and priority
|
||||
- Add support for FreeBSD OpenIPMI-compatible driver
|
||||
- Add support for IPMIv2 Firmware Firewall
|
||||
- Fix gcc4 compile warnings
|
||||
- Make ipmievd generate pidfile
|
||||
- Add initscripts for ipmievd
|
||||
|
||||
* Mon Jan 17 2006 <duncan@iceblink.org> 1.8.6-1
|
||||
- Fix memory corruption when sending encrypted SOL traffic
|
||||
- Add keepalive timer to IPMIv2 SOL sessions
|
||||
|
||||
* 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
|
||||
- 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
|
||||
|
||||
* Wed May 18 2005 <duncan@iceblink.org> 1.8.2-1
|
||||
- Fix FRU reading for large (>255 bytes) areas.
|
||||
- Overhaul to ipmievd to support SEL polling in addition to OpenIPMI.
|
||||
- Fix LAN parameter segfault when no Ciphers supported by BMC.
|
||||
- Fix IPMIv2 support on Intel v2 BMCs (use -o intelplus).
|
||||
- Separate option parsing code from main ipmitool source file.
|
||||
- Add raw I2C support with IPMI Master Read-Write command.
|
||||
- Add support for new 'sdr elist' extended output format.
|
||||
- Add support for listing sensors by type with 'sdr type' command.
|
||||
- Add support for new 'sel elist' extended output format that
|
||||
cross-references events with sensors.
|
||||
- Add support for sending dynamically generated platform events
|
||||
based on existing sensor information.
|
||||
- New '-S' argument to read local SDR cache created with 'sdr dump'.
|
||||
- Updated manpage for ipmitool and ipmievd.
|
||||
|
||||
* Wed Apr 06 2005 <duncan@iceblink.org> 1.8.1-1
|
||||
- Install ipmievd into /usr/sbin
|
||||
|
||||
* Wed Mar 16 2005 <duncan@iceblink.org> 1.8.0-1
|
||||
- Fix IPMIv2.0 issues
|
||||
- Fix chassis boot parameter support
|
||||
- Add support for linear sensors
|
||||
- Update bmc plugin to work with new Solaris bmc driver (new ioctl
|
||||
for interface detection and new STREAMS message-based interface)
|
||||
|
||||
* Tue Jan 18 2005 <duncan@iceblink.org> 1.7.0-1
|
||||
- Propogate errors correctly so exit status will be useful
|
||||
- More consistent display of errors including completion code text
|
||||
- Errors and debug is send to stderr now
|
||||
- New "sel get" command that will print details about SEL entry
|
||||
and corresponding SDR records as well as FRUs via entity association
|
||||
- Improved event generator, now supports reading events from text file
|
||||
- New "-o oemtype" option for specifying OEM boards
|
||||
exsting types are "supermicro" and "intelwv2"
|
||||
- New PEF subsystem from Tim Murphy at Dell
|
||||
- New "bmc" plugin for Solaris 10 x86
|
||||
- Many bugfixes and contributed patches
|
||||
- Support for Supermicro BMC OEM authentication method
|
||||
- Fix minor problem with LAN parameter setting
|
||||
|
||||
* Wed Aug 18 2004 <duncan@iceblink.org> 1.6.0-1
|
||||
- Add a README
|
||||
- Add support for IPMIv2 and Serial-over-LAN from Newisys
|
||||
- Add Solaris x86 lipmi interface
|
||||
- Add support for building Solaris packages
|
||||
- Add support for building RPMs as non-root user
|
||||
- Fix segfault when doing "sel list" (from Matthew Braithwaite)
|
||||
- Fix "chassis identify" on some BMCs (from ebrower@sourceforge)
|
||||
- Add "bmc info" and related output (from ebrower@sourceforge)
|
||||
- new "shell" and "exec" commands
|
||||
- lots of other contributed patches
|
||||
|
||||
* Sat May 27 2004 <duncan@iceblink.org> 1.5.9-1
|
||||
- Add ability to get a particular sensor by name
|
||||
- Add ability to set a particular sensor threshold
|
||||
- Add support for displaying V2 channel authentication levels
|
||||
- Add README for rrdtool scripts in contrib directory
|
||||
- Improve lan interface retry handling
|
||||
- Support prompting for password or reading from environment
|
||||
- Move chaninfo command into channel subcommand
|
||||
- Fix reservation ID handling when two sessions open to BMC
|
||||
- Fix reading of large FRU data
|
||||
- Add configure option for changing binary to ipmiadm for Solaris
|
||||
- Fix compile problem on Solaris 8
|
||||
|
||||
* Tue Jan 27 2004 <duncan@iceblink.org> 1.5.8-1
|
||||
- Enable static compilation of interfaces
|
||||
- Fix types to be 64-bit safe
|
||||
- Fix compilation problems on Solaris
|
||||
- Fix multiple big-endian problems for Solaris/SPARC
|
||||
- Fix channel access to save settings to NVRAM
|
||||
- Set channel privilege limit to ADMIN during "access on"
|
||||
- Enable gratuitous ARP in bmcautoconf.sh
|
||||
- Add support for Linux kernel panic messages in SEL output
|
||||
- Add support for type 3 SDR records
|
||||
|
||||
* Mon Jan 5 2004 <duncan@iceblink.org> 1.5.7-1
|
||||
- add IPMIv1.5 eratta fixes
|
||||
- additions to FRU printing and FRU multirecords
|
||||
- better handling of SDR printing
|
||||
- contrib scripts for creating rrdtool graphs
|
||||
|
||||
* Thu Dec 4 2003 <duncan@iceblink.org> 1.5.6-1
|
||||
- Fix SEL event decoding for generic events
|
||||
- Handle empty SEL gracefully when doing "sel list"
|
||||
- Fix sdr handling of sensors that do not return a reading
|
||||
- Fix for CSV display of sensor readings/units from Fredrik <EFBFBD>hrn
|
||||
|
||||
* Tue Nov 25 2003 <duncan@iceblink.org> 1.5.5-1
|
||||
- Add -U option for setting LAN username
|
||||
- Fix -v usage for plugin interfaces
|
||||
|
||||
* Fri Nov 14 2003 <duncan@iceblink.org> 1.5.4-1
|
||||
- pull interface plugin api into library
|
||||
- fix ipmievd
|
||||
|
||||
* Fri Oct 31 2003 <duncan@iceblink.org> 1.5.3-1
|
||||
- add -g optin for pedantic ipmi-over-lan communication
|
||||
|
||||
* Fri Oct 24 2003 <duncan@iceblink.org> 1.5.2-1
|
||||
- add gratuitous arp interval setting
|
||||
|
||||
* Wed Oct 8 2003 <duncan@iceblink.org> 1.5.1-1
|
||||
- better SEL support
|
||||
- fix display bug in SDR list
|
||||
|
||||
* Fri Sep 5 2003 <duncan@iceblink.org> 1.5.0-1
|
||||
- use automake/autoconf/libtool
|
||||
- dynamic loading interface plugins
|
||||
|
||||
* Wed May 28 2003 <duncan@iceblink.org> 1.4.0-1
|
||||
- make UDP packet handling more robust
|
||||
- fix imb driver support
|
||||
|
||||
* Thu May 22 2003 <duncan@iceblink.org> 1.3-1
|
||||
- update manpage
|
||||
- rework of low-level network handling
|
||||
- add basic imb driver support
|
||||
|
||||
* Wed Apr 2 2003 <duncan@iceblink.org> 1.2-1
|
||||
- change command line option parsing
|
||||
- support for more chassis commands
|
||||
|
||||
* Tue Apr 1 2003 <duncan@iceblink.org> 1.1-1
|
||||
- minor fixes.
|
||||
|
||||
* Sun Mar 30 2003 <duncan@iceblink.org> 1.0-1
|
||||
- Initial release.
|
||||
|
@ -1,10 +0,0 @@
|
||||
PKG="@PACKAGE@"
|
||||
NAME="@PACKAGE@ - Utility for Intelligent Platform Management Interface (IPMI) control"
|
||||
ARCH="@ARCH@"
|
||||
VERSION="@VERSION@"
|
||||
CATEGORY="system"
|
||||
VENDOR="Duncan Laurie"
|
||||
EMAIL="duncan@iceblink.org"
|
||||
PSTAMP="@PSTAMP@"
|
||||
BASEDIR="@BASEDIR@"
|
||||
CLASSES="none"
|
@ -1,12 +0,0 @@
|
||||
i pkginfo
|
||||
d none bin ? ? ?
|
||||
f none bin/@PACKAGE@=../src/@PACKAGE@ 0755 root bin
|
||||
d none sbin ? ? ?
|
||||
f none sbin/ipmievd=../src/ipmievd 0755 root bin
|
||||
d none share ? ? ?
|
||||
d none share/man ? ? ?
|
||||
d none share/man/man1 ? ? ?
|
||||
f none share/man/man1/@PACKAGE@.1=../doc/@PACKAGE@.1 0644 root bin
|
||||
d none share/man/man8 ? ? ?
|
||||
f none share/man/man8/ipmievd.8=../doc/ipmievd.8 0644 root bin
|
||||
|
@ -1,12 +0,0 @@
|
||||
%_topdir %(echo $BUILDDIR)
|
||||
%_sourcedir %{_topdir}/..
|
||||
%_specdir %{_sourcedir}
|
||||
%_tmppath %{_topdir}/tmp
|
||||
%_builddir %{_topdir}/BUILD
|
||||
%_buildroot %{_topdir}/%{_tmppath}/%{name}-%{version}-root
|
||||
%_rpmdir %{_topdir}/RPMS
|
||||
%_srcrpmdir %{_topdir}/SRPMS
|
||||
%_distro @DISTRO@
|
||||
%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
|
||||
%packager jmank@hp.com
|
||||
%distribution Sourceforge Build
|
@ -1,8 +0,0 @@
|
||||
macrofiles: /usr/lib/rpm/macros:/usr/lib/rpm/%{_target}/macros:/etc/rpm/macros.specspo:/etc/rpm/macros:/etc/rpm/%{_target}/macros:%(echo $CONFIGDIR)/rpmmacros
|
||||
|
||||
buildarchtranslate: athlon: i386
|
||||
buildarchtranslate: i686: i386
|
||||
buildarchtranslate: i586: i386
|
||||
buildarchtranslate: i486: i386
|
||||
buildarchtranslate: i386: i386
|
||||
|
@ -1,5 +0,0 @@
|
||||
For more information about setting up your Debian system with IPMI
|
||||
please see the excellent howto by Tim Small:
|
||||
|
||||
http://buttersideup.com/docs/howto/IPMI_on_Debian.html
|
||||
|
@ -1,249 +1,3 @@
|
||||
version (1.8.11) unstable; urgency=low
|
||||
* Fix new GCC compilation issues in regards to Packing
|
||||
* Fix Tracker bug #1642710 - ipmi_kcs_drv being loaded/unloaded
|
||||
for 2.4 kernel instead of ipmi_si_drv driver module
|
||||
* New -y option added to allow specification of kg keys with
|
||||
non-printable characters
|
||||
* New -K option added to allow kgkey settings via environmental
|
||||
variable IPMI_KGKEY
|
||||
* Generic device support added for EEPROM with SDR Type 10h (gendev)
|
||||
* Fix to lan-bridging for a double-bridging crash and to fix
|
||||
an issue with bridging multiple concurrent requests and
|
||||
erroneous handling of raw Send Message
|
||||
* Lanplus fix for commands like 'sensor list' without the -t option
|
||||
causing wrong double bridged requests of a sensor is located
|
||||
on another satellite controller
|
||||
* Fix lan and lanplus request list entry removal bugs
|
||||
* Fix non-working issue when trying to send a bridge message with
|
||||
Cipher 3
|
||||
* Change bridge message handling to reuse command ipmi_lan_poll_recv
|
||||
* Added PICMG 2.0 and 2.3 support
|
||||
* Fix PICMG (ATCA) extension verification and reversal of BCD encoded
|
||||
values for "major" and "minor" fields
|
||||
* Add IANA support for Pigeon Point
|
||||
* Add OEM SW/FW Record identification
|
||||
* Fix to include I2C and LUN addresses so sensors are correctly managed
|
||||
* Patch ID 1990560 to get readings from non-linear analog sensors
|
||||
* Add support for SOL payload status command
|
||||
* SOL set parameter range checking added
|
||||
* Fixed SOL activate options usage
|
||||
* Fixed crashes when parsing 'sol payload' and 'tsol' cmds (#216967)
|
||||
* Added retries to SOL keepalive
|
||||
* Fixed wrong mask values for Front Panel disable/enable status
|
||||
* Add support to access fru internal use area
|
||||
* Add support for new PICMG 3.0 R3.0 (March 24, 2008) to allow
|
||||
blocks of data within the FRU storage area to be write
|
||||
protected.
|
||||
* Fix node reporting in GUID; Tracker bug #2339675
|
||||
* Fix watchdog use/action print strings
|
||||
* Fix endian bug in SDR add from file; Tracker bug #2075258
|
||||
* Fix crash when dumping SDRs in a file and there's an error
|
||||
getting an SDR; improve algorithm for optimal packet size
|
||||
* Fix occasional SDR dump segfault; #1793076
|
||||
* Allow ipmitool sel delete to accept hex list entry numbers
|
||||
* Fix SEL total space reporting.
|
||||
* Fix for garbage sensor threshold values reported when none
|
||||
returned. Tracker Bug #863748
|
||||
* ipmievd change to Monitor %used in SEL buffer and log warnings when
|
||||
the buffer is 80% and 100% full
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Wed, 25 Feb 2009 09:44:31 +0200
|
||||
|
||||
ipmitool (1.8.10) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
* Patch to allow Debian package builds from cvs.
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Fri, 8 Aug 2008 09:44:31 +0200
|
||||
|
||||
ipmitool (1.8.7-2) unstable; urgency=low
|
||||
|
||||
* Fix typo in init.d/ipmievd. (Closes: #361309)
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Sat, 8 Apr 2006 06:44:31 +0200
|
||||
|
||||
ipmitool (1.8.7-1) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
- Dropped nuclear clause from the copyright. Updated debian/copyright
|
||||
to reflect this.
|
||||
- ipmievd now store pid in /var/run/ipmievd.pid. Adjust init.d
|
||||
script to use it.
|
||||
* Rename /etc/default/ipmievd variable IPMIEVD_OPTS is renamed to
|
||||
IPMIEVD_OPTIONS to stay compatible with upstream and other
|
||||
distributions. Add backwards compatibility code with a warning to
|
||||
the users of the old variable.
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Sun, 26 Mar 2006 21:11:08 +0200
|
||||
|
||||
ipmitool (1.8.6-2) unstable; urgency=low
|
||||
|
||||
* Add ia64 as an supported arch. (Closes: #355930)
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Fri, 10 Mar 2006 23:34:50 +0100
|
||||
|
||||
ipmitool (1.8.6-1) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
- Avoid crashing when setting lan IP address. (Closes: #351205)
|
||||
* Avoid changing history by reverding upstream change
|
||||
to email addresses in debian/changelog.
|
||||
* Correct typo in control file: Suggest -> Suggests. Thanks
|
||||
to Philipp Matthias Hahn for the report.
|
||||
* Add init.d/ipmievd script. Based on script from Elmar Hoffmann,
|
||||
slightly modified to use lsb-base functions. Added dependency on
|
||||
lsb-base. (Closes: #345994)
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Sun, 26 Feb 2006 10:31:14 +0100
|
||||
|
||||
ipmitool (1.8.2-2) unstable; urgency=low
|
||||
|
||||
* Add build-dependency on 'libreadline5-dev | libreadline-dev' to make
|
||||
sure all archs get readline support. (Closes: #326341)
|
||||
* Add build-dependency on libssl-dev to enable SSL support on
|
||||
all archs.
|
||||
* Updated Standards-Version to 3.6.2.1. (No updates required)
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Sat, 3 Sep 2005 19:18:51 +0200
|
||||
|
||||
ipmitool (1.8.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
- Fix FRU reading for large (>255 bytes) areas.
|
||||
- Overhaul to ipmievd to support SEL polling in addition to OpenIPMI.
|
||||
- Fix LAN parameter segfault when no Ciphers supported by
|
||||
BMC. (Closes: #306806)
|
||||
- Fix IPMIv2 support on Intel v2 BMCs (use -o intelplus).
|
||||
- Separate option parsing code from main ipmitool source file.
|
||||
- Add raw I2C support with IPMI Master Read-Write command.
|
||||
- Add support for new 'sdr elist' extended output format.
|
||||
- Add support for listing sensors by type with 'sdr type' command.
|
||||
- Add support for new 'sel elist' extended output format that
|
||||
cross-references events with sensors.
|
||||
- Add support for sending dynamically generated platform events
|
||||
based on existing sensor information.
|
||||
- New '-S' argument to read local SDR cache created with 'sdr dump'.
|
||||
- Updated manpage for ipmitool and ipmievd. (Closes: #306894)
|
||||
* Correct the upstream URL in debian/changelog to the current one.
|
||||
* Suggest package openipmi. (Closes: #305629)
|
||||
* Add debian/watch file to detect new source versions.
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Sun, 5 Jun 2005 10:29:18 +0200
|
||||
|
||||
ipmitool (1.8.1-1) unstable; urgency=low
|
||||
|
||||
* New upstream release.
|
||||
* Install ipmievd into /usr/sbin/.
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Thu, 7 Apr 2005 01:18:44 +0200
|
||||
|
||||
ipmitool (1.8.0-1) unstable; urgency=low
|
||||
|
||||
* Initial upload into Debian, based on the upstream build
|
||||
rules. (Closes: #299924)
|
||||
* Convert debian/changelog to UTF-8.
|
||||
* Change section from 'contrib' to 'utils'.
|
||||
* Build-depend on debhelper (>> 4.0.0) to match the rules file.
|
||||
* Set Standards-version to 3.6.1.
|
||||
* Make sure binary dependency is properly generated.
|
||||
* Add long description, copied from the project README.
|
||||
* Drop useless provides 'ipmitool', as the package is called 'ipmitool'.
|
||||
* Don't install the COPYING file, as the license text already is
|
||||
included in debian/copyright.
|
||||
* Remove unused parts of the rules file.
|
||||
* Correct clean target in rules file, to use 'distclean' and remove
|
||||
configure-stamp not bogus config-stamp.
|
||||
|
||||
-- Petter Reinholdtsen <pere@debian.org> Sun, 3 Apr 2005 20:52:02 +0200
|
||||
|
||||
ipmitool (1.8.0) unstable; urgency=low
|
||||
|
||||
* Fix IPMIv2.0 issues
|
||||
* Fix chassis boot parameter support
|
||||
* Add support for linear sensors
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Wed, Mar 16 2005 17:08:12 -0700
|
||||
|
||||
ipmitool (1.7.1) unstable; urgency=low
|
||||
|
||||
* Update bmc plugin to work with new Solaris bmc driver (new ioctl
|
||||
for interface detection and new STREAMS message-based interface).
|
||||
|
||||
-- Seth Goldberg <sethmeisterg@hotmail.com> Mon, Mar 7 2005 18:03:00 -0800
|
||||
|
||||
ipmitool (1.7.0) unstable; urgency=low
|
||||
|
||||
* Propogate errors correctly so exit status will be useful
|
||||
* More consistent display of errors including completion code text
|
||||
* Errors and debug is send to stderr now
|
||||
* New "sel get" command that will print details about SEL entry
|
||||
and corresponding SDR records as well as FRUs via entity association
|
||||
* Improved event generator, now supports reading events from text file
|
||||
* New "-o oemtype" option for specifying OEM boards
|
||||
exsting types are "supermicro" and "intelwv2"
|
||||
* New PEF subsystem
|
||||
* New "bmc" plugin for Solaris 10 x86
|
||||
* Many bugfixes and contributed patches
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Fri, Jan 7 2005 19:58:22 -0700
|
||||
|
||||
ipmitool (1.6.2) unstable; urgency=low
|
||||
|
||||
* Support for Supermicro BMC OEM authentication method
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Mon, 16 Nov 2004 08:20:01 -0700
|
||||
|
||||
ipmitool (1.6.1) unstable; urgency=low
|
||||
|
||||
* Fix minor problem with LAN parameter setting
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Wed, 29 Sep 2004 11:19:17 -0700
|
||||
|
||||
ipmitool (1.6.0) unstable; urgency=low
|
||||
|
||||
* Add a README
|
||||
* Add support for IPMIv2 and Serial-over-LAN from Newisys
|
||||
* Add Solaris x86 lipmi interface
|
||||
* Add support for building Solaris packages
|
||||
* Add support for building RPMs as non-root user
|
||||
* Fix segfault when doing "sel list" (from Matthew Braithwaite)
|
||||
* Fix "chassis identify" on some BMCs (from ebrower@sourceforge)
|
||||
* Add "bmc info" and related output (from ebrower@sourceforge)
|
||||
* new "shell" and "exec" commands
|
||||
* lots of other contributed patches
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Thu, 9 Sep 2004 21:39:37 -0700
|
||||
|
||||
ipmitool (1.5.9) unstable; urgency=low
|
||||
|
||||
* Add ability to get a particular sensor by name
|
||||
* Add ability to set a particular sensor threshold
|
||||
* Add support for displaying V2 channel authentication levels
|
||||
* Add README for rrdtool scripts in contrib directory
|
||||
* Improve lan interface retry handling
|
||||
* Support prompting for password or reading from environment
|
||||
* Move chaninfo command into channel subcommand
|
||||
* Fix reservation ID handling when two sessions open to BMC
|
||||
* Fix reading of large FRU data
|
||||
* Add configure option for changing binary to ipmiadm for Solaris
|
||||
* Fix compile problem on Solaris 8
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Sat, 27 Mar 2004 00:11:37 -0700
|
||||
|
||||
ipmitool (1.5.8) unstable; urgency=low
|
||||
|
||||
* Enable static compilation of interfaces
|
||||
* Fix types to be 64-bit safe
|
||||
* Fix compilation problems on Solaris
|
||||
* Fix multiple big-endian problems for Solaris/SPARC
|
||||
* Fix channel access to save settings to NVRAM
|
||||
* Set channel privilege limit to ADMIN during "access on"
|
||||
* Enable gratuitous ARP in bmcautoconf.sh
|
||||
* Add support for Linux kernel panic messages in SEL output
|
||||
* Add support for type 3 SDR records
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Tue, 27 Jan 2004 16:23:25 -0700
|
||||
|
||||
ipmitool (1.5.7) unstable; urgency=low
|
||||
|
||||
* add IPMIv1.5 eratta fixes
|
||||
@ -251,49 +5,49 @@ ipmitool (1.5.7) unstable; urgency=low
|
||||
* better handling of SDR printing
|
||||
* contrib scripts for creating rrdtool graphs
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Mon, 5 Jan 2004 17:29:50 -0700
|
||||
-- Duncan Laurie <duncan@sun.com> Mon, 5 Jan 2004 17:29:50 -0700
|
||||
|
||||
ipmitool (1.5.6) unstable; urgency=low
|
||||
|
||||
* Fix SEL event decoding for generic events
|
||||
* Handle empty SEL gracefully when doing "sel list"
|
||||
* Fix sdr handling of sensors that do not return a reading
|
||||
* Fix for CSV display of sensor readings/units from Fredrik Öhrn
|
||||
* Fix for CSV display of sensor readings/units from Fredrik <EFBFBD>hrn
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Thu, 4 Dec 2003 14:47:19 -0700
|
||||
-- Duncan Laurie <duncan@sun.com> Thu, 4 Dec 2003 14:47:19 -0700
|
||||
|
||||
ipmitool (1.5.5) unstable; urgency=low
|
||||
|
||||
* Add -U option for setting LAN username
|
||||
* Fix -v usage for plugin interfaces
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Tue, 25 Nov 2003 15:10:48 -0700
|
||||
-- Duncan Laurie <duncan@sun.com> Tue, 25 Nov 2003 15:10:48 -0700
|
||||
|
||||
ipmitool (1.5.4) unstable; urgency=low
|
||||
|
||||
* Put interface plugin API into library
|
||||
* Fix ipmievd
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Fri, 14 Nov 2003 15:16:34 -0700
|
||||
-- Duncan Laurie <duncan@sun.com> Fri, 14 Nov 2003 15:16:34 -0700
|
||||
|
||||
ipmitool (1.5.3) unstable; urgency=low
|
||||
|
||||
* Add -g option to work with grizzly bmc
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Mon, 3 Nov 2003 18:04:07 -0700
|
||||
-- Duncan Laurie <duncan@sun.com> Mon, 3 Nov 2003 18:04:07 -0700
|
||||
|
||||
ipmitool (1.5.2) unstable; urgency=low
|
||||
|
||||
* add support for setting gratuitous arp interval
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Fri, 24 Oct 2003 11:00:00 -0700
|
||||
-- Duncan Laurie <duncan@sun.com> Fri, 24 Oct 2003 11:00:00 -0700
|
||||
|
||||
ipmitool (1.5.1) unstable; urgency=low
|
||||
|
||||
* better SEL support
|
||||
* fix display bug in SDR list
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Wed, 8 Oct 2003 17:28:51 -0700
|
||||
-- Duncan Laurie <duncan@sun.com> Wed, 8 Oct 2003 17:28:51 -0700
|
||||
|
||||
ipmitool (1.5.0) unstable; urgency=low
|
||||
|
||||
@ -301,24 +55,24 @@ ipmitool (1.5.0) unstable; urgency=low
|
||||
* add Intel IMB driver support
|
||||
* use autoconf/automake/libtool
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Fri, 5 Sep 2003 11:57:32 -0700
|
||||
-- Duncan Laurie <duncan@sun.com> Fri, 5 Sep 2003 11:57:32 -0700
|
||||
|
||||
ipmitool (1.2-1) unstable; urgency=low
|
||||
|
||||
* New command line option parsing
|
||||
* More chassis commands supported
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Wed, 2 Apr 2003 17:44:17 -0700
|
||||
-- Duncan Laurie <duncan@sun.com> Wed, 2 Apr 2003 17:44:17 -0700
|
||||
|
||||
ipmitool (1.1-1) unstable; urgency=low
|
||||
|
||||
* Minor fixes.
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Tue, 1 Apr 2003 14:31:10 -0700
|
||||
-- Duncan Laurie <duncan@sun.com> Tue, 1 Apr 2003 14:31:10 -0700
|
||||
|
||||
ipmitool (1.0-1) unstable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
-- Duncan Laurie <duncan@iceblink.org> Sun, 30 Mar 2003 21:30:46 -0700
|
||||
-- Duncan Laurie <duncan@sun.com> Sun, 30 Mar 2003 21:30:46 -0700
|
||||
|
||||
|
@ -1,28 +1,12 @@
|
||||
Source: ipmitool
|
||||
Section: utils
|
||||
Section: contrib
|
||||
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, autoconf, automake1.9 | automake, autotools-dev, libtool
|
||||
Standards-Version: 3.6.2.1
|
||||
Maintainer: Duncan Laurie <duncan@sun.com>
|
||||
Build-Depends: debhelper (>> 3.0.0)
|
||||
Standards-Version: 3.5.8
|
||||
|
||||
Package: ipmitool
|
||||
Architecture: i386 amd64 ia64
|
||||
Depends: ${shlibs:Depends}, lsb-base
|
||||
Suggests: 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
|
||||
for monitoring, logging, recovery, inventory, and control of hardware
|
||||
that is implemented independent of the main CPU, BIOS, and OS. The
|
||||
service processor (or Baseboard Management Controller, BMC) is the
|
||||
brain behind platform management and its primary purpose is to handle
|
||||
the autonomous sensor monitoring and event logging features.
|
||||
.
|
||||
The ipmitool program provides a simple command-line interface to this
|
||||
BMC. It features the ability to read the sensor data repository
|
||||
(SDR) and print sensor values, display the contents of the System
|
||||
Event Log (SEL), print Field Replaceable Unit (FRU) inventory
|
||||
information, read and set LAN configuration parameters, and perform
|
||||
remote chassis power control.
|
||||
Architecture: i386
|
||||
Provides: ipmitool
|
||||
Description: Utility for IPMI control with kernel driver or LAN interface
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
This package was debianized by Duncan Laurie before
|
||||
2003-11-18 17:55:21 +0100.
|
||||
|
||||
It was downloaded from <URL:http://ipmitool.sourceforge.net/>
|
||||
|
||||
Upstream Author: Duncan Laurie <duncan@iceblink.org>
|
||||
ipmitool
|
||||
Duncan Laurie <duncan@sun.com>
|
||||
http://www.iceblink.org/ipmitool/
|
||||
|
||||
Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
|
||||
@ -34,3 +31,8 @@ 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,4 +1,3 @@
|
||||
usr/bin
|
||||
usr/sbin
|
||||
usr/share/ipmitool
|
||||
usr/share/doc/ipmitool
|
||||
usr/lib/ipmitool
|
||||
usr/include/ipmitool
|
||||
|
@ -1,2 +0,0 @@
|
||||
README
|
||||
AUTHORS
|
@ -1,99 +0,0 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ipmievd
|
||||
# Required-Start: $local_fs $remote_fs $syslog
|
||||
# Required-Stop: $local_fs $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: S 0 1 6
|
||||
# Short-Description: IPMI event daemon
|
||||
# Description: ipmievd is a daemon which will listen for events
|
||||
# from the BMC that are being sent to the SEL and
|
||||
# also log those messages to syslog.
|
||||
### END INIT INFO
|
||||
#
|
||||
# Author: Elmar Hoffmann <elho@elho.net>
|
||||
# Licence: This script is public domain using the same
|
||||
# licence as ipmitool itself.
|
||||
# Modified by: Petter Reinholdtsen
|
||||
|
||||
set -e
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DESC="IPMI event daemon"
|
||||
NAME=ipmievd
|
||||
DAEMON=/usr/sbin/$NAME
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
|
||||
# Gracefully exit if the package has been removed.
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
. /etc/default/rcS
|
||||
|
||||
# Options used by ipmievd.
|
||||
#
|
||||
# "open" uses the asynchronous event notification from the OpenIPMI
|
||||
# kernel driver, "sel" uses active polling of the contents of the SEL
|
||||
# for new events.
|
||||
#
|
||||
# Need to force 'daemon' mode, to make sure messages are sent to
|
||||
# syslog and the program forks into the background.
|
||||
#
|
||||
# Se ipmievd(8) for more info.
|
||||
IPMIEVD_OPTIONS="open daemon"
|
||||
|
||||
# Read config file if it is present.
|
||||
[ -f /etc/default/$NAME ] && . /etc/default/$NAME
|
||||
|
||||
# Backwards compatibility with version 1.8.6-2 and 1.8.6-1. The
|
||||
# variable was renamed to be compatible with upstream, SuSe and RedHat.
|
||||
if [ -n "$IPMIEVD_OPTS" ]; then
|
||||
echo "warning: /etc/default/$NAME variable IPMIEVD_OPTS should be renamed to IPMIEVD_OPTIONS"
|
||||
IPMIEVD_OPTIONS="$IPMIEVD_OPTS"
|
||||
fi
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service.
|
||||
#
|
||||
d_start() {
|
||||
start-stop-daemon --start --quiet --exec $DAEMON -- $IPMIEVD_OPTIONS
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service.
|
||||
#
|
||||
d_stop() {
|
||||
start-stop-daemon --stop --quiet --name $NAME --exec $DAEMON
|
||||
}
|
||||
|
||||
CODE=0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_begin_msg "Starting $DESC" "$NAME"
|
||||
d_start || CODE=$?
|
||||
[ "$VERBOSE" != no ] && log_end_msg $CODE
|
||||
exit $CODE
|
||||
;;
|
||||
stop)
|
||||
log_begin_msg "Stopping $DESC" "$NAME"
|
||||
d_stop || CODE=$?
|
||||
log_end_msg $CODE
|
||||
exit $CODE
|
||||
;;
|
||||
restart|force-reload)
|
||||
log_begin_msg "Restarting $DESC" "$NAME"
|
||||
d_stop || true
|
||||
sleep 1
|
||||
d_start || CODE=$?
|
||||
log_end_msg $CODE
|
||||
exit $CODE
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -18,12 +18,9 @@ endif
|
||||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
|
||||
./bootstrap
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--with-kerneldir \
|
||||
--mandir=/usr/share/man
|
||||
./configure --enable-intf-lan --enable-intf-open \
|
||||
--enable-ipmievd \
|
||||
--prefix=/usr --mandir=/usr/share/man
|
||||
touch configure-stamp
|
||||
|
||||
#Architecture
|
||||
@ -44,10 +41,10 @@ build-indep-stamp: configure-stamp
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-arch-stamp build-indep-stamp configure-stamp
|
||||
rm -f build-arch-stamp build-indep-stamp config-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) distclean
|
||||
-$(MAKE) clean
|
||||
|
||||
dh_clean
|
||||
|
||||
@ -74,17 +71,6 @@ install-arch:
|
||||
# debian/tmp.
|
||||
$(MAKE) install DESTDIR=$(CURDIR)/debian/ipmitool
|
||||
|
||||
# No need to have two copies of the license text in the package.
|
||||
$(RM) $(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/COPYING
|
||||
|
||||
# Move upstream changelog to correct filename.
|
||||
mv $(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/ChangeLog \
|
||||
$(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/changelog
|
||||
|
||||
# Compress to avoid lintian warning. Not sure why dh_compress
|
||||
# isn't fixing this.
|
||||
gzip -9 $(CURDIR)/debian/ipmitool/usr/share/doc/ipmitool/changelog
|
||||
|
||||
# dh_movefiles -a
|
||||
# Must not depend on anything. This is to be called by
|
||||
# binary-arch/binary-multi
|
||||
@ -92,16 +78,27 @@ install-arch:
|
||||
binary-common:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installdocs
|
||||
dh_installchangelogs
|
||||
dh_installinit --name ipmievd
|
||||
# dh_installdebconf
|
||||
# dh_installdocs
|
||||
# dh_installexamples
|
||||
# dh_installmenu
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installinit
|
||||
# dh_installcron
|
||||
# dh_installmanpages
|
||||
# dh_installinfo
|
||||
# dh_undocumented
|
||||
# dh_installchangelogs
|
||||
dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
# You may want to make some executables suid here.
|
||||
# dh_suidregister
|
||||
dh_makeshlibs
|
||||
dh_shlibdeps
|
||||
dh_installdeb
|
||||
# dh_perl
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
@ -1,6 +0,0 @@
|
||||
# Rename this file to "watch" and then you can run the "uscan" command
|
||||
# to check for upstream updates and more.
|
||||
# Site Directory Pattern Version Script
|
||||
version=2
|
||||
http://heanet.dl.sourceforge.net/sourceforge/ipmitool/ipmitool-(.*).tar.bz2
|
||||
# debian uupdate
|
@ -27,10 +27,13 @@
|
||||
# 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
|
||||
|
||||
man_MANS = ipmitool.1 ipmievd.8
|
||||
man_MANS = ipmitool.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
|
@ -1,231 +0,0 @@
|
||||
.TH "ipmievd" "8" "" "Duncan Laurie" ""
|
||||
.SH "NAME"
|
||||
ipmievd \- IPMI event daemon for sending events to syslog
|
||||
.SH "SYNOPSIS"
|
||||
ipmievd [\fB\-c\fR|\fB\-h\fR|\fB\-d \fIN\fP\fR|\fB\-v\fR|\fB\-V\fR]
|
||||
\fB\-I\fR \fIopen\fP <\fIopen\fR | \fIsel\fR> [<\fIoption\fP>]
|
||||
|
||||
ipmievd [\fB\-c\fR|\fB\-h\fR|\fB\-v\fR|\fB\-V\fR]
|
||||
\fB\-I\fR \fIlan\fP \fB\-H\fR <\fIhostname\fP>
|
||||
[\fB\-p\fR <\fIport\fP>]
|
||||
[\fB\-U\fR <\fIusername\fP>]
|
||||
[\fB\-A\fR <\fIauthtype\fP>]
|
||||
[\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]
|
||||
\fB\-I\fR \fIlanplus\fP \fB\-H\fR <\fIhostname\fP>
|
||||
[\fB\-p\fR <\fIport\fP>]
|
||||
[\fB\-U\fR <\fIusername\fP>]
|
||||
[\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"
|
||||
\fBipmievd\fP 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. It is able to run in one of two modes: either using the
|
||||
Event Message Buffer and asynchronous event notification from the
|
||||
OpenIPMI kernel driver or actively polling the contents of the
|
||||
SEL for new events. Upon receipt of an event via either mechanism
|
||||
it will be logged to syslog with the \fILOG_LOCAL4\fP facility.
|
||||
|
||||
It is based on the \fBipmitool\fR utility and shares the same IPMI
|
||||
interface support and session setup options. Please see the
|
||||
\fBipmitool\fR manpage for more information on supported IPMI
|
||||
interfaces.
|
||||
.SH "OPTIONS"
|
||||
.TP
|
||||
\fB\-a\fR
|
||||
Prompt for the remote server password.
|
||||
.TP
|
||||
\fB\-A\fR <\fIauthtype\fP>
|
||||
Specify an authentication type to use during IPMIv1.5 \fIlan\fP
|
||||
session activation. Supported types are NONE, PASSWORD, MD2, MD5, or OEM.
|
||||
.TP
|
||||
\fB\-c\fR
|
||||
Present output in CSV (comma separated variable) format.
|
||||
This is not available with all commands.
|
||||
.TP
|
||||
\fB\-C\fR <\fIciphersuite\fP>
|
||||
The remote server authentication, integrity, and encryption algorithms
|
||||
to use for IPMIv2 \fIlanplus\fP connections. See table 22\-19 in the
|
||||
IPMIv2 specification. The default is 3 which specifies RAKP\-HMAC\-SHA1
|
||||
authentication, HMAC\-SHA1\-96 integrity, and AES\-CBC\-128 encryption algorightms.
|
||||
.TP
|
||||
\fB\-E\fR
|
||||
The remote server password is specified by the environment
|
||||
variable \fIIPMI_PASSWORD\fP.
|
||||
.TP
|
||||
\fB\-f\fR <\fIpassword_file\fP>
|
||||
Specifies a file containing the remote server password. If this
|
||||
option is absent, or if password_file is empty, the password
|
||||
will default to NULL.
|
||||
.TP
|
||||
\fB\-h\fR
|
||||
Get basic usage help from the command line.
|
||||
.TP
|
||||
\fB\-H\fR <\fIaddress\fP>
|
||||
Remote server address, can be IP address or hostname. This
|
||||
option is required for \fIlan\fP and \fIlanplus\fP interfaces.
|
||||
.TP
|
||||
\fB\-I\fR <\fIinterface\fP>
|
||||
Selects IPMI interface to use. Supported interfaces that are
|
||||
compiled in are visible in the usage help output.
|
||||
.TP
|
||||
\fB\-L\fR <\fIprivlvl\fP>
|
||||
Force session privilege level. Can be CALLBACK, USER,
|
||||
OPERATOR, ADMIN. Default is ADMIN.
|
||||
.TP
|
||||
\fB\-m\fR <\fIlocal_address\fP>
|
||||
Set the local IPMB address. The default is 0x20 and there
|
||||
should be no need to change it for normal operation.
|
||||
.TP
|
||||
\fB\-o\fR <\fIoemtype\fP>
|
||||
Select OEM type to support. This usually involves minor hacks
|
||||
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
|
||||
\fB\-P\fR <\fIpassword\fP>
|
||||
Remote server password is specified on the command line.
|
||||
If supported it will be obscured in the process list.
|
||||
\fBNote!\fR Specifying the password as a command line
|
||||
option is not recommended.
|
||||
.TP
|
||||
\fB\-S\fR <\fIsdr_cache_file\fP>
|
||||
Use local file for remote SDR cache. Using a local SDR cache
|
||||
can drastically increase performance for commands that require
|
||||
knowledge of the entire SDR to perform their function.
|
||||
.TP
|
||||
\fB\-t\fR <\fItarget_address\fP>
|
||||
Bridge IPMI requests to the remote target address.
|
||||
.TP
|
||||
\fB\-U\fR <\fIusername\fP>
|
||||
Remote server username, default is NULL user.
|
||||
.TP
|
||||
\fB\-d \fIN\fP\fR
|
||||
Use device number N to specify the /dev/ipmiN (or
|
||||
/dev/ipmi/N or /dev/ipmidev/N) device to use for in-band
|
||||
BMC communication. Used to target a specific BMC on a
|
||||
multi-node, multi-BMC system through the ipmi device
|
||||
driver interface. Default is 0.
|
||||
.TP
|
||||
\fB\-v\fR
|
||||
Increase verbose output level. This option may be specified
|
||||
multiple times to increase the level of debug output. If given
|
||||
three times you will get hexdumps of all incoming and
|
||||
outgoing packets.
|
||||
.TP
|
||||
\fB\-V\fR
|
||||
Display version information.
|
||||
|
||||
.LP
|
||||
If no password method is specified then ipmievd will prompt the
|
||||
user for a password. If no password is entered at the prompt,
|
||||
the remote server password will default to NULL.
|
||||
.SH "COMMANDS"
|
||||
.TP
|
||||
\fIhelp\fP
|
||||
This can be used to get command\-line help. It may also be
|
||||
placed at the end of commands to get option usage help.
|
||||
|
||||
> ipmievd help
|
||||
.br
|
||||
Commands:
|
||||
open Use OpenIPMI for asyncronous notification of events
|
||||
sel Poll SEL for notification of events
|
||||
|
||||
.TP
|
||||
\fIopen\fP
|
||||
This command starts ipmievd with the OpenIPMI event watching
|
||||
mechanism which relies on the Event Message Buffer feature of
|
||||
IPMI. This requires a properly installed and configured
|
||||
OpenIPMI driver on Linux and is only valid to be run through
|
||||
the \fIopen\fP interface. See the \fBipmitool\fR manpage
|
||||
and associated documentation for more information on setting
|
||||
up the OpenIPMI driver.
|
||||
|
||||
\fBNote\fR: Some BMC do not support the Event Message Buffer
|
||||
required for this command. Other BMCs claim to support it but
|
||||
do not actually deliver events to it. If this is the case please
|
||||
use the \fIsel\fP method.
|
||||
|
||||
.RS
|
||||
.TP
|
||||
\fIdaemon\fP
|
||||
Launch process as a daemon and reparent to init process.
|
||||
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\fIN\fP (where \fIN\fP is the ipmi device
|
||||
number -- defaults to 0).
|
||||
.RE
|
||||
|
||||
.TP
|
||||
\fIsel\fP
|
||||
This command starts ipmievd with the SEL Polling event watching
|
||||
mechanism. This will poll the SEL periodically to determine if
|
||||
new events have been logged. This command should work with all
|
||||
BMCs and is capable of using the LAN interface as well to monitor
|
||||
a remote system and log its events to a local syslog.
|
||||
|
||||
.RS
|
||||
.TP
|
||||
\fIdaemon\fP
|
||||
Launch process as a daemon and reparent to init process.
|
||||
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\fIN\fP (where \fIN\fP is the ipmi device
|
||||
number -- defaults to 0).
|
||||
.TP
|
||||
\fItimeout\fP=<\fBseconds\fR>
|
||||
Time between checks for SEL polling method. Default is 10 seconds.
|
||||
.RE
|
||||
.SH "EXAMPLES"
|
||||
.TP
|
||||
\fIExample 1\fP: Daemon process watching OpenIPMI for events
|
||||
|
||||
> ipmievd \-I open open daemon
|
||||
.TP
|
||||
\fIExample 2\fP: Local non\-daemon process checking remote SEL every 30 seconds
|
||||
|
||||
> ipmievd \-I lan \-H 1.2.3.4 \-f passfile sel nodaemon timeout=30
|
||||
.br
|
||||
Reading Sensors...
|
||||
.br
|
||||
Waiting for Events...
|
||||
.br
|
||||
.SH "AUTHOR"
|
||||
Duncan Laurie <duncan@iceblink.org>
|
||||
.SH "SEE ALSO"
|
||||
.TP
|
||||
IPMItool Homepage
|
||||
http://ipmitool.sourceforge.net
|
||||
.TP
|
||||
Intelligent Platform Management Interface Specification
|
||||
http://www.intel.com/design/servers/ipmi
|
||||
.TP
|
||||
OpenIPMI Homepage
|
||||
http://openipmi.sourceforge.net
|
File diff suppressed because it is too large
Load Diff
@ -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,16 +27,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.
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
noinst_HEADERS = log.h bswap.h helper.h ipmi.h ipmi_cc.h ipmi_intf.h \
|
||||
ipmi_chassis.h ipmi_entity.h ipmi_fru.h ipmi_hpmfwupg.h ipmi_lanp.h \
|
||||
ipmi_sdr.h ipmi_sel.h ipmi_sol.h ipmi_mc.h ipmi_raw.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_sdradd.h ipmi_isol.h ipmi_sunoem.h ipmi_picmg.h \
|
||||
ipmi_fwum.h ipmi_main.h ipmi_tsol.h ipmi_firewall.h \
|
||||
ipmi_kontronoem.h ipmi_ekanalyzer.h ipmi_gendev.h ipmi_ime.h \
|
||||
ipmi_delloem.h ipmi_dcmi.h
|
||||
ipmitooldir = $(includedir)/ipmitool
|
||||
|
||||
ipmitool_HEADERS = bswap.h helper.h ipmi.h ipmi_intf.h \
|
||||
ipmi_chassis.h ipmi_entity.h ipmi_fru.h ipmi_lanp.h \
|
||||
ipmi_sdr.h ipmi_sel.h ipmi_sol.h ipmi_bmc.h
|
||||
|
||||
|
@ -28,26 +28,28 @@
|
||||
* 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
|
||||
#define IPMI_BSWAP_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#if defined(__sun)
|
||||
|
||||
#undef BSWAP_16
|
||||
#undef BSWAP_32
|
||||
|
||||
#if HAVE_BYTESWAP_H
|
||||
# include <byteswap.h>
|
||||
# define BSWAP_16(x) bswap_16(x)
|
||||
# define BSWAP_32(x) bswap_32(x)
|
||||
#else
|
||||
# define BSWAP_16(x) ((((x) & 0xff00) >> 8) | (((x) & 0x00ff) << 8))
|
||||
# define BSWAP_32(x) ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) |\
|
||||
#define BSWAP_16(x) ((((x) & 0xff00) >> 8) | (((x) & 0x00ff) << 8))
|
||||
#define BSWAP_32(x) ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) |\
|
||||
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
|
||||
|
||||
#else
|
||||
|
||||
#include <byteswap.h>
|
||||
|
||||
#define BSWAP_16(x) bswap_16(x)
|
||||
#define BSWAP_32(x) bswap_32(x)
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* IPMI_BSWAP_H */
|
||||
|
@ -28,95 +28,31 @@
|
||||
* 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
|
||||
#define IPMI_HELPER_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef tboolean
|
||||
#define tboolean int
|
||||
#endif
|
||||
|
||||
/* IPMI spec. - UID 0 reserved, 63 maximum UID which can be used */
|
||||
#ifndef IPMI_UID_MIN
|
||||
# define IPMI_UID_MIN 1
|
||||
#endif
|
||||
#ifndef IPMI_UID_MAX
|
||||
# define IPMI_UID_MAX 63
|
||||
#endif
|
||||
|
||||
struct ipmi_intf;
|
||||
|
||||
struct valstr {
|
||||
uint16_t val;
|
||||
const char * str;
|
||||
};
|
||||
struct oemvalstr {
|
||||
uint32_t oem;
|
||||
uint16_t val;
|
||||
unsigned char val;
|
||||
const char * str;
|
||||
};
|
||||
const char * val2str(unsigned char val, const struct valstr * vs);
|
||||
|
||||
const char * val2str(uint16_t val, const struct valstr * vs);
|
||||
const char * oemval2str(uint32_t oem,uint16_t val, const struct oemvalstr * vs);
|
||||
unsigned short buf2short(unsigned char * buf);
|
||||
unsigned long buf2long(unsigned char * buf);
|
||||
const char * buf2str(unsigned char * buf, int len);
|
||||
void printbuf(unsigned char * buf, int len, char * desc);
|
||||
|
||||
int str2double(const char * str, double * double_ptr);
|
||||
int str2long(const char * str, int64_t * lng_ptr);
|
||||
int str2ulong(const char * str, uint64_t * ulng_ptr);
|
||||
int str2int(const char * str, int32_t * int_ptr);
|
||||
int str2uint(const char * str, uint32_t * uint_ptr);
|
||||
int str2short(const char * str, int16_t * shrt_ptr);
|
||||
int str2ushort(const char * str, uint16_t * ushrt_ptr);
|
||||
int str2char(const char * str, int8_t * chr_ptr);
|
||||
int str2uchar(const char * str, uint8_t * uchr_ptr);
|
||||
void signal_handler(int sig, void * handler);
|
||||
|
||||
int is_fru_id(const char *argv_ptr, uint8_t *fru_id_ptr);
|
||||
int is_ipmi_channel_num(const char *argv_ptr, uint8_t *channel_ptr);
|
||||
int is_ipmi_user_id(const char *argv_ptr, uint8_t *ipmi_uid_ptr);
|
||||
|
||||
uint16_t str2val(const char * str, const struct valstr * vs);
|
||||
void print_valstr(const struct valstr * vs, const char * title, int loglevel);
|
||||
void print_valstr_2col(const struct valstr * vs, const char * title, int loglevel);
|
||||
|
||||
|
||||
uint16_t buf2short(uint8_t * buf);
|
||||
uint32_t buf2long(uint8_t * buf);
|
||||
const char * buf2str(uint8_t * buf, int len);
|
||||
void printbuf(const uint8_t * buf, int len, const char * desc);
|
||||
uint8_t ipmi_csum(uint8_t * d, int s);
|
||||
FILE * ipmi_open_file(const char * file, int rw);
|
||||
void ipmi_start_daemon(struct ipmi_intf *intf);
|
||||
|
||||
#define ipmi_open_file_read(file) ipmi_open_file(file, 0)
|
||||
#define ipmi_open_file_write(file) ipmi_open_file(file, 1)
|
||||
|
||||
#ifndef __min
|
||||
# define __min(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef __max
|
||||
# define __max(a, b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef __minlen
|
||||
# define __minlen(a, b) ({ int x=strlen(a); int y=strlen(b); (x < y) ? x : y;})
|
||||
#endif
|
||||
|
||||
#ifndef __maxlen
|
||||
# define __maxlen(a, b) ({ int x=strlen(a); int y=strlen(b); (x > y) ? x : y;})
|
||||
#endif
|
||||
#define SIG_IGNORE(s) ((void)signal((s), SIG_IGN))
|
||||
#define SIG_DEFAULT(s) ((void)signal((s), SIG_DFL))
|
||||
#define SIG_HANDLE(s,h) ((void)signal_handler((s), (h)))
|
||||
|
||||
#endif /* 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
|
||||
@ -35,202 +39,75 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/ipmi_cc.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#define IPMI_BUF_SIZE 1024
|
||||
|
||||
#if HAVE_PRAGMA_PACK
|
||||
#define ATTRIBUTE_PACKING
|
||||
#else
|
||||
#define ATTRIBUTE_PACKING __attribute__ ((packed))
|
||||
#endif
|
||||
|
||||
|
||||
/* From table 13.16 of the IPMI v2 specification */
|
||||
#define IPMI_PAYLOAD_TYPE_IPMI 0x00
|
||||
#define IPMI_PAYLOAD_TYPE_SOL 0x01
|
||||
#define IPMI_PAYLOAD_TYPE_OEM 0x02
|
||||
#define IPMI_PAYLOAD_TYPE_RMCP_OPEN_REQUEST 0x10
|
||||
#define IPMI_PAYLOAD_TYPE_RMCP_OPEN_RESPONSE 0x11
|
||||
#define IPMI_PAYLOAD_TYPE_RAKP_1 0x12
|
||||
#define IPMI_PAYLOAD_TYPE_RAKP_2 0x13
|
||||
#define IPMI_PAYLOAD_TYPE_RAKP_3 0x14
|
||||
#define IPMI_PAYLOAD_TYPE_RAKP_4 0x15
|
||||
#define BUF_SIZE 256
|
||||
|
||||
extern int verbose;
|
||||
extern int csv_output;
|
||||
|
||||
struct ipmi_rq {
|
||||
struct {
|
||||
uint8_t netfn:6;
|
||||
uint8_t lun:2;
|
||||
uint8_t cmd;
|
||||
uint8_t target_cmd;
|
||||
uint16_t data_len;
|
||||
uint8_t *data;
|
||||
} msg;
|
||||
struct ipmi_session {
|
||||
unsigned char username[16];
|
||||
unsigned char challenge[16];
|
||||
unsigned char password;
|
||||
unsigned char authtype;
|
||||
unsigned char authcode[16];
|
||||
unsigned char privlvl;
|
||||
unsigned long in_seq;
|
||||
unsigned long out_seq;
|
||||
unsigned long id;
|
||||
int active;
|
||||
};
|
||||
|
||||
/*
|
||||
* This is what the sendrcv_v2() function would take as an argument. The common case
|
||||
* is for payload_type to be IPMI_PAYLOAD_TYPE_IPMI.
|
||||
*/
|
||||
struct ipmi_v2_payload {
|
||||
uint16_t payload_length;
|
||||
uint8_t payload_type;
|
||||
|
||||
union {
|
||||
|
||||
struct ipmi_rq {
|
||||
struct {
|
||||
uint8_t rq_seq;
|
||||
struct ipmi_rq *request;
|
||||
} ipmi_request;
|
||||
|
||||
struct {
|
||||
uint8_t rs_seq;
|
||||
struct ipmi_rs *response;
|
||||
} ipmi_response;
|
||||
|
||||
/* Only used internally by the lanplus interface */
|
||||
struct {
|
||||
uint8_t *request;
|
||||
} open_session_request;
|
||||
|
||||
/* Only used internally by the lanplus interface */
|
||||
struct {
|
||||
uint8_t *message;
|
||||
} rakp_1_message;
|
||||
|
||||
/* Only used internally by the lanplus interface */
|
||||
struct {
|
||||
uint8_t *message;
|
||||
} rakp_2_message;
|
||||
|
||||
/* Only used internally by the lanplus interface */
|
||||
struct {
|
||||
uint8_t *message;
|
||||
} rakp_3_message;
|
||||
|
||||
/* Only used internally by the lanplus interface */
|
||||
struct {
|
||||
uint8_t *message;
|
||||
} rakp_4_message;
|
||||
|
||||
struct {
|
||||
uint8_t data[IPMI_BUF_SIZE];
|
||||
uint16_t character_count;
|
||||
uint8_t packet_sequence_number;
|
||||
uint8_t acked_packet_number;
|
||||
uint8_t accepted_character_count;
|
||||
uint8_t is_nack; /* bool */
|
||||
uint8_t assert_ring_wor; /* bool */
|
||||
uint8_t generate_break; /* bool */
|
||||
uint8_t deassert_cts; /* bool */
|
||||
uint8_t deassert_dcd_dsr; /* bool */
|
||||
uint8_t flush_inbound; /* bool */
|
||||
uint8_t flush_outbound; /* bool */
|
||||
} sol_packet;
|
||||
|
||||
} payload;
|
||||
unsigned char netfn;
|
||||
unsigned char cmd;
|
||||
unsigned short data_len;
|
||||
unsigned char *data;
|
||||
} msg;
|
||||
};
|
||||
|
||||
struct ipmi_rq_entry {
|
||||
struct ipmi_rq req;
|
||||
struct ipmi_intf *intf;
|
||||
uint8_t rq_seq;
|
||||
uint8_t *msg_data;
|
||||
struct ipmi_intf * intf;
|
||||
struct ipmi_session * session;
|
||||
unsigned char rq_seq;
|
||||
unsigned char * msg_data;
|
||||
int msg_len;
|
||||
int bridging_level;
|
||||
struct ipmi_rq_entry *next;
|
||||
struct ipmi_rq_entry * next;
|
||||
};
|
||||
|
||||
struct ipmi_rs {
|
||||
uint8_t ccode;
|
||||
uint8_t data[IPMI_BUF_SIZE];
|
||||
|
||||
/*
|
||||
* Looks like this is the length of the entire packet, including the RMCP
|
||||
* stuff, then modified to be the length of the extra IPMI message data
|
||||
*/
|
||||
unsigned char ccode;
|
||||
unsigned char data[BUF_SIZE];
|
||||
int data_len;
|
||||
|
||||
struct {
|
||||
uint8_t netfn;
|
||||
uint8_t cmd;
|
||||
uint8_t seq;
|
||||
uint8_t lun;
|
||||
} msg;
|
||||
|
||||
struct {
|
||||
uint8_t authtype;
|
||||
uint32_t seq;
|
||||
uint32_t id;
|
||||
uint8_t bEncrypted; /* IPMI v2 only */
|
||||
uint8_t bAuthenticated; /* IPMI v2 only */
|
||||
uint8_t payloadtype; /* IPMI v2 only */
|
||||
/* This is the total length of the payload or
|
||||
IPMI message. IPMI v2.0 requires this to
|
||||
be 2 bytes. Not really used for much. */
|
||||
uint16_t msglen;
|
||||
unsigned char authtype;
|
||||
unsigned long seq;
|
||||
unsigned long id;
|
||||
} session;
|
||||
unsigned char msglen;
|
||||
struct {
|
||||
unsigned char rq_addr;
|
||||
unsigned char netfn;
|
||||
unsigned char rq_lun;
|
||||
unsigned char rs_addr;
|
||||
unsigned char rq_seq;
|
||||
unsigned char rs_lun;
|
||||
unsigned char cmd;
|
||||
} header;
|
||||
};
|
||||
|
||||
/*
|
||||
* A union of the different possible payload meta-data
|
||||
*/
|
||||
union {
|
||||
struct {
|
||||
uint8_t rq_addr;
|
||||
uint8_t netfn;
|
||||
uint8_t rq_lun;
|
||||
uint8_t rs_addr;
|
||||
uint8_t rq_seq;
|
||||
uint8_t rs_lun;
|
||||
uint8_t cmd;
|
||||
} ipmi_response;
|
||||
struct {
|
||||
uint8_t message_tag;
|
||||
uint8_t rakp_return_code;
|
||||
uint8_t max_priv_level;
|
||||
uint32_t console_id;
|
||||
uint32_t bmc_id;
|
||||
uint8_t auth_alg;
|
||||
uint8_t integrity_alg;
|
||||
uint8_t crypt_alg;
|
||||
} open_session_response;
|
||||
struct {
|
||||
uint8_t message_tag;
|
||||
uint8_t rakp_return_code;
|
||||
uint32_t console_id;
|
||||
uint8_t bmc_rand[16]; /* Random number generated by the BMC */
|
||||
uint8_t bmc_guid[16];
|
||||
uint8_t key_exchange_auth_code[20];
|
||||
} rakp2_message;
|
||||
struct {
|
||||
uint8_t message_tag;
|
||||
uint8_t rakp_return_code;
|
||||
uint32_t console_id;
|
||||
uint8_t integrity_check_value[20];
|
||||
} rakp4_message;
|
||||
struct {
|
||||
uint8_t packet_sequence_number;
|
||||
uint8_t acked_packet_number;
|
||||
uint8_t accepted_character_count;
|
||||
uint8_t is_nack; /* bool */
|
||||
uint8_t transfer_unavailable; /* bool */
|
||||
uint8_t sol_inactive; /* bool */
|
||||
uint8_t transmit_overrun; /* bool */
|
||||
uint8_t break_detected; /* bool */
|
||||
} sol_packet;
|
||||
|
||||
} payload;
|
||||
struct ipmi_intf {
|
||||
int fd;
|
||||
struct sockaddr_in addr;
|
||||
int abort;
|
||||
int pedantic;
|
||||
int (*open)(struct ipmi_intf *, char *, int, char *, char *);
|
||||
void (*close)(struct ipmi_intf *);
|
||||
struct ipmi_rs *(*sendrecv)(struct ipmi_intf *, struct ipmi_rq *);
|
||||
};
|
||||
|
||||
#define IPMI_NETFN_CHASSIS 0x0
|
||||
@ -240,50 +117,11 @@ struct ipmi_rs {
|
||||
#define IPMI_NETFN_FIRMWARE 0x8
|
||||
#define IPMI_NETFN_STORAGE 0xa
|
||||
#define IPMI_NETFN_TRANSPORT 0xc
|
||||
#define IPMI_NETFN_PICMG 0x2C
|
||||
#define IPMI_NETFN_DCGRP 0x2C
|
||||
#define IPMI_NETFN_OEM 0x2E
|
||||
#define IPMI_NETFN_ISOL 0x34
|
||||
#define IPMI_NETFN_TSOL 0x30
|
||||
#define IPMI_NETFN_SOL 0x34
|
||||
|
||||
#define IPMI_BMC_SLAVE_ADDR 0x20
|
||||
#define IPMI_REMOTE_SWID 0x81
|
||||
|
||||
|
||||
/* These values are IANA numbers */
|
||||
typedef enum IPMI_OEM {
|
||||
IPMI_OEM_UNKNOWN = 0,
|
||||
IPMI_OEM_HP = 11,
|
||||
IPMI_OEM_SUN = 42,
|
||||
IPMI_OEM_NOKIA = 94,
|
||||
IPMI_OEM_BULL = 107,
|
||||
IPMI_OEM_HITACHI_116 = 116,
|
||||
IPMI_OEM_NEC = 119,
|
||||
IPMI_OEM_TOSHIBA = 186,
|
||||
IPMI_OEM_INTEL = 343,
|
||||
IPMI_OEM_TATUNG = 373,
|
||||
IPMI_OEM_HITACHI_399 = 399,
|
||||
IPMI_OEM_DELL = 674,
|
||||
IPMI_OEM_LMC = 2168,
|
||||
IPMI_OEM_RADISYS = 4337,
|
||||
IPMI_OEM_BROADCOM = 4413,
|
||||
IPMI_OEM_MAGNUM = 5593,
|
||||
IPMI_OEM_TYAN = 6653,
|
||||
IPMI_OEM_NEWISYS = 9237,
|
||||
IPMI_OEM_FUJITSU_SIEMENS = 10368,
|
||||
IPMI_OEM_AVOCENT = 10418,
|
||||
IPMI_OEM_PEPPERCON = 10437,
|
||||
IPMI_OEM_SUPERMICRO = 10876,
|
||||
IPMI_OEM_OSA = 11102,
|
||||
IPMI_OEM_GOOGLE = 11129,
|
||||
IPMI_OEM_PICMG = 12634,
|
||||
IPMI_OEM_RARITAN = 13742,
|
||||
IPMI_OEM_KONTRON = 15000,
|
||||
IPMI_OEM_PPS = 16394,
|
||||
IPMI_OEM_AMI = 20974,
|
||||
IPMI_OEM_NOKIA_SIEMENS_NETWORKS = 28458
|
||||
} IPMI_OEM;
|
||||
|
||||
extern const struct valstr completion_code_vals[];
|
||||
const struct valstr completion_code_vals[25];
|
||||
|
||||
#endif /* IPMI_H */
|
||||
|
@ -28,15 +28,22 @@
|
||||
* 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
|
||||
#define IPMI_KFWUM_H
|
||||
#ifndef IPMI_BMC_H
|
||||
#define IPMI_BMC_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
#define BMC_GET_DEVICE_ID 0x01
|
||||
#define BMC_COLD_RESET 0x02
|
||||
#define BMC_WARM_RESET 0x03
|
||||
#define BMC_GET_SELF_TEST 0x04
|
||||
|
||||
int ipmi_fwum_main(struct ipmi_intf *, int, char **);
|
||||
int ipmi_bmc_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_KFWUM_H */
|
||||
#endif /*IPMI_BMC_H*/
|
@ -1,76 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_CC_H
|
||||
#define IPMI_CC_H
|
||||
|
||||
/*
|
||||
Thu Jan 11 09:32:41 2007
|
||||
francois.isabelle@ca.kontron.com
|
||||
|
||||
I just noticed that most modules refer to IPMI completion codes using
|
||||
hard coded values ...
|
||||
*/
|
||||
|
||||
/*
|
||||
* CC
|
||||
* See IPMI specification table 5-2 Generic Completion Codes
|
||||
*/
|
||||
|
||||
#define IPMI_CC_OK 0x00
|
||||
#define IPMI_CC_NODE_BUSY 0xc0
|
||||
#define IPMI_CC_INV_CMD 0xc1
|
||||
#define IPMI_CC_INV_CMD_FOR_LUN 0xc2
|
||||
#define IPMI_CC_TIMEOUT 0xc3
|
||||
#define IPMI_CC_OUT_OF_SPACE 0xc4
|
||||
#define IPMI_CC_RES_CANCELED 0xc5
|
||||
#define IPMI_CC_REQ_DATA_TRUNC 0xc6
|
||||
#define IPMI_CC_REQ_DATA_INV_LENGTH 0xc7
|
||||
#define IPMI_CC_REQ_DATA_FIELD_EXCEED 0xc8
|
||||
#define IPMI_CC_PARAM_OUT_OF_RANGE 0xc9
|
||||
#define IPMI_CC_CANT_RET_NUM_REQ_BYTES 0xca
|
||||
#define IPMI_CC_REQ_DATA_NOT_PRESENT 0xcb
|
||||
#define IPMI_CC_INV_DATA_FIELD_IN_REQ 0xcc
|
||||
#define IPMI_CC_ILL_SENSOR_OR_RECORD 0xcd
|
||||
#define IPMI_CC_RESP_COULD_NOT_BE_PRV 0xce
|
||||
#define IPMI_CC_CANT_RESP_DUPLI_REQ 0xcf
|
||||
#define IPMI_CC_CANT_RESP_SDRR_UPDATE 0xd0
|
||||
#define IPMI_CC_CANT_RESP_FIRM_UPDATE 0xd1
|
||||
#define IPMI_CC_CANT_RESP_BMC_INIT 0xd2
|
||||
#define IPMI_CC_DESTINATION_UNAVAILABLE 0xd3
|
||||
#define IPMI_CC_INSUFFICIENT_PRIVILEGES 0xd4
|
||||
#define IPMI_CC_NOT_SUPPORTED_PRESENT_STATE 0xd5
|
||||
#define IPMI_CC_ILLEGAL_COMMAND_DISABLED 0xd6
|
||||
#define IPMI_CC_UNSPECIFIED_ERROR 0xff
|
||||
|
||||
|
||||
#endif /*IPMI_CC_H*/
|
@ -1,258 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_CHANNEL_H
|
||||
#define IPMI_CHANNEL_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
|
||||
#define IPMI_GET_CHANNEL_AUTH_CAP 0x38
|
||||
#define IPMI_GET_CHANNEL_ACCESS 0x41
|
||||
#define IPMI_GET_CHANNEL_INFO 0x42
|
||||
#define IPMI_SET_USER_ACCESS 0x43
|
||||
#define IPMI_GET_USER_ACCESS 0x44
|
||||
#define IPMI_SET_USER_NAME 0x45
|
||||
#define IPMI_GET_USER_NAME 0x46
|
||||
#define IPMI_SET_USER_PASSWORD 0x47
|
||||
#define IPMI_GET_CHANNEL_CIPHER_SUITES 0x54
|
||||
|
||||
|
||||
/*
|
||||
* The Get Authentication Capabilities response structure
|
||||
* From table 22-15 of the IPMI v2.0 spec
|
||||
*/
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct get_channel_auth_cap_rsp {
|
||||
uint8_t channel_number;
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t v20_data_available : 1; /* IPMI v2.0 data is available */
|
||||
uint8_t __reserved1 : 1;
|
||||
uint8_t enabled_auth_types : 6; /* IPMI v1.5 enabled auth types */
|
||||
#else
|
||||
uint8_t enabled_auth_types : 6; /* IPMI v1.5 enabled auth types */
|
||||
uint8_t __reserved1 : 1;
|
||||
uint8_t v20_data_available : 1; /* IPMI v2.0 data is available */
|
||||
#endif
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved2 : 2;
|
||||
uint8_t kg_status : 1; /* two-key login status */
|
||||
uint8_t per_message_auth : 1; /* per-message authentication status */
|
||||
uint8_t user_level_auth : 1; /* user-level authentication status */
|
||||
uint8_t non_null_usernames : 1; /* one or more non-null users exist */
|
||||
uint8_t null_usernames : 1; /* one or more null usernames non-null pwds */
|
||||
uint8_t anon_login_enabled : 1; /* a null-named, null-pwd user exists */
|
||||
#else
|
||||
uint8_t anon_login_enabled : 1; /* a null-named, null-pwd user exists */
|
||||
uint8_t null_usernames : 1; /* one or more null usernames non-null pwds */
|
||||
uint8_t non_null_usernames : 1; /* one or more non-null users exist */
|
||||
uint8_t user_level_auth : 1; /* user-level authentication status */
|
||||
uint8_t per_message_auth : 1; /* per-message authentication status */
|
||||
uint8_t kg_status : 1; /* two-key login status */
|
||||
uint8_t __reserved2 : 2;
|
||||
#endif
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved3 : 6;
|
||||
uint8_t ipmiv20_support : 1; /* channel supports IPMI v2.0 connections */
|
||||
uint8_t ipmiv15_support : 1; /* channel supports IPMI v1.5 connections */
|
||||
#else
|
||||
uint8_t ipmiv15_support : 1; /* channel supports IPMI v1.5 connections */
|
||||
uint8_t ipmiv20_support : 1; /* channel supports IPMI v2.0 connections */
|
||||
uint8_t __reserved3 : 6;
|
||||
#endif
|
||||
uint8_t oem_id[3]; /* IANA enterprise number for auth type */
|
||||
uint8_t oem_aux_data; /* Additional OEM specific data for oem auths */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The Get Channel Info response structure
|
||||
* From table 22-29 of the IPMI v2.0 spec
|
||||
*/
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct get_channel_info_rsp {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved1 : 4;
|
||||
uint8_t channel_number : 4; /* channel number */
|
||||
#else
|
||||
uint8_t channel_number : 4; /* channel number */
|
||||
uint8_t __reserved1 : 4;
|
||||
#endif
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved2 : 1;
|
||||
uint8_t channel_medium : 7; /* Channel medium type per table 6-3 */
|
||||
#else
|
||||
uint8_t channel_medium : 7; /* Channel medium type per table 6-3 */
|
||||
uint8_t __reserved2 : 1;
|
||||
#endif
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved3 : 3;
|
||||
uint8_t channel_protocol : 5; /* Channel protocol per table 6-2 */
|
||||
#else
|
||||
uint8_t channel_protocol : 5; /* Channel protocol per table 6-2 */
|
||||
uint8_t __reserved3 : 3;
|
||||
#endif
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t session_support : 2; /* Description of session support */
|
||||
uint8_t active_sessions : 6; /* Count of active sessions */
|
||||
#else
|
||||
uint8_t active_sessions : 6; /* Count of active sessions */
|
||||
uint8_t session_support : 2; /* Description of session support */
|
||||
#endif
|
||||
uint8_t vendor_id[3]; /* For OEM that specified the protocol */
|
||||
uint8_t aux_info[2]; /* Not used*/
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* The Get Channel Access response structure
|
||||
* From table 22-28 of the IPMI v2.0 spec
|
||||
*/
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct get_channel_access_rsp {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved1 : 2;
|
||||
uint8_t alerting : 1;
|
||||
uint8_t per_message_auth : 1;
|
||||
uint8_t user_level_auth : 1;
|
||||
uint8_t access_mode : 3;
|
||||
#else
|
||||
uint8_t access_mode : 3;
|
||||
uint8_t user_level_auth : 1;
|
||||
uint8_t per_message_auth : 1;
|
||||
uint8_t alerting : 1;
|
||||
uint8_t __reserved1 : 2;
|
||||
#endif
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved2 : 4;
|
||||
uint8_t channel_priv_limit : 4; /* Channel privilege level limit */
|
||||
#else
|
||||
uint8_t channel_priv_limit : 4; /* Channel privilege level limit */
|
||||
uint8_t __reserved2 : 4;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct get_user_access_rsp {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved1 : 2;
|
||||
uint8_t max_user_ids : 6;
|
||||
uint8_t __reserved2 : 2;
|
||||
uint8_t enabled_user_ids : 6;
|
||||
uint8_t __reserved3 : 2;
|
||||
uint8_t fixed_user_ids : 6;
|
||||
uint8_t __reserved4 : 1;
|
||||
uint8_t callin_callback : 1;
|
||||
uint8_t link_auth : 1;
|
||||
uint8_t ipmi_messaging : 1;
|
||||
uint8_t privilege_limit : 4;
|
||||
#else
|
||||
uint8_t max_user_ids : 6;
|
||||
uint8_t __reserved1 : 2;
|
||||
uint8_t enabled_user_ids : 6;
|
||||
uint8_t __reserved2 : 2;
|
||||
uint8_t fixed_user_ids : 6;
|
||||
uint8_t __reserved3 : 2;
|
||||
uint8_t privilege_limit : 4;
|
||||
uint8_t ipmi_messaging : 1;
|
||||
uint8_t link_auth : 1;
|
||||
uint8_t callin_callback : 1;
|
||||
uint8_t __reserved4 : 1;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct set_user_access_data {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t change_bits : 1;
|
||||
uint8_t callin_callback : 1;
|
||||
uint8_t link_auth : 1;
|
||||
uint8_t ipmi_messaging : 1;
|
||||
uint8_t channel : 4;
|
||||
uint8_t __reserved1 : 2;
|
||||
uint8_t user_id : 6;
|
||||
uint8_t __reserved2 : 4;
|
||||
uint8_t privilege_limit : 4;
|
||||
uint8_t __reserved3 : 4;
|
||||
uint8_t session_limit : 4;
|
||||
#else
|
||||
uint8_t channel : 4;
|
||||
uint8_t ipmi_messaging : 1;
|
||||
uint8_t link_auth : 1;
|
||||
uint8_t callin_callback : 1;
|
||||
uint8_t change_bits : 1;
|
||||
uint8_t user_id : 6;
|
||||
uint8_t __reserved1 : 2;
|
||||
uint8_t privilege_limit : 4;
|
||||
uint8_t __reserved2 : 4;
|
||||
uint8_t session_limit : 4;
|
||||
uint8_t __reserved3 : 4;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
uint8_t ipmi_get_channel_medium(struct ipmi_intf * intf, uint8_t channel);
|
||||
uint8_t ipmi_current_channel_medium(struct ipmi_intf * intf);
|
||||
int ipmi_channel_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||
int ipmi_get_channel_auth_cap(struct ipmi_intf * intf, uint8_t channel, uint8_t priv);
|
||||
int ipmi_get_channel_info(struct ipmi_intf * intf, uint8_t channel);
|
||||
|
||||
#endif /*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
|
||||
@ -47,9 +51,6 @@
|
||||
#define IPMI_CHASSIS_POLICY_PREVIOUS 0x1
|
||||
#define IPMI_CHASSIS_POLICY_ALWAYS_OFF 0x0
|
||||
|
||||
int ipmi_chassis_power_status(struct ipmi_intf * intf);
|
||||
int ipmi_chassis_power_control(struct ipmi_intf * intf, uint8_t ctl);
|
||||
int ipmi_chassis_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||
int ipmi_power_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||
int ipmi_chassis_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /*IPMI_CHASSIS_H*/
|
||||
|
@ -1,134 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_CONSTANTS_H
|
||||
#define IPMI_CONSTANTS_H
|
||||
|
||||
|
||||
/*
|
||||
* COMMANDS
|
||||
*/
|
||||
#define IPMI_GET_SDR_REPOSITORY_INFO 0x20
|
||||
#define IPMI_SOL_ACTIVATING 0x20
|
||||
#define IPMI_SET_SOL_CONFIG_PARAMETERS 0x21
|
||||
#define IPMI_GET_SOL_CONFIG_PARAMETERS 0x22
|
||||
#define IPMI_SET_USER_ACCESS 0x43
|
||||
#define IPMI_GET_USER_ACCESS 0x44
|
||||
#define IPMI_SET_USER_NAME 0x45
|
||||
#define IPMI_GET_USER_NAME 0x46
|
||||
#define IPMI_SET_USER_PASSWORD 0x47
|
||||
#define IPMI_ACTIVATE_PAYLOAD 0x48
|
||||
#define IPMI_DEACTIVATE_PAYLOAD 0x49
|
||||
#define IPMI_SUSPEND_RESUME_PAYLOAD_ENCRYPTYION 0x55
|
||||
#define IPMI_GET_SEL_TIME 0x48
|
||||
#define IPMI_SET_SEL_TIME 0x49
|
||||
#define IPMI_SET_USER_PAYLOAD_ACCESS 0x4c
|
||||
#define IPMI_GET_USER_PAYLOAD_ACCESS 0x4d
|
||||
|
||||
#define IPMI_1_5_AUTH_TYPE_BIT_NONE 0x01
|
||||
#define IPMI_1_5_AUTH_TYPE_BIT_MD2 0x02
|
||||
#define IPMI_1_5_AUTH_TYPE_BIT_MD5 0x04
|
||||
#define IPMI_1_5_AUTH_TYPE_BIT_PASSWORD 0x10
|
||||
#define IPMI_1_5_AUTH_TYPE_BIT_OEM 0x20
|
||||
|
||||
#define IPMI_SESSION_AUTHTYPE_NONE 0x0
|
||||
#define IPMI_SESSION_AUTHTYPE_MD2 0x1
|
||||
#define IPMI_SESSION_AUTHTYPE_MD5 0x2
|
||||
#define IPMI_SESSION_AUTHTYPE_KEY 0x4
|
||||
#define IPMI_SESSION_AUTHTYPE_PASSWORD IPMI_SESSION_AUTHTYPE_KEY
|
||||
#define IPMI_SESSION_AUTHTYPE_OEM 0x5
|
||||
#define IPMI_SESSION_AUTHTYPE_RMCP_PLUS 0x6
|
||||
|
||||
#define IPMI_SESSION_PRIV_UNSPECIFIED 0x0
|
||||
#define IPMI_SESSION_PRIV_CALLBACK 0x1
|
||||
#define IPMI_SESSION_PRIV_USER 0x2
|
||||
#define IPMI_SESSION_PRIV_OPERATOR 0x3
|
||||
#define IPMI_SESSION_PRIV_ADMIN 0x4
|
||||
#define IPMI_SESSION_PRIV_OEM 0x5
|
||||
|
||||
#define IPMI_SET_IN_PROGRESS_SET_COMPLETE 0x00
|
||||
#define IPMI_SET_IN_PROGRESS_IN_PROGRESS 0x01
|
||||
#define IPMI_SET_IN_PROGRESS_COMMIT_WRITE 0x02
|
||||
|
||||
#define IPMI_CHANNEL_MEDIUM_RESERVED 0x0
|
||||
#define IPMI_CHANNEL_MEDIUM_IPMB_I2C 0x1
|
||||
#define IPMI_CHANNEL_MEDIUM_ICMB_1 0x2
|
||||
#define IPMI_CHANNEL_MEDIUM_ICMB_09 0x3
|
||||
#define IPMI_CHANNEL_MEDIUM_LAN 0x4
|
||||
#define IPMI_CHANNEL_MEDIUM_SERIAL 0x5
|
||||
#define IPMI_CHANNEL_MEDIUM_LAN_OTHER 0x6
|
||||
#define IPMI_CHANNEL_MEDIUM_SMBUS_PCI 0x7
|
||||
#define IPMI_CHANNEL_MEDIUM_SMBUS_1 0x8
|
||||
#define IPMI_CHANNEL_MEDIUM_SMBUS_2 0x9
|
||||
#define IPMI_CHANNEL_MEDIUM_USB_1 0xa
|
||||
#define IPMI_CHANNEL_MEDIUM_USB_2 0xb
|
||||
#define IPMI_CHANNEL_MEDIUM_SYSTEM 0xc
|
||||
|
||||
#define IPMI_CHASSIS_CTL_POWER_DOWN 0x0
|
||||
#define IPMI_CHASSIS_CTL_POWER_UP 0x1
|
||||
#define IPMI_CHASSIS_CTL_POWER_CYCLE 0x2
|
||||
#define IPMI_CHASSIS_CTL_HARD_RESET 0x3
|
||||
#define IPMI_CHASSIS_CTL_PULSE_DIAG 0x4
|
||||
#define IPMI_CHASSIS_CTL_ACPI_SOFT 0x5
|
||||
|
||||
#define IPMI_CHASSIS_POLICY_NO_CHANGE 0x3
|
||||
#define IPMI_CHASSIS_POLICY_ALWAYS_ON 0x2
|
||||
#define IPMI_CHASSIS_POLICY_PREVIOUS 0x1
|
||||
#define IPMI_CHASSIS_POLICY_ALWAYS_OFF 0x0
|
||||
|
||||
#define IPMI_CHASSIS_BOOTPARAM_SET_IN_PROGRESS 0
|
||||
#define IPMI_CHASSIS_BOOTPARAM_SVCPART_SELECT 1
|
||||
#define IPMI_CHASSIS_BOOTPARAM_SVCPART_SCAN 2
|
||||
#define IPMI_CHASSIS_BOOTPARAM_FLAG_VALID 3
|
||||
#define IPMI_CHASSIS_BOOTPARAM_INFO_ACK 4
|
||||
#define IPMI_CHASSIS_BOOTPARAM_BOOT_FLAGS 5
|
||||
#define IPMI_CHASSIS_BOOTPARAM_INIT_INFO 6
|
||||
#define IPMI_CHASSIS_BOOTPARAM_INIT_MBOX 7
|
||||
|
||||
/* From table 13-17 of the IPMI v2 specification */
|
||||
#define IPMI_AUTH_RAKP_NONE 0x00
|
||||
#define IPMI_AUTH_RAKP_HMAC_SHA1 0x01
|
||||
#define IPMI_AUTH_RAKP_HMAC_MD5 0x02
|
||||
|
||||
/* From table 13-18 of the IPMI v2 specification */
|
||||
#define IPMI_INTEGRITY_NONE 0x00
|
||||
#define IPMI_INTEGRITY_HMAC_SHA1_96 0x01
|
||||
#define IPMI_INTEGRITY_HMAC_MD5_128 0x02
|
||||
#define IPMI_INTEGRITY_MD5_128 0x03
|
||||
|
||||
/* From table 13-19 of the IPMI v2 specfication */
|
||||
#define IPMI_CRYPT_NONE 0x00
|
||||
#define IPMI_CRYPT_AES_CBC_128 0x01
|
||||
#define IPMI_CRYPT_XRC4_128 0x02
|
||||
#define IPMI_CRYPT_XRC4_40 0x03
|
||||
|
||||
#endif /*IPMI_CONSTANTS_H*/
|
@ -1,129 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2008 Intel Corporation.
|
||||
* All rights reserved
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef IPMI_DCMI_H
|
||||
#define IPMI_DCMI_H
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
/* DCMI commands per DCMI 1.5 SPEC */
|
||||
|
||||
#define IPMI_DCMI 0xDC /* Group Extension Identification */
|
||||
#define IPMI_DCMI_COMPAT 0x01
|
||||
#define IPMI_DCMI_GETRED 0x02
|
||||
#define IPMI_DCMI_GETLMT 0x03
|
||||
#define IPMI_DCMI_SETLMT 0x04
|
||||
#define IPMI_DCMI_PWRACT 0x05
|
||||
#define IPMI_DCMI_GETASSET 0x06
|
||||
#define IPMI_DCMI_SETASSET 0x08
|
||||
#define IPMI_DCMI_GETMNGCTRLIDS 0x09
|
||||
#define IPMI_DCMI_SETMNGCTRLIDS 0x0A
|
||||
#define IPMI_DCMI_SETTERMALLIMIT 0x0B
|
||||
#define IPMI_DCMI_GETTERMALLIMIT 0x0C
|
||||
#define IPMI_DCMI_GETSNSR 0x07
|
||||
#define IPMI_DCMI_PWRMGT 0x08
|
||||
#define IPMI_DCMI_GETTEMPRED 0x10
|
||||
#define IPMI_DCMI_SETCONFPARAM 0x12
|
||||
#define IPMI_DCMI_GETCONFPARAM 0x13
|
||||
|
||||
#define IPMI_DCMI_CONFORM 0x0001
|
||||
#define IPMI_DCMI_1_1_CONFORM 0x0101
|
||||
#define IPMI_DCMI_1_5_CONFORM 0x0501
|
||||
|
||||
#define DCMI_MAX_BYTE_SIZE 0x10
|
||||
#define DCMI_MAX_BYTE_TEMP_READ_SIZE 0x08
|
||||
|
||||
#define GOOD_PWR_GLIMIT_CCODE(ccode) ((ccode = ((ccode == 0x80) ? 0 : ccode)))
|
||||
#define GOOD_ASSET_TAG_CCODE(ccode) ((ccode = (((ccode == 0x80) || (ccode == 0x81) || (ccode == 0x82) || (ccode == 0x83)) ? 0 : ccode)))
|
||||
|
||||
|
||||
struct dcmi_cmd {
|
||||
uint16_t val;
|
||||
const char * str;
|
||||
const char * desc;
|
||||
};
|
||||
|
||||
/* make a struct for the return from the get limit command */
|
||||
struct power_limit {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint16_t reserved_1; /* second and third bytes are reserved */
|
||||
uint8_t action; /* fourth byte is the exception action */
|
||||
uint16_t limit; /* fifth through sixth byte are the power limit in watts */
|
||||
uint32_t correction; /* seventh - 10th bytes are the correction period */
|
||||
uint16_t reserved_2; /* 11th - 12th are reserved bytes */
|
||||
uint16_t sample; /* 13th - 14th are sample period time */
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* make a struct for the return from the reading command */
|
||||
struct power_reading {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint16_t curr_pwr;
|
||||
uint16_t min_sample;
|
||||
uint16_t max_sample;
|
||||
uint16_t avg_pwr;
|
||||
uint32_t time_stamp; /* time since epoch */
|
||||
uint32_t sample;
|
||||
uint8_t state;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* make a struct for the return from the capabilites command */
|
||||
struct capabilities {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint16_t conformance;
|
||||
uint8_t revision;
|
||||
uint8_t data_byte1;
|
||||
uint8_t data_byte2;
|
||||
uint8_t data_byte3;
|
||||
uint8_t data_byte4;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* make a struct for the return from the sensor info command */
|
||||
struct sensor_info {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint8_t i_instances;
|
||||
uint8_t i_records;
|
||||
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* make a struct for the return from the get asset tag command */
|
||||
struct asset_tag {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint8_t length;
|
||||
const char tag[16];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* make a struct for the return from the set asset tag command */
|
||||
struct set_asset_tag {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint8_t length;
|
||||
const char tag[16];
|
||||
uint8_t *data;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* make a struct for the return from the get thermal limit command */
|
||||
struct thermal_limit {
|
||||
uint8_t grp_id; /* first byte: Group Extension ID */
|
||||
uint8_t exceptionActions;
|
||||
uint8_t tempLimit;
|
||||
uint16_t exceptionTime;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
int ipmi_dcmi_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||
|
||||
#endif /*IPMI_DCMI_H*/
|
@ -1,366 +0,0 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2008, Dell Inc
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
- Neither the name of Dell Inc nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
*****************************************************************************/
|
||||
#ifndef IPMI_DELLOEM_H
|
||||
#define IPMI_DELLOEM_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
|
||||
/* Dell selector for LCD control - get and set unless specified */
|
||||
#define IPMI_DELL_LCD_STRING_SELECTOR 0xC1 /* RW get/set the user string */
|
||||
#define IPMI_DELL_LCD_CONFIG_SELECTOR 0xC2 /* RW set to user/default/none */
|
||||
#define IPMI_DELL_LCD_GET_CAPS_SELECTOR 0xCF /* RO use when available*/
|
||||
#define IPMI_DELL_LCD_STRINGEX_SELECTOR 0xD0 /* RW get/set the user string use first when available*/
|
||||
#define IPMI_DELL_LCD_STATUS_SELECTOR 0xE7 /* LCD string when config set to default.*/
|
||||
#define IPMI_DELL_PLATFORM_MODEL_NAME_SELECTOR 0xD1 /* LCD string when config set to default.*/
|
||||
|
||||
/* Dell defines for picking which string to use */
|
||||
#define IPMI_DELL_LCD_CONFIG_USER_DEFINED 0x00 /* use string set by user*/
|
||||
#define IPMI_DELL_LCD_CONFIG_DEFAULT 0x01 /* use platform model name*/
|
||||
#define IPMI_DELL_LCD_CONFIG_NONE 0x02 /* blank*/
|
||||
#define IPMI_DELL_LCD_iDRAC_IPV4ADRESS 0x04 /* use string set by user*/
|
||||
#define IPMI_DELL_LCD_IDRAC_MAC_ADDRESS 0x08 /* use platform model name*/
|
||||
#define IPMI_DELL_LCD_OS_SYSTEM_NAME 0x10 /* blank*/
|
||||
|
||||
#define IPMI_DELL_LCD_SERVICE_TAG 0x20 /* use string set by user*/
|
||||
#define IPMI_DELL_LCD_iDRAC_IPV6ADRESS 0x40 /* use string set by user*/
|
||||
#define IPMI_DELL_LCD_AMBEINT_TEMP 0x80 /* use platform model name*/
|
||||
#define IPMI_DELL_LCD_SYSTEM_WATTS 0x100 /* blank*/
|
||||
#define IPMI_DELL_LCD_ASSET_TAG 0x200
|
||||
|
||||
#define IPMI_DELL_LCD_ERROR_DISP_SEL 0x01 /* use platform model name*/
|
||||
#define IPMI_DELL_LCD_ERROR_DISP_VERBOSE 0x02 /* blank*/
|
||||
|
||||
#define IPMI_DELL_IDRAC_VALIDATOR 0xDD
|
||||
#define IPMI_DELL_POWER_CAP_STATUS 0xBA
|
||||
#define IPMI_DELL_AVG_POWER_CONSMP_HST 0xEB
|
||||
#define IPMI_DELL_PEAK_POWER_CONSMP_HST 0xEC
|
||||
#define SYSTEM_BOARD_SYSTEM_LEVEL_SENSOR_NUM 0x98
|
||||
|
||||
#define IDRAC_11G 1
|
||||
#define IDRAC_12G 2
|
||||
// Return Error code for license
|
||||
#define LICENSE_NOT_SUPPORTED 0x6F
|
||||
#define VFL_NOT_LICENSED 0x33
|
||||
#define btuphr 0x01
|
||||
#define watt 0x00
|
||||
#define IPMI_DELL_POWER_CAP 0xEA
|
||||
#define percent 0x03
|
||||
|
||||
/* Not on all Dell servers. If there, use it.*/
|
||||
typedef struct _tag_ipmi_dell_lcd_caps
|
||||
{
|
||||
uint8_t parm_rev; /* 0x11 for IPMI 2.0 */
|
||||
uint8_t char_set; /* always 1 for printable ASCII 0x20-0x7E */
|
||||
uint8_t number_lines; /* 0-4, 1 for 9G. 10G tbd */
|
||||
uint8_t max_chars[4]; /* 62 for triathlon, 0 if not present (glacier) */
|
||||
/* [0] is max chars for line 1 */
|
||||
}IPMI_DELL_LCD_CAPS;
|
||||
|
||||
#define IPMI_DELL_LCD_STRING_LENGTH_MAX 62 /* Valid for 9G. Glacier ??. */
|
||||
#define IPMI_DELL_LCD_STRING1_SIZE 14
|
||||
#define IPMI_DELL_LCD_STRINGN_SIZE 16
|
||||
|
||||
/* vFlash subcommands */
|
||||
#define IPMI_GET_EXT_SD_CARD_INFO 0xA4
|
||||
|
||||
|
||||
typedef struct _tag_ipmi_dell_lcd_string
|
||||
{
|
||||
uint8_t parm_rev; /* 0x11 for IPMI 2.0 */
|
||||
uint8_t data_block_selector; /* 16-byte data block number to access, 0 based.*/
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint8_t encoding : 4; /* 0 is printable ASCII 7-bit */
|
||||
uint8_t length; /* 0 to max chars from lcd caps */
|
||||
uint8_t data[IPMI_DELL_LCD_STRING1_SIZE]; /* not zero terminated. */
|
||||
}selector_0_string;
|
||||
uint8_t selector_n_data[IPMI_DELL_LCD_STRINGN_SIZE];
|
||||
}lcd_string;
|
||||
} __attribute__ ((packed)) IPMI_DELL_LCD_STRING;
|
||||
|
||||
/* Only found on servers with more than 1 line. Use if available. */
|
||||
typedef struct _tag_ipmi_dell_lcd_stringex
|
||||
{
|
||||
uint8_t parm_rev; /* 0x11 for IPMI 2.0 */
|
||||
uint8_t line_number; /* LCD line number 1 to 4 */
|
||||
uint8_t data_block_selector; /* 16-byte data block number to access, 0 based.*/
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint8_t encoding : 4; /* 0 is printable ASCII 7-bit */
|
||||
uint8_t length; /* 0 to max chars from lcd caps */
|
||||
uint8_t data[IPMI_DELL_LCD_STRING1_SIZE]; /* not zero terminated. */
|
||||
} selector_0_string;
|
||||
uint8_t selector_n_data[IPMI_DELL_LCD_STRINGN_SIZE];
|
||||
} lcd_string;
|
||||
} __attribute__ ((packed)) IPMI_DELL_LCD_STRINGEX;
|
||||
|
||||
|
||||
typedef struct _lcd_status
|
||||
{
|
||||
char parametersel;
|
||||
char vKVM_status;
|
||||
char lock_status;
|
||||
char Resv1;
|
||||
char Resv;
|
||||
} __attribute__ ((packed)) LCD_STATUS;
|
||||
|
||||
typedef struct _lcd_mode
|
||||
{
|
||||
uint8_t parametersel;
|
||||
uint32_t lcdmode;
|
||||
uint16_t lcdquallifier;
|
||||
uint32_t capabilites;
|
||||
uint8_t error_display;
|
||||
uint8_t Resv;
|
||||
} __attribute__ ((packed)) LCD_MODE;
|
||||
|
||||
#define PARAM_REV_OFFSET (uint8_t)(0x1)
|
||||
#define VIRTUAL_MAC_OFFSET (uint8_t)(0x1)
|
||||
|
||||
#define LOM_MACTYPE_ETHERNET 0
|
||||
#define LOM_MACTYPE_ISCSI 1
|
||||
#define LOM_MACTYPE_RESERVED 3
|
||||
|
||||
#define LOM_ETHERNET_ENABLED 0
|
||||
#define LOM_ETHERNET_DISABLED 1
|
||||
#define LOM_ETHERNET_PLAYINGDEAD 2
|
||||
#define LOM_ETHERNET_RESERVED 3
|
||||
|
||||
#define LOM_ACTIVE 1
|
||||
#define LOM_INACTIVE 0
|
||||
|
||||
#define MACADDRESSLENGH 6
|
||||
#define MAX_LOM 8
|
||||
|
||||
|
||||
#define EMB_NIC_MAC_ADDRESS_11G (uint8_t)(0xDA)
|
||||
#define EMB_NIC_MAC_ADDRESS_9G_10G (uint8_t)(0xCB)
|
||||
|
||||
#define IMC_IDRAC_10G (uint8_t) (0x08)
|
||||
#define IMC_CMC (uint8_t) (0x09)
|
||||
#define IMC_IDRAC_11G_MONOLITHIC (uint8_t) (0x0A)
|
||||
#define IMC_IDRAC_11G_MODULAR (uint8_t) (0x0B)
|
||||
#define IMC_UNUSED (uint8_t) (0x0C)
|
||||
#define IMC_MASER_LITE_BMC (uint8_t) (0x0D)
|
||||
#define IMC_MASER_LITE_NU (uint8_t) (0x0E)
|
||||
#define IMC_IDRAC_12G_MONOLITHIC (uint8_t) (0x10)
|
||||
#define IMC_IDRAC_12G_MODULAR (uint8_t) (0x11)
|
||||
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int BladSlotNumber : 4;
|
||||
unsigned int MacType : 2;
|
||||
unsigned int EthernetStatus : 2;
|
||||
unsigned int NICNumber : 5;
|
||||
unsigned int Reserved : 3;
|
||||
uint8_t MacAddressByte[MACADDRESSLENGH];
|
||||
} LOMMacAddressType;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LOMMacAddressType LOMMacAddress [MAX_LOM];
|
||||
} EmbeddedNICMacAddressType;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t MacAddressByte[MACADDRESSLENGH];
|
||||
} MacAddressType;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
MacAddressType MacAddress [MAX_LOM];
|
||||
} EmbeddedNICMacAddressType_10G;
|
||||
|
||||
|
||||
|
||||
#define TRANSPORT_NETFN (uint8_t)(0xc)
|
||||
#define GET_LAN_PARAM_CMD (uint8_t)(0x02)
|
||||
#define MAC_ADDR_PARAM (uint8_t)(0x05)
|
||||
#define LAN_CHANNEL_NUMBER (uint8_t)(0x01)
|
||||
|
||||
#define IDRAC_NIC_NUMBER (uint8_t)(0x8)
|
||||
|
||||
#define TOTAL_N0_NICS_INDEX (uint8_t)(0x1)
|
||||
|
||||
|
||||
// 12g supported
|
||||
#define SET_NIC_SELECTION_12G_CMD (uint8_t)(0x28)
|
||||
#define GET_NIC_SELECTION_12G_CMD (uint8_t)(0x29)
|
||||
|
||||
// 11g supported
|
||||
#define SET_NIC_SELECTION_CMD (uint8_t)(0x24)
|
||||
#define GET_NIC_SELECTION_CMD (uint8_t)(0x25)
|
||||
#define GET_ACTIVE_NIC_CMD (uint8_t)(0xc1)
|
||||
#define POWER_EFFICENCY_CMD (uint8_t)(0xc0)
|
||||
#define SERVER_POWER_CONSUMPTION_CMD (uint8_t)(0x8F)
|
||||
|
||||
#define POWER_SUPPLY_INFO (uint8_t)(0xb0)
|
||||
#define IPMI_ENTITY_ID_POWER_SUPPLY (uint8_t)(0x0a)
|
||||
#define SENSOR_STATE_STR_SIZE (uint8_t)(64)
|
||||
#define SENSOR_NAME_STR_SIZE (uint8_t)(64)
|
||||
|
||||
#define GET_PWRMGMT_INFO_CMD (uint8_t)(0x9C)
|
||||
#define CLEAR_PWRMGMT_INFO_CMD (uint8_t)(0x9D)
|
||||
#define GET_PWR_HEADROOM_CMD (uint8_t)(0xBB)
|
||||
#define GET_PWR_CONSUMPTION_CMD (uint8_t)(0xB3)
|
||||
#define GET_FRONT_PANEL_INFO_CMD (uint8_t)0xb5
|
||||
|
||||
|
||||
typedef struct _ipmi_power_monitor
|
||||
{
|
||||
uint32_t cumStartTime;
|
||||
uint32_t cumReading;
|
||||
uint32_t maxPeakStartTime;
|
||||
uint32_t ampPeakTime;
|
||||
uint16_t ampReading;
|
||||
uint32_t wattPeakTime;
|
||||
uint16_t wattReading;
|
||||
} __attribute__ ((packed)) IPMI_POWER_MONITOR;
|
||||
|
||||
|
||||
#define MAX_POWER_FW_VERSION 8
|
||||
|
||||
typedef struct _ipmi_power_supply_infoo
|
||||
{
|
||||
/*No param_rev it is not a System Information Command */
|
||||
uint16_t ratedWatts;
|
||||
uint16_t ratedAmps;
|
||||
uint16_t ratedVolts;
|
||||
uint32_t vendorid;
|
||||
uint8_t FrimwareVersion[MAX_POWER_FW_VERSION];
|
||||
uint8_t Powersupplytype;
|
||||
uint16_t ratedDCWatts;
|
||||
uint16_t Resv;
|
||||
|
||||
} __attribute__ ((packed)) IPMI_POWER_SUPPLY_INFO;
|
||||
|
||||
|
||||
typedef struct ipmi_power_consumption_data
|
||||
{
|
||||
uint16_t actualpowerconsumption;
|
||||
uint16_t powerthreshold;
|
||||
uint16_t warningthreshold;
|
||||
uint8_t throttlestate;
|
||||
uint16_t maxpowerconsumption;
|
||||
uint16_t throttlepowerconsumption;
|
||||
uint16_t Resv;
|
||||
} __attribute__ ((packed)) IPMI_POWER_CONSUMPTION_DATA;
|
||||
|
||||
|
||||
typedef struct ipmi_inst_power_consumption_data
|
||||
{
|
||||
uint16_t instanpowerconsumption;
|
||||
uint16_t instanApms;
|
||||
uint16_t resv1;
|
||||
uint8_t resv;
|
||||
} __attribute__ ((packed)) IPMI_INST_POWER_CONSUMPTION_DATA;
|
||||
|
||||
typedef struct _ipmi_avgpower_consump_histroy
|
||||
{
|
||||
uint8_t parameterselector;
|
||||
uint16_t lastminutepower;
|
||||
uint16_t lasthourpower;
|
||||
uint16_t lastdaypower;
|
||||
uint16_t lastweakpower;
|
||||
|
||||
} __attribute__ ((packed)) IPMI_AVGPOWER_CONSUMP_HISTORY;
|
||||
|
||||
typedef struct _ipmi_power_consump_histroy
|
||||
{
|
||||
uint8_t parameterselector;
|
||||
uint16_t lastminutepower;
|
||||
uint16_t lasthourpower;
|
||||
uint16_t lastdaypower;
|
||||
uint16_t lastweakpower;
|
||||
uint32_t lastminutepowertime;
|
||||
uint32_t lasthourpowertime;
|
||||
uint32_t lastdaypowertime;
|
||||
uint32_t lastweekpowertime;
|
||||
} __attribute__ ((packed)) IPMI_POWER_CONSUMP_HISTORY;
|
||||
|
||||
|
||||
typedef struct _ipmi_delloem_power_cap
|
||||
{
|
||||
uint8_t parameterselector;
|
||||
uint16_t PowerCap;
|
||||
uint8_t unit;
|
||||
uint16_t MaximumPowerConsmp;
|
||||
uint16_t MinimumPowerConsmp;
|
||||
uint16_t totalnumpowersupp;
|
||||
uint16_t AvailablePower ;
|
||||
uint16_t SystemThrottling;
|
||||
uint16_t Resv;
|
||||
} __attribute__ ((packed)) IPMI_POWER_CAP;
|
||||
|
||||
typedef struct _power_headroom
|
||||
{
|
||||
uint16_t instheadroom;
|
||||
uint16_t peakheadroom;
|
||||
} __attribute__ ((packed)) POWER_HEADROOM;
|
||||
|
||||
struct vFlashstr {
|
||||
uint8_t val;
|
||||
const char * str;
|
||||
};
|
||||
typedef struct ipmi_vFlash_extended_info
|
||||
{
|
||||
uint8_t vflashcompcode;
|
||||
uint8_t sdcardstatus;
|
||||
uint32_t sdcardsize;
|
||||
uint32_t sdcardavailsize;
|
||||
uint8_t bootpartion;
|
||||
uint8_t Resv;
|
||||
} __attribute__ ((packed)) IPMI_DELL_SDCARD_INFO;
|
||||
|
||||
|
||||
typedef struct _SensorReadingType
|
||||
{
|
||||
uint8_t sensorReading;
|
||||
uint8_t sensorFlags;
|
||||
uint16_t sensorState;
|
||||
}SensorReadingType;
|
||||
uint16_t compareinputwattage(IPMI_POWER_SUPPLY_INFO* powersupplyinfo, uint16_t inputwattage);
|
||||
int ipmi_delloem_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||
|
||||
#endif /*IPMI_DELLOEM_H*/
|
@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Kontron Canada, Inc. All Rights Reserved.
|
||||
*
|
||||
* Base on code from
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_EKANALYZER_H
|
||||
#define IPMI_EKANALYZER_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_fru.h>
|
||||
|
||||
#define RTM_FRU_FILE 0x00
|
||||
#define A1_AMC_FRU_FILE 0x01
|
||||
#define A2_AMC_FRU_FILE 0x02
|
||||
#define A3_AMC_FRU_FILE 0x03
|
||||
#define A4_AMC_FRU_FILE 0x04
|
||||
#define B1_AMC_FRU_FILE 0x05
|
||||
#define B2_AMC_FRU_FILE 0x06
|
||||
#define B3_AMC_FRU_FILE 0x07
|
||||
#define B4_AMC_FRU_FILE 0x08
|
||||
#define ON_CARRIER_FRU_FILE 0x09
|
||||
#define CONFIG_FILE 0x0A
|
||||
#define SHELF_MANAGER_FRU_FILE 0x0B
|
||||
|
||||
#define MIN_ARGUMENT 0x02
|
||||
#define RTM_IPMB_L 0x90
|
||||
|
||||
#define MAX_FILE_NUMBER 8
|
||||
/* this voltag is specified in AMC.0 specification Table 3-10 */
|
||||
#define AMC_VOLTAGE 12 /*volts*/
|
||||
|
||||
#define SIZE_OF_GUID 16
|
||||
#define FRU_RADIAL_IPMB0_LINK_MAPPING 0x15
|
||||
|
||||
int ipmi_ekanalyzer_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_EKANALYZER_H */
|
@ -28,26 +28,61 @@
|
||||
* 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
|
||||
#define IPMI_ENTITY_H
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct entity_id {
|
||||
uint8_t id; /* physical entity id */
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t logical : 1; /* physical/logical */
|
||||
uint8_t instance : 7; /* instance number */
|
||||
#else
|
||||
uint8_t instance : 7; /* instance number */
|
||||
uint8_t logical : 1; /* physical/logical */
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
#include <ipmitool/helper.h>
|
||||
|
||||
const struct valstr entity_id_vals[] __attribute__((unused)) = {
|
||||
{ 0x00, "Unspecified" },
|
||||
{ 0x01, "Other" },
|
||||
{ 0x02, "Unknown" },
|
||||
{ 0x03, "Processor" },
|
||||
{ 0x04, "Disk or Disk Bay" },
|
||||
{ 0x05, "Peripheral Bay" },
|
||||
{ 0x06, "System Management Module" },
|
||||
{ 0x07, "System Board" },
|
||||
{ 0x08, "Memory Module" },
|
||||
{ 0x09, "Processor Module" },
|
||||
{ 0x0a, "Power Supply" },
|
||||
{ 0x0b, "Add-in Card" },
|
||||
{ 0x0c, "Front Panel Board" },
|
||||
{ 0x0d, "Back Panel Board" },
|
||||
{ 0x0e, "Power System Board" },
|
||||
{ 0x0f, "Drive Backplane" },
|
||||
{ 0x10, "System Internal Expansion Board" },
|
||||
{ 0x11, "Other System Board" },
|
||||
{ 0x12, "Processor Board" },
|
||||
{ 0x13, "Power Unit" },
|
||||
{ 0x14, "Power Module" },
|
||||
{ 0x15, "Power Management" },
|
||||
{ 0x16, "Chassis Back Panel Board" },
|
||||
{ 0x17, "System Chassis" },
|
||||
{ 0x18, "Sub-Chassis" },
|
||||
{ 0x19, "Other Chassis Board" },
|
||||
{ 0x1a, "Disk Drive Bay" },
|
||||
{ 0x1b, "Peripheral Bay" },
|
||||
{ 0x1c, "Device Bay" },
|
||||
{ 0x1d, "Fan Device" },
|
||||
{ 0x1e, "Cooling Unit" },
|
||||
{ 0x1f, "Cable/Interconnect" },
|
||||
{ 0x20, "Memory Device" },
|
||||
{ 0x21, "System Management Software" },
|
||||
{ 0x22, "BIOS" },
|
||||
{ 0x23, "Operating System" },
|
||||
{ 0x24, "System Bus" },
|
||||
{ 0x25, "Group" },
|
||||
{ 0x26, "Remote Management Device" },
|
||||
{ 0x27, "External Environment" },
|
||||
{ 0x28, "Battery" },
|
||||
{ 0x00, NULL },
|
||||
};
|
||||
|
||||
#endif /* IPMI_ENTITY_H */
|
||||
|
||||
|
@ -1,66 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_EVENT_H
|
||||
#define IPMI_EVENT_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
#define EVENT_DIR_ASSERT 0
|
||||
#define EVENT_DIR_DEASSERT 1
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct platform_event_msg {
|
||||
uint8_t evm_rev;
|
||||
uint8_t sensor_type;
|
||||
uint8_t sensor_num;
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t event_dir : 1;
|
||||
uint8_t event_type : 7;
|
||||
#else
|
||||
uint8_t event_type : 7;
|
||||
uint8_t event_dir : 1;
|
||||
#endif
|
||||
uint8_t event_data[3];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
int ipmi_event_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /*IPMI_EVENT_H*/
|
@ -1,106 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_FIREWALL_H
|
||||
#define IPMI_FIREWALL_H
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
int ipmi_firewall_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#define BMC_GET_NETFN_SUPPORT 0x09
|
||||
#define BMC_GET_COMMAND_SUPPORT 0x0A
|
||||
#define BMC_GET_COMMAND_SUBFUNCTION_SUPPORT 0x0B
|
||||
#define BMC_GET_CONFIGURABLE_COMMANDS 0x0C
|
||||
#define BMC_GET_CONFIGURABLE_COMMAND_SUBFUNCTIONS 0x0D
|
||||
#define BMC_SET_COMMAND_ENABLES 0x60
|
||||
#define BMC_GET_COMMAND_ENABLES 0x61
|
||||
#define BMC_SET_COMMAND_SUBFUNCTION_ENABLES 0x62
|
||||
#define BMC_GET_COMMAND_SUBFUNCTION_ENABLES 0x63
|
||||
#define BMC_OEM_NETFN_IANA_SUPPORT 0x64
|
||||
|
||||
#define SET_COMMAND_ENABLE_BYTE (BMC_SET_COMMAND_ENABLES / 8)
|
||||
#define SET_COMMAND_ENABLE_BIT (BMC_SET_COMMAND_ENABLES % 8)
|
||||
|
||||
#define MAX_LUN 4
|
||||
#define MAX_NETFN 64
|
||||
#define MAX_NETFN_PAIR (MAX_NETFN/2)
|
||||
#define MAX_COMMAND 256
|
||||
#define MAX_SUBFN 32
|
||||
#define MAX_COMMAND_BYTES (MAX_COMMAND>>3)
|
||||
#define MAX_SUBFN_BYTES (MAX_SUBFN>>3)
|
||||
|
||||
// support is a bitfield with the following bits set...
|
||||
#define BIT_AVAILABLE 0x01
|
||||
#define BIT_CONFIGURABLE 0x02
|
||||
#define BIT_ENABLED 0x04
|
||||
|
||||
extern int verbose;
|
||||
|
||||
struct command_support {
|
||||
unsigned char support;
|
||||
unsigned char version[3];
|
||||
unsigned char subfn_support[MAX_SUBFN_BYTES];
|
||||
unsigned char subfn_config[MAX_SUBFN_BYTES];
|
||||
unsigned char subfn_enable[MAX_SUBFN_BYTES];
|
||||
};
|
||||
struct lun_netfn_support {
|
||||
unsigned char support;
|
||||
struct command_support command[MAX_COMMAND];
|
||||
unsigned char command_mask[MAX_COMMAND_BYTES];
|
||||
unsigned char config_mask[MAX_COMMAND_BYTES];
|
||||
unsigned char enable_mask[MAX_COMMAND_BYTES];
|
||||
};
|
||||
struct lun_support {
|
||||
unsigned char support;
|
||||
struct lun_netfn_support netfn[MAX_NETFN_PAIR];
|
||||
};
|
||||
struct bmc_fn_support {
|
||||
struct lun_support lun[MAX_LUN];
|
||||
};
|
||||
struct ipmi_function_params {
|
||||
int channel;
|
||||
int lun;
|
||||
int netfn;
|
||||
int command;
|
||||
int subfn;
|
||||
unsigned char force;
|
||||
};
|
||||
|
||||
static inline int bit_test(const unsigned char * bf, int n) {
|
||||
return !!(bf[n>>3]&(1<<(n%8)));
|
||||
}
|
||||
static inline void bit_set(unsigned char * bf, int n, int v) {
|
||||
bf[n>>3] = (bf[n>>3] & ~(1<<(n%8))) | ((v?1:0)<<(n%8));
|
||||
}
|
||||
|
||||
#endif /*IPMI_FIREWALL_H */
|
@ -28,18 +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.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_FRU_H
|
||||
#define IPMI_FRU_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_sdr.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#define GET_FRU_INFO 0x10
|
||||
#define GET_FRU_DATA 0x11
|
||||
@ -61,42 +59,36 @@ enum {
|
||||
};
|
||||
|
||||
struct fru_info {
|
||||
uint16_t size;
|
||||
uint8_t access:1;
|
||||
};
|
||||
unsigned short size;
|
||||
unsigned char access : 1;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_header {
|
||||
uint8_t version;
|
||||
unsigned char version;
|
||||
struct {
|
||||
uint8_t internal;
|
||||
uint8_t chassis;
|
||||
uint8_t board;
|
||||
uint8_t product;
|
||||
uint8_t multi;
|
||||
unsigned char internal;
|
||||
unsigned char chassis;
|
||||
unsigned char board;
|
||||
unsigned char product;
|
||||
unsigned char multi;
|
||||
} offset;
|
||||
uint8_t pad;
|
||||
uint8_t checksum;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
unsigned char pad;
|
||||
unsigned char checksum;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct fru_area_chassis {
|
||||
uint8_t area_ver;
|
||||
uint8_t type;
|
||||
uint16_t area_len;
|
||||
unsigned char area_ver;
|
||||
unsigned char area_len;
|
||||
unsigned char type;
|
||||
char * part;
|
||||
char * serial;
|
||||
};
|
||||
|
||||
struct fru_area_board {
|
||||
uint8_t area_ver;
|
||||
uint8_t lang;
|
||||
uint16_t area_len;
|
||||
uint32_t mfg_date_time;
|
||||
unsigned char area_ver;
|
||||
unsigned char area_len;
|
||||
unsigned char lang;
|
||||
unsigned long mfg_date_time;
|
||||
char * mfg;
|
||||
char * prod;
|
||||
char * serial;
|
||||
@ -105,9 +97,9 @@ struct fru_area_board {
|
||||
};
|
||||
|
||||
struct fru_area_product {
|
||||
uint8_t area_ver;
|
||||
uint8_t lang;
|
||||
uint16_t area_len;
|
||||
unsigned char area_ver;
|
||||
unsigned char area_len;
|
||||
unsigned char lang;
|
||||
char * mfg;
|
||||
char * name;
|
||||
char * part;
|
||||
@ -117,9 +109,6 @@ struct fru_area_product {
|
||||
char * fru;
|
||||
};
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_multirec_header {
|
||||
#define FRU_RECORD_TYPE_POWER_SUPPLY_INFORMATION 0x00
|
||||
#define FRU_RECORD_TYPE_DC_OUTPUT 0x01
|
||||
@ -127,478 +116,68 @@ struct fru_multirec_header {
|
||||
#define FRU_RECORD_TYPE_MANAGEMENT_ACCESS 0x03
|
||||
#define FRU_RECORD_TYPE_BASE_COMPATIBILITY 0x04
|
||||
#define FRU_RECORD_TYPE_EXTENDED_COMPATIBILITY 0x05
|
||||
#define FRU_RECORD_TYPE_OEM_EXTENSION 0xc0
|
||||
uint8_t type;
|
||||
uint8_t format;
|
||||
uint8_t len;
|
||||
uint8_t record_checksum;
|
||||
uint8_t header_checksum;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
unsigned char type;
|
||||
unsigned char format;
|
||||
unsigned char len;
|
||||
unsigned char record_checksum;
|
||||
unsigned char header_checksum;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_multirec_powersupply {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint16_t capacity;
|
||||
#else
|
||||
uint16_t capacity:12;
|
||||
uint16_t __reserved1:4;
|
||||
#endif
|
||||
uint16_t peak_va;
|
||||
uint8_t inrush_current;
|
||||
uint8_t inrush_interval;
|
||||
uint16_t lowend_input1;
|
||||
uint16_t highend_input1;
|
||||
uint16_t lowend_input2;
|
||||
uint16_t highend_input2;
|
||||
uint8_t lowend_freq;
|
||||
uint8_t highend_freq;
|
||||
uint8_t dropout_tolerance;
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved2:3;
|
||||
uint8_t tach:1;
|
||||
uint8_t hotswap:1;
|
||||
uint8_t autoswitch:1;
|
||||
uint8_t pfc:1;
|
||||
uint8_t predictive_fail:1;
|
||||
#else
|
||||
uint8_t predictive_fail:1;
|
||||
uint8_t pfc:1;
|
||||
uint8_t autoswitch:1;
|
||||
uint8_t hotswap:1;
|
||||
uint8_t tach:1;
|
||||
uint8_t __reserved2:3;
|
||||
#endif
|
||||
uint16_t peak_cap_ht;
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t combined_voltage1:4;
|
||||
uint8_t combined_voltage2:4;
|
||||
#else
|
||||
uint8_t combined_voltage2:4;
|
||||
uint8_t combined_voltage1:4;
|
||||
#endif
|
||||
uint16_t combined_capacity;
|
||||
uint8_t rps_threshold;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
unsigned short capacity : 12, __reserved1 : 4;
|
||||
unsigned short peak_va;
|
||||
unsigned char inrush_current;
|
||||
unsigned char inrush_interval;
|
||||
unsigned short lowend_input1;
|
||||
unsigned short highend_input1;
|
||||
unsigned short lowend_input2;
|
||||
unsigned short highend_input2;
|
||||
unsigned char lowend_freq;
|
||||
unsigned char highend_freq;
|
||||
unsigned char dropout_tolerance;
|
||||
unsigned char predictive_fail : 1, pfc : 1, autoswitch : 1, hotswap : 1, tach : 1, __reserved2 : 3;
|
||||
unsigned short peak_capacity : 12, peak_hold_up_time : 4;
|
||||
unsigned char combined_voltage2 : 4, combined_voltage1 : 4;
|
||||
unsigned short combined_capacity;
|
||||
unsigned char rps_threshold;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
static const char * combined_voltage_desc[] __attribute__((unused)) = {
|
||||
"12 V", "-12 V", "5 V", "3.3 V"};
|
||||
"12 V", "-12 V", "5 V", "3.3 V"
|
||||
};
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_multirec_dcoutput {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t standby:1;
|
||||
uint8_t __reserved:3;
|
||||
uint8_t output_number:4;
|
||||
#else
|
||||
uint8_t output_number:4;
|
||||
uint8_t __reserved:3;
|
||||
uint8_t standby:1;
|
||||
#endif
|
||||
unsigned char output_number : 4, __reserved : 3, standby : 1;
|
||||
short nominal_voltage;
|
||||
short max_neg_dev;
|
||||
short max_pos_dev;
|
||||
uint16_t ripple_and_noise;
|
||||
uint16_t min_current;
|
||||
uint16_t max_current;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
unsigned short ripple_and_noise;
|
||||
unsigned short min_current;
|
||||
unsigned short max_current;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_multirec_dcload {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved:4;
|
||||
uint8_t output_number:4;
|
||||
#else
|
||||
uint8_t output_number:4;
|
||||
uint8_t __reserved:4;
|
||||
#endif
|
||||
unsigned char output_number : 4, __reserved : 4;
|
||||
short nominal_voltage;
|
||||
short min_voltage;
|
||||
short max_voltage;
|
||||
uint16_t ripple_and_noise;
|
||||
uint16_t min_current;
|
||||
uint16_t max_current;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
unsigned short ripple_and_noise;
|
||||
unsigned short min_current;
|
||||
unsigned short max_current;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_multirec_oem_header {
|
||||
unsigned char mfg_id[3];
|
||||
#define FRU_PICMG_BACKPLANE_P2P 0x04
|
||||
#define FRU_PICMG_ADDRESS_TABLE 0x10
|
||||
#define FRU_PICMG_SHELF_POWER_DIST 0x11
|
||||
#define FRU_PICMG_SHELF_ACTIVATION 0x12
|
||||
#define FRU_PICMG_SHMC_IP_CONN 0x13
|
||||
#define FRU_PICMG_BOARD_P2P 0x14
|
||||
#define FRU_AMC_CURRENT 0x16
|
||||
#define FRU_AMC_ACTIVATION 0x17
|
||||
#define FRU_AMC_CARRIER_P2P 0x18
|
||||
#define FRU_AMC_P2P 0x19
|
||||
#define FRU_AMC_CARRIER_INFO 0x1a
|
||||
#define FRU_UTCA_FRU_INFO_TABLE 0x20
|
||||
#define FRU_UTCA_CARRIER_MNG_IP 0x21
|
||||
#define FRU_UTCA_CARRIER_INFO 0x22
|
||||
#define FRU_UTCA_CARRIER_LOCATION 0x23
|
||||
#define FRU_UTCA_SHMC_IP_LINK 0x24
|
||||
#define FRU_UTCA_POWER_POLICY 0x25
|
||||
#define FRU_UTCA_ACTIVATION 0x26
|
||||
#define FRU_UTCA_PM_CAPABILTY 0x27
|
||||
#define FRU_UTCA_FAN_GEOGRAPHY 0x28
|
||||
#define FRU_UTCA_CLOCK_MAPPING 0x29
|
||||
#define FRU_UTCA_MSG_BRIDGE_POLICY 0x2A
|
||||
#define FRU_UTCA_OEM_MODULE_DESC 0x2B
|
||||
#define FRU_PICMG_CLK_CARRIER_P2P 0x2C
|
||||
#define FRU_PICMG_CLK_CONFIG 0x2D
|
||||
unsigned char record_id;
|
||||
unsigned char record_version;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_guid {
|
||||
unsigned char guid[16];
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_link_desc {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned int desig_channel:6;
|
||||
unsigned int desig_if:2;
|
||||
unsigned int desig_port:4;
|
||||
#define FRU_PICMGEXT_LINK_TYPE_BASE 0x01
|
||||
#define FRU_PICMGEXT_LINK_TYPE_FABRIC_ETHERNET 0x02
|
||||
#define FRU_PICMGEXT_LINK_TYPE_FABRIC_INFINIBAND 0x03
|
||||
#define FRU_PICMGEXT_LINK_TYPE_FABRIC_STAR 0x04
|
||||
#define FRU_PICMGEXT_LINK_TYPE_PCIE 0x05
|
||||
unsigned int type:8;
|
||||
unsigned int ext:4;
|
||||
unsigned int grouping:8;
|
||||
#else
|
||||
unsigned int grouping:8;
|
||||
unsigned int ext:4;
|
||||
#define FRU_PICMGEXT_LINK_TYPE_BASE 0x01
|
||||
#define FRU_PICMGEXT_LINK_TYPE_FABRIC_ETHERNET 0x02
|
||||
#define FRU_PICMGEXT_LINK_TYPE_FABRIC_INFINIBAND 0x03
|
||||
#define FRU_PICMGEXT_LINK_TYPE_FABRIC_STAR 0x04
|
||||
#define FRU_PICMGEXT_LINK_TYPE_PCIE 0x05
|
||||
unsigned int type:8;
|
||||
unsigned int desig_port:4;
|
||||
unsigned int desig_if:2;
|
||||
unsigned int desig_channel:6;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_RESERVED 0x00
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_RESERVED1 0x01
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_PCI_EXPRESS 0x02
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_ADVANCED_SWITCHING1 0x03
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_ADVANCED_SWITCHING2 0x04
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_ETHERNET 0x05
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_RAPIDIO 0x06
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_STORAGE 0x07
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
/* This is used in command, not in FRU */
|
||||
struct fru_picmgext_amc_link_info {
|
||||
unsigned char linkInfo[3];
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_amc_link_desc_core {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned int designator:12;
|
||||
unsigned int type:8;
|
||||
unsigned int ext:4;
|
||||
unsigned int grouping:8;
|
||||
#else
|
||||
unsigned int grouping:8;
|
||||
unsigned int ext:4;
|
||||
unsigned int type:8;
|
||||
unsigned int designator:12;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_amc_link_desc_extra {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned char asymetricMatch:2;
|
||||
unsigned char reserved:6;
|
||||
#else
|
||||
unsigned char reserved:6;
|
||||
unsigned char asymetricMatch:2;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_amc_link_desc {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
struct fru_picmgext_amc_link_desc_core core;/* lsb */
|
||||
struct fru_picmgext_amc_link_desc_extra extra;
|
||||
#else
|
||||
struct fru_picmgext_amc_link_desc_extra extra;
|
||||
struct fru_picmgext_amc_link_desc_core core;/* lsb */
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
|
||||
#define FRU_PICMGEXT_OEM_SWFW 0x03
|
||||
#define OEM_SWFW_NBLOCK_OFFSET 0x05
|
||||
#define OEM_SWFW_FIELD_START_OFFSET 0x06
|
||||
|
||||
#define FRU_PICMGEXT_CHN_DESC_RECORD_SIZE 3
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_chn_desc {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned int remote_slot:8;
|
||||
unsigned int remote_chn:5;
|
||||
unsigned int local_chn:5;
|
||||
unsigned int res:14;
|
||||
#else
|
||||
unsigned int res:14;
|
||||
unsigned int local_chn:5;
|
||||
unsigned int remote_chn:5;
|
||||
unsigned int remote_slot:8;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_slot_desc {
|
||||
unsigned char chan_type;
|
||||
unsigned char slot_addr;
|
||||
unsigned char chn_count;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#define FRU_PICMGEXT_DESIGN_IF_BASE 0x00
|
||||
#define FRU_PICMGEXT_DESIGN_IF_FABRIC 0x01
|
||||
#define FRU_PICMGEXT_DESIGN_IF_UPDATE_CHANNEL 0x02
|
||||
#define FRU_PICMGEXT_DESIGN_IF_RESERVED 0x03
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_carrier_activation_record {
|
||||
unsigned short max_internal_curr;
|
||||
unsigned char allowance_for_readiness;
|
||||
unsigned char module_activation_record_count;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_activation_record {
|
||||
unsigned char ibmb_addr;
|
||||
unsigned char max_module_curr;
|
||||
unsigned char reserved;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_carrier_p2p_record {
|
||||
unsigned char resource_id;
|
||||
unsigned char p2p_count;
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_carrier_p2p_descriptor {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned char remote_resource_id;
|
||||
unsigned short remote_port:5;
|
||||
unsigned short local_port:5;
|
||||
unsigned short reserved:6;
|
||||
#else
|
||||
unsigned short reserved:6;
|
||||
unsigned short local_port:5;
|
||||
unsigned short remote_port:5;
|
||||
unsigned char remote_resource_id;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_amc_p2p_record {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned char resource_id :4;
|
||||
unsigned char /* reserved */ :3;
|
||||
unsigned char record_type :1;
|
||||
#else
|
||||
unsigned char record_type :1;
|
||||
unsigned char /* reserved */ :3;
|
||||
unsigned char resource_id :4;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#define FRU_PICMGEXT_AMC_CHANNEL_DESC_RECORD_SIZE 3
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_amc_channel_desc_record {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned int lane0port :5;
|
||||
unsigned int lane1port :5;
|
||||
unsigned int lane2port :5;
|
||||
unsigned int lane3port :5;
|
||||
unsigned int /* reserved */ :12;
|
||||
#else
|
||||
unsigned int /* reserved */ :12;
|
||||
unsigned int lane3port :5;
|
||||
unsigned int lane2port :5;
|
||||
unsigned int lane1port :5;
|
||||
unsigned int lane0port :5;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#define FRU_PICMGEXT_AMC_LINK_DESC_RECORD_SIZE 5
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct fru_picmgext_amc_link_desc_record {
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_PCIE 0x02
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_PCIE_AS1 0x03
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_PCIE_AS2 0x04
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_ETHERNET 0x05
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_RAPIDIO 0x06
|
||||
#define FRU_PICMGEXT_AMC_LINK_TYPE_STORAGE 0x07
|
||||
|
||||
#define AMC_LINK_TYPE_EXT_PCIE_G1_NSSC 0x00
|
||||
#define AMC_LINK_TYPE_EXT_PCIE_G1_SSC 0x01
|
||||
#define AMC_LINK_TYPE_EXT_PCIE_G2_NSSC 0x02
|
||||
#define AMC_LINK_TYPE_EXT_PCIE_G2_SSC 0x03
|
||||
|
||||
#define AMC_LINK_TYPE_EXT_ETH_1000_BX 0x00
|
||||
#define AMC_LINK_TYPE_EXT_ETH_10G_XAUI 0x01
|
||||
|
||||
#define AMC_LINK_TYPE_EXT_STORAGE_FC 0x00
|
||||
#define AMC_LINK_TYPE_EXT_STORAGE_SATA 0x01
|
||||
#define AMC_LINK_TYPE_EXT_STORAGE_SAS 0x02
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned int channel_id :8;
|
||||
unsigned int port_flag_0 :1;
|
||||
unsigned int port_flag_1 :1;
|
||||
unsigned int port_flag_2 :1;
|
||||
unsigned int port_flag_3 :1;
|
||||
unsigned int type :8;
|
||||
unsigned int type_ext :4;
|
||||
unsigned int group_id :8;
|
||||
unsigned int asym_match :2;
|
||||
unsigned int /* reserved */ :30;
|
||||
#else
|
||||
unsigned int group_id :8;
|
||||
unsigned int type_ext :4;
|
||||
unsigned int type :8;
|
||||
unsigned int port_flag_3 :1;
|
||||
unsigned int port_flag_2 :1;
|
||||
unsigned int port_flag_1 :1;
|
||||
unsigned int port_flag_0 :1;
|
||||
unsigned int channel_id :8;
|
||||
|
||||
unsigned int /* reserved */ :30;
|
||||
unsigned int asym_match :2;
|
||||
#endif
|
||||
}ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
/* FRU Board manufacturing date */
|
||||
static const uint64_t secs_from_1970_1996 = 820454400;
|
||||
static const char * chassis_type_desc[] __attribute__((unused)) = {
|
||||
"Unspecified", "Other", "Unknown",
|
||||
"Desktop", "Low Profile Desktop", "Pizza Box",
|
||||
"Mini Tower", "Tower",
|
||||
"Portable", "LapTop", "Notebook", "Hand Held",
|
||||
"Docking Station", "All in One", "Sub Notebook",
|
||||
"Space-saving", "Lunch Box", "Main Server Chassis",
|
||||
"Expansion Chassis", "SubChassis", "Bus Expansion Chassis",
|
||||
"Peripheral Chassis", "RAID Chassis", "Rack Mount Chassis",
|
||||
"Sealed-case PC", "Multi-system Chassis", "CompactPCI",
|
||||
"AdvancedTCA", "Blade", "Blade Enclosure"
|
||||
"Portable", "LapTop", "Notebook", "Hand Held", "Docking Station",
|
||||
"All in One", "Sub Notebook", "Space-saving", "Lunch Box",
|
||||
"Main Server Chassis", "Expansion Chassis", "SubChassis",
|
||||
"Bus Expansion Chassis", "Peripheral Chassis", "RAID Chassis",
|
||||
"Rack Mount Chassis"
|
||||
};
|
||||
|
||||
int ipmi_fru_main(struct ipmi_intf *intf, int argc, char **argv);
|
||||
int ipmi_fru_print(struct ipmi_intf *intf, struct sdr_record_fru_locator *fru);
|
||||
void ipmi_print_fru(struct ipmi_intf *, unsigned char);
|
||||
int ipmi_fru_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_FRU_H */
|
||||
|
@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Kontron Canada, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_GENDEV_H
|
||||
#define IPMI_GENDEV_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
#include <ipmitool/bswap.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_entity.h>
|
||||
|
||||
int ipmi_gendev_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_GENDEV_H */
|
@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_HPMFWUPG_H
|
||||
#define IPMI_HPMFWUPG_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
int ipmi_hpmfwupg_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_KFWUM_H */
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Kontron Canada, Inc. All Rights Reserved.
|
||||
*
|
||||
* Base on code from
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_IME_H
|
||||
#define IPMI_IME_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
|
||||
int ipmi_ime_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_IME_H */
|
@ -28,187 +28,19 @@
|
||||
* 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
|
||||
#define IPMI_INTF_H
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_oem.h>
|
||||
#include <ipmitool/ipmi_constants.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
/*
|
||||
* An enumeration that describes every possible session state for
|
||||
* an IPMIv2 / RMCP+ session.
|
||||
*/
|
||||
enum LANPLUS_SESSION_STATE {
|
||||
LANPLUS_STATE_PRESESSION = 0,
|
||||
LANPLUS_STATE_OPEN_SESSION_SENT,
|
||||
LANPLUS_STATE_OPEN_SESSION_RECEIEVED,
|
||||
LANPLUS_STATE_RAKP_1_SENT,
|
||||
LANPLUS_STATE_RAKP_2_RECEIVED,
|
||||
LANPLUS_STATE_RAKP_3_SENT,
|
||||
LANPLUS_STATE_ACTIVE,
|
||||
LANPLUS_STATE_CLOSE_SENT,
|
||||
};
|
||||
|
||||
|
||||
#define IPMI_AUTHCODE_BUFFER_SIZE 20
|
||||
#define IPMI_SIK_BUFFER_SIZE 20
|
||||
#define IPMI_KG_BUFFER_SIZE 21 /* key plus null byte */
|
||||
|
||||
struct ipmi_session {
|
||||
uint8_t hostname[64];
|
||||
uint8_t username[17];
|
||||
uint8_t authcode[IPMI_AUTHCODE_BUFFER_SIZE + 1];
|
||||
uint8_t challenge[16];
|
||||
uint8_t authtype;
|
||||
uint8_t authtype_set;
|
||||
#define IPMI_AUTHSTATUS_PER_MSG_DISABLED 0x10
|
||||
#define IPMI_AUTHSTATUS_PER_USER_DISABLED 0x08
|
||||
#define IPMI_AUTHSTATUS_NONNULL_USERS_ENABLED 0x04
|
||||
#define IPMI_AUTHSTATUS_NULL_USERS_ENABLED 0x02
|
||||
#define IPMI_AUTHSTATUS_ANONYMOUS_USERS_ENABLED 0x01
|
||||
uint8_t authstatus;
|
||||
uint8_t authextra;
|
||||
uint8_t privlvl;
|
||||
uint8_t cipher_suite_id;
|
||||
char sol_escape_char;
|
||||
int password;
|
||||
int port;
|
||||
int active;
|
||||
int retry;
|
||||
|
||||
uint32_t session_id;
|
||||
uint32_t in_seq;
|
||||
uint32_t out_seq;
|
||||
uint32_t timeout;
|
||||
|
||||
struct sockaddr_in addr;
|
||||
socklen_t addrlen;
|
||||
|
||||
/*
|
||||
* This struct holds state data specific to IPMI v2 / RMCP+ sessions
|
||||
*/
|
||||
struct {
|
||||
enum LANPLUS_SESSION_STATE session_state;
|
||||
|
||||
/* These are the algorithms agreed upon for the session */
|
||||
uint8_t requested_auth_alg;
|
||||
uint8_t requested_integrity_alg;
|
||||
uint8_t requested_crypt_alg;
|
||||
uint8_t auth_alg;
|
||||
uint8_t integrity_alg;
|
||||
uint8_t crypt_alg;
|
||||
uint8_t max_priv_level;
|
||||
uint8_t lookupbit;
|
||||
|
||||
uint32_t console_id;
|
||||
uint32_t bmc_id;
|
||||
|
||||
/*
|
||||
* Values required for RAKP mesages
|
||||
*/
|
||||
|
||||
/* Random number generated byt the console */
|
||||
uint8_t console_rand[16];
|
||||
/* Random number generated by the BMC */
|
||||
uint8_t bmc_rand[16];
|
||||
|
||||
uint8_t bmc_guid[16];
|
||||
uint8_t requested_role; /* As sent in the RAKP 1 message */
|
||||
uint8_t rakp2_return_code;
|
||||
|
||||
uint8_t sik[IPMI_SIK_BUFFER_SIZE]; /* Session integrity key */
|
||||
uint8_t kg[IPMI_KG_BUFFER_SIZE]; /* BMC key */
|
||||
uint8_t k1[20]; /* Used for Integrity checking? */
|
||||
uint8_t k2[20]; /* First 16 bytes used for AES */
|
||||
} v2_data;
|
||||
|
||||
|
||||
/*
|
||||
* This data is specific to the Serial Over Lan session
|
||||
*/
|
||||
struct {
|
||||
uint16_t max_inbound_payload_size;
|
||||
uint16_t max_outbound_payload_size;
|
||||
uint16_t port;
|
||||
uint8_t sequence_number;
|
||||
|
||||
/* This data describes the last SOL packet */
|
||||
uint8_t last_received_sequence_number;
|
||||
uint8_t last_received_byte_count;
|
||||
void (*sol_input_handler)(struct ipmi_rs * rsp);
|
||||
} sol_data;
|
||||
};
|
||||
|
||||
struct ipmi_cmd {
|
||||
int (*func)(struct ipmi_intf * intf, int argc, char ** argv);
|
||||
const char * name;
|
||||
const char * desc;
|
||||
};
|
||||
|
||||
struct ipmi_intf_support {
|
||||
const char * name;
|
||||
int supported;
|
||||
};
|
||||
|
||||
struct ipmi_intf {
|
||||
char name[16];
|
||||
char desc[128];
|
||||
char *devfile;
|
||||
int fd;
|
||||
int opened;
|
||||
int abort;
|
||||
int noanswer;
|
||||
int picmg_avail;
|
||||
IPMI_OEM manufacturer_id;
|
||||
|
||||
struct ipmi_session * session;
|
||||
struct ipmi_oem_handle * oem;
|
||||
struct ipmi_cmd * cmdlist;
|
||||
uint8_t target_ipmb_addr;
|
||||
uint32_t my_addr;
|
||||
uint32_t target_addr;
|
||||
uint8_t target_lun;
|
||||
uint8_t target_channel;
|
||||
uint32_t transit_addr;
|
||||
uint8_t transit_channel;
|
||||
uint8_t channel_buf_size;
|
||||
|
||||
uint8_t devnum;
|
||||
|
||||
int (*setup)(struct ipmi_intf * intf);
|
||||
int (*open)(struct ipmi_intf * intf);
|
||||
void (*close)(struct ipmi_intf * intf);
|
||||
struct ipmi_rs *(*sendrecv)(struct ipmi_intf * intf, struct ipmi_rq * req);
|
||||
int (*sendrsp)(struct ipmi_intf * intf, struct ipmi_rs * rsp);
|
||||
struct ipmi_rs *(*recv_sol)(struct ipmi_intf * intf);
|
||||
struct ipmi_rs *(*send_sol)(struct ipmi_intf * intf, struct ipmi_v2_payload * payload);
|
||||
int (*keepalive)(struct ipmi_intf * intf);
|
||||
int (*set_my_addr)(struct ipmi_intf * intf, uint8_t addr);
|
||||
};
|
||||
|
||||
int ipmi_intf_init(void);
|
||||
void ipmi_intf_exit(void);
|
||||
struct ipmi_intf * ipmi_intf_load(char * name);
|
||||
void ipmi_intf_print(struct ipmi_intf_support * intflist);
|
||||
|
||||
void ipmi_intf_session_set_hostname(struct ipmi_intf * intf, char * hostname);
|
||||
void ipmi_intf_session_set_username(struct ipmi_intf * intf, char * username);
|
||||
void ipmi_intf_session_set_password(struct ipmi_intf * intf, char * password);
|
||||
void ipmi_intf_session_set_privlvl(struct ipmi_intf * intf, uint8_t privlvl);
|
||||
void ipmi_intf_session_set_lookupbit(struct ipmi_intf * intf, uint8_t lookupbit);
|
||||
void ipmi_intf_session_set_cipher_suite_id(struct ipmi_intf * intf, uint8_t cipher_suite_id);
|
||||
void ipmi_intf_session_set_sol_escape_char(struct ipmi_intf * intf, char sol_escape_char);
|
||||
void ipmi_intf_session_set_kgkey(struct ipmi_intf * intf, char * kgkey);
|
||||
void ipmi_intf_session_set_port(struct ipmi_intf * intf, int port);
|
||||
void ipmi_intf_session_set_authtype(struct ipmi_intf * intf, uint8_t authtype);
|
||||
void ipmi_intf_session_set_timeout(struct ipmi_intf * intf, uint32_t timeout);
|
||||
void ipmi_intf_session_set_retry(struct ipmi_intf * intf, int retry);
|
||||
void ipmi_cleanup(struct ipmi_intf * intf);
|
||||
|
||||
#endif /* IPMI_INTF_H */
|
||||
|
@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_ISOL_H
|
||||
#define IPMI_ISOL_H
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
#define ACTIVATE_ISOL 0x01
|
||||
#define SET_ISOL_CONFIG 0x03
|
||||
#define GET_ISOL_CONFIG 0x04
|
||||
|
||||
#define ISOL_ENABLE_PARAM 0x01
|
||||
#define ISOL_AUTHENTICATION_PARAM 0x02
|
||||
|
||||
#define ISOL_BAUD_RATE_PARAM 0x05
|
||||
|
||||
#define ISOL_PREFERRED_BAUD_RATE 0x07
|
||||
|
||||
struct isol_config_parameters {
|
||||
uint8_t enabled;
|
||||
uint8_t privilege_level;
|
||||
uint8_t bit_rate;
|
||||
};
|
||||
|
||||
int ipmi_isol_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_SOL_H */
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Kontron Canada, Inc. All Rights Reserved.
|
||||
*
|
||||
* Base on code from
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_KONTRONOEM_H
|
||||
#define IPMI_KONTRONOEM_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
|
||||
int ipmi_kontronoem_main(struct ipmi_intf *, int, char **);
|
||||
int ipmi_kontronoem_set_large_buffer(struct ipmi_intf *, unsigned char size);
|
||||
|
||||
#endif /* IPMI_KONTRONOEM_H */
|
@ -28,6 +28,10 @@
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*
|
||||
* You acknowledge that this software is not designed or intended for use
|
||||
* in the design, construction, operation or maintenance of any nuclear
|
||||
* facility.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_LANP_H
|
||||
@ -42,13 +46,21 @@
|
||||
# define IPMI_LAN_SUSPEND_ARP_GRAT (1)
|
||||
#define IPMI_LAN_GET_STAT 0x04
|
||||
|
||||
#define IPMI_CHANNEL_NUMBER_MAX 0xe
|
||||
#define IPMI_SESSION_AUTHTYPE_NONE 0x0
|
||||
#define IPMI_SESSION_AUTHTYPE_MD2 0x1
|
||||
#define IPMI_SESSION_AUTHTYPE_MD5 0x2
|
||||
#define IPMI_SESSION_AUTHTYPE_KEY 0x4
|
||||
#define IPMI_SESSION_AUTHTYPE_OEM 0x5
|
||||
|
||||
#define IPMI_LANP_TIMEOUT 3
|
||||
#define IPMI_LANP_RETRIES 10
|
||||
#define IPMI_LANP_WRITE_UNLOCK 0
|
||||
#define IPMI_LANP_WRITE_LOCK 1
|
||||
#define IPMI_LANP_WRITE_COMMIT 2
|
||||
#define IPMI_SESSION_PRIV_CALLBACK 0x1
|
||||
#define IPMI_SESSION_PRIV_USER 0x2
|
||||
#define IPMI_SESSION_PRIV_OPERATOR 0x3
|
||||
#define IPMI_SESSION_PRIV_ADMIN 0x4
|
||||
#define IPMI_SESSION_PRIV_OEM 0x5
|
||||
|
||||
extern const struct valstr ipmi_privlvl_vals[];
|
||||
extern const struct valstr ipmi_authtype_vals[];
|
||||
extern struct ipmi_session lan_session;
|
||||
|
||||
enum {
|
||||
IPMI_LANP_SET_IN_PROGRESS,
|
||||
@ -56,26 +68,21 @@ enum {
|
||||
IPMI_LANP_AUTH_TYPE_ENABLE,
|
||||
IPMI_LANP_IP_ADDR,
|
||||
IPMI_LANP_IP_ADDR_SRC,
|
||||
IPMI_LANP_MAC_ADDR, /* 5 */
|
||||
IPMI_LANP_MAC_ADDR,
|
||||
IPMI_LANP_SUBNET_MASK,
|
||||
IPMI_LANP_IP_HEADER,
|
||||
IPMI_LANP_PRI_RMCP_PORT,
|
||||
IPMI_LANP_SEC_RMCP_PORT,
|
||||
IPMI_LANP_BMC_ARP, /* 10 */
|
||||
IPMI_LANP_BMC_ARP,
|
||||
IPMI_LANP_GRAT_ARP,
|
||||
IPMI_LANP_DEF_GATEWAY_IP,
|
||||
IPMI_LANP_DEF_GATEWAY_MAC,
|
||||
IPMI_LANP_BAK_GATEWAY_IP,
|
||||
IPMI_LANP_BAK_GATEWAY_MAC, /* 15 */
|
||||
IPMI_LANP_BAK_GATEWAY_MAC,
|
||||
IPMI_LANP_SNMP_STRING,
|
||||
IPMI_LANP_NUM_DEST,
|
||||
IPMI_LANP_DEST_TYPE,
|
||||
IPMI_LANP_DEST_ADDR,
|
||||
IPMI_LANP_VLAN_ID, /* 20 */
|
||||
IPMI_LANP_VLAN_PRIORITY,
|
||||
IPMI_LANP_RMCP_CIPHER_SUPPORT,
|
||||
IPMI_LANP_RMCP_CIPHERS,
|
||||
IPMI_LANP_RMCP_PRIV_LEVELS,
|
||||
IPMI_LANP_OEM_ALERT_STRING=96,
|
||||
IPMI_LANP_ALERT_RETRY=97,
|
||||
IPMI_LANP_UTC_OFFSET=98,
|
||||
@ -89,44 +96,39 @@ static struct lan_param {
|
||||
int cmd;
|
||||
int size;
|
||||
char desc[24];
|
||||
uint8_t * data;
|
||||
int data_len;
|
||||
unsigned char * data;
|
||||
} ipmi_lan_params[] __attribute__((unused)) = {
|
||||
{ IPMI_LANP_SET_IN_PROGRESS, 1, "Set in Progress" },
|
||||
{ IPMI_LANP_AUTH_TYPE, 1, "Auth Type Support" },
|
||||
{ IPMI_LANP_AUTH_TYPE, 1, "Auth Type" },
|
||||
{ IPMI_LANP_AUTH_TYPE_ENABLE, 5, "Auth Type Enable" },
|
||||
{ IPMI_LANP_IP_ADDR, 4, "IP Address" },
|
||||
{ IPMI_LANP_IP_ADDR_SRC, 1, "IP Address Source" },
|
||||
{ IPMI_LANP_MAC_ADDR, 6, "MAC Address" }, /* 5 */
|
||||
{ IPMI_LANP_MAC_ADDR, 6, "MAC Address" },
|
||||
{ IPMI_LANP_SUBNET_MASK, 4, "Subnet Mask" },
|
||||
{ IPMI_LANP_IP_HEADER, 3, "IP Header" },
|
||||
{ IPMI_LANP_PRI_RMCP_PORT, 2, "Primary RMCP Port" },
|
||||
{ IPMI_LANP_SEC_RMCP_PORT, 2, "Secondary RMCP Port" },
|
||||
{ IPMI_LANP_BMC_ARP, 1, "BMC ARP Control" }, /* 10 */
|
||||
{ IPMI_LANP_BMC_ARP, 1, "BMC ARP Control" },
|
||||
{ IPMI_LANP_GRAT_ARP, 1, "Gratituous ARP Intrvl" },
|
||||
{ IPMI_LANP_DEF_GATEWAY_IP, 4, "Default Gateway IP" },
|
||||
{ IPMI_LANP_DEF_GATEWAY_MAC, 6, "Default Gateway MAC" },
|
||||
{ IPMI_LANP_BAK_GATEWAY_IP, 4, "Backup Gateway IP" },
|
||||
{ IPMI_LANP_BAK_GATEWAY_MAC, 6, "Backup Gateway MAC" }, /* 15 */
|
||||
{ IPMI_LANP_SNMP_STRING, 18, "SNMP Community String" },
|
||||
{ IPMI_LANP_BAK_GATEWAY_MAC, 6, "Backup Gateway MAC" },
|
||||
{ IPMI_LANP_SNMP_STRING, 18, "Community String" },
|
||||
{ IPMI_LANP_NUM_DEST, 1, "Number of Destinations"},
|
||||
{ IPMI_LANP_DEST_TYPE, 4, "Destination Type" },
|
||||
{ IPMI_LANP_DEST_ADDR, 13, "Destination Addresses" },
|
||||
{ IPMI_LANP_VLAN_ID, 2, "802.1q VLAN ID" }, /* 20 */
|
||||
{ IPMI_LANP_VLAN_PRIORITY, 1, "802.1q VLAN Priority" },
|
||||
{ IPMI_LANP_RMCP_CIPHER_SUPPORT,1, "RMCP+ Cipher Suite Count" },
|
||||
{ IPMI_LANP_RMCP_CIPHERS, 16, "RMCP+ Cipher Suites" },
|
||||
{ IPMI_LANP_RMCP_PRIV_LEVELS, 9, "Cipher Suite Priv Max" },
|
||||
{ IPMI_LANP_OEM_ALERT_STRING, 28, "OEM Alert String" }, /* 25 */
|
||||
{ IPMI_LANP_OEM_ALERT_STRING, 28, "OEM Alert String" },
|
||||
{ IPMI_LANP_ALERT_RETRY, 1, "Alert Retry Algorithm" },
|
||||
{ IPMI_LANP_UTC_OFFSET, 3, "UTC Offset" },
|
||||
{ IPMI_LANP_DHCP_SERVER_IP, 4, "DHCP Server IP" },
|
||||
{ IPMI_LANP_DHCP_SERVER_MAC, 6, "DHDP Server MAC" },
|
||||
{ IPMI_LANP_DHCP_ENABLE, 1, "DHCP Enable" }, /* 30 */
|
||||
{ IPMI_LANP_DHCP_ENABLE, 1, "DHCP Enable" },
|
||||
{ IPMI_LANP_CHAN_ACCESS_MODE, 2, "Channel Access Mode" },
|
||||
{ -1 }
|
||||
};
|
||||
|
||||
void ipmi_get_channel_info(struct ipmi_intf * intf, unsigned char channel);
|
||||
int ipmi_lanp_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /*IPMI_LANP_H*/
|
||||
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_MAIN_H
|
||||
#define IPMI_MAIN_H
|
||||
|
||||
#include <ipmitool/ipmi_intf.h>
|
||||
|
||||
int ipmi_main(int argc, char ** argv, struct ipmi_cmd * cmdlist, struct ipmi_intf_support * intflist);
|
||||
void ipmi_cmd_print(struct ipmi_cmd * cmdlist);
|
||||
int ipmi_cmd_run(struct ipmi_intf * intf, char * name, int argc, char ** argv);
|
||||
|
||||
#endif /* IPMI_MAIN_H */
|
@ -1,170 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_MC_H
|
||||
#define IPMI_MC_H
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
#define BMC_GET_DEVICE_ID 0x01
|
||||
#define BMC_COLD_RESET 0x02
|
||||
#define BMC_WARM_RESET 0x03
|
||||
#define BMC_GET_SELF_TEST 0x04
|
||||
#define BMC_RESET_WATCHDOG_TIMER 0x22
|
||||
#define BMC_SET_WATCHDOG_TIMER 0x24
|
||||
#define BMC_GET_WATCHDOG_TIMER 0x25
|
||||
#define BMC_SET_GLOBAL_ENABLES 0x2e
|
||||
#define BMC_GET_GLOBAL_ENABLES 0x2f
|
||||
#define BMC_GET_GUID 0x37
|
||||
|
||||
int ipmi_mc_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
/*
|
||||
* Response data from IPM Get Device ID Command (IPMI rev 1.5, section 17.1)
|
||||
* The following really apply to any IPM device, not just BMCs...
|
||||
*/
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct ipm_devid_rsp {
|
||||
uint8_t device_id;
|
||||
uint8_t device_revision;
|
||||
uint8_t fw_rev1;
|
||||
uint8_t fw_rev2;
|
||||
uint8_t ipmi_version;
|
||||
uint8_t adtl_device_support;
|
||||
uint8_t manufacturer_id[3];
|
||||
uint8_t product_id[2];
|
||||
uint8_t aux_fw_rev[4];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#define IPM_DEV_DEVICE_ID_SDR_MASK (0x80) /* 1 = provides SDRs */
|
||||
#define IPM_DEV_DEVICE_ID_REV_MASK (0x0F) /* BCD-enoded */
|
||||
|
||||
#define IPM_DEV_FWREV1_AVAIL_MASK (0x80) /* 0 = normal operation */
|
||||
#define IPM_DEV_FWREV1_MAJOR_MASK (0x3f) /* Major rev, BCD-encoded */
|
||||
|
||||
#define IPM_DEV_IPMI_VER_MAJOR_MASK (0x0F) /* Major rev, BCD-encoded */
|
||||
#define IPM_DEV_IPMI_VER_MINOR_MASK (0xF0) /* Minor rev, BCD-encoded */
|
||||
#define IPM_DEV_IPMI_VER_MINOR_SHIFT (4) /* Minor rev shift */
|
||||
#define IPM_DEV_IPMI_VERSION_MAJOR(x) \
|
||||
(x & IPM_DEV_IPMI_VER_MAJOR_MASK)
|
||||
#define IPM_DEV_IPMI_VERSION_MINOR(x) \
|
||||
((x & IPM_DEV_IPMI_VER_MINOR_MASK) >> IPM_DEV_IPMI_VER_MINOR_SHIFT)
|
||||
|
||||
#define IPM_DEV_MANUFACTURER_ID(x) \
|
||||
((uint32_t) ((x[2] & 0x0F) << 16 | x[1] << 8 | x[0]))
|
||||
|
||||
#define IPM_DEV_ADTL_SUPPORT_BITS (8)
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct ipm_selftest_rsp {
|
||||
unsigned char code;
|
||||
unsigned char test;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#define IPM_SFT_CODE_OK 0x55
|
||||
#define IPM_SFT_CODE_NOT_IMPLEMENTED 0x56
|
||||
#define IPM_SFT_CODE_DEV_CORRUPTED 0x57
|
||||
#define IPM_SFT_CODE_FATAL_ERROR 0x58
|
||||
#define IPM_SFT_CODE_RESERVED 0xff
|
||||
|
||||
#define IPM_SELFTEST_SEL_ERROR 0x80
|
||||
#define IPM_SELFTEST_SDR_ERROR 0x40
|
||||
#define IPM_SELFTEST_FRU_ERROR 0x20
|
||||
#define IPM_SELFTEST_IPMB_ERROR 0x10
|
||||
#define IPM_SELFTEST_SDRR_EMPTY 0x08
|
||||
#define IPM_SELFTEST_INTERNAL_USE 0x04
|
||||
#define IPM_SELFTEST_FW_BOOTBLOCK 0x02
|
||||
#define IPM_SELFTEST_FW_CORRUPTED 0x01
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct ipm_get_watchdog_rsp {
|
||||
unsigned char timer_use;
|
||||
unsigned char timer_actions;
|
||||
unsigned char pre_timeout;
|
||||
unsigned char timer_use_exp;
|
||||
unsigned char initial_countdown_lsb;
|
||||
unsigned char initial_countdown_msb;
|
||||
unsigned char present_countdown_lsb;
|
||||
unsigned char present_countdown_msb;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#define IPM_WATCHDOG_RESET_ERROR 0x80
|
||||
|
||||
#define IPM_WATCHDOG_BIOS_FRB2 0x01
|
||||
#define IPM_WATCHDOG_BIOS_POST 0x02
|
||||
#define IPM_WATCHDOG_OS_LOAD 0x03
|
||||
#define IPM_WATCHDOG_SMS_OS 0x04
|
||||
#define IPM_WATCHDOG_OEM 0x05
|
||||
|
||||
#define IPM_WATCHDOG_NO_ACTION 0x00
|
||||
#define IPM_WATCHDOG_HARD_RESET 0x01
|
||||
#define IPM_WATCHDOG_POWER_DOWN 0x02
|
||||
#define IPM_WATCHDOG_POWER_CYCLE 0x03
|
||||
|
||||
#define IPM_WATCHDOG_CLEAR_OEM 0x20
|
||||
#define IPM_WATCHDOG_CLEAR_SMS_OS 0x10
|
||||
#define IPM_WATCHDOG_CLEAR_OS_LOAD 0x08
|
||||
#define IPM_WATCHDOG_CLEAR_BIOS_POST 0x04
|
||||
#define IPM_WATCHDOG_CLEAR_BIOS_FRB2 0x02
|
||||
|
||||
/* IPMI 2.0 command for system information*/
|
||||
#define IPMI_SET_SYS_INFO 0x58
|
||||
#define IPMI_GET_SYS_INFO 0x59
|
||||
#define IPMI_SYSINFO_SET0_SIZE 14
|
||||
#define IPMI_SYSINFO_SETN_SIZE 16
|
||||
|
||||
#define IPMI_SYSINFO_HOSTNAME 0x02
|
||||
#define IPMI_SYSINFO_PRIMARY_OS_NAME 0x03
|
||||
#define IPMI_SYSINFO_OS_NAME 0x04
|
||||
#define IPMI_SYSINFO_DELL_OS_VERSION 0xe4
|
||||
#define IPMI_SYSINFO_DELL_URL 0xde
|
||||
|
||||
int ipmi_mc_getsysinfo(struct ipmi_intf * intf, int param, int block, int set,
|
||||
int len, void *buffer);
|
||||
int ipmi_mc_setsysinfo(struct ipmi_intf * intf, int len, void *buffer);
|
||||
|
||||
#endif /*IPMI_MC_H */
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_OEM_H
|
||||
#define IPMI_OEM_H
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
/* oem handler, see lib/ipmi_oem.c */
|
||||
struct ipmi_oem_handle {
|
||||
const char * name;
|
||||
const char * desc;
|
||||
int (*setup)(struct ipmi_intf * intf);
|
||||
};
|
||||
|
||||
void ipmi_oem_print(void);
|
||||
int ipmi_oem_setup(struct ipmi_intf * intf, char * oemtype);
|
||||
int ipmi_oem_active(struct ipmi_intf * intf, const char * oemtype);
|
||||
|
||||
#endif /*IPMI_OEM_H*/
|
@ -1,956 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004 Dell Computers. 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 Dell Computers, 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.
|
||||
* DELL COMPUTERS ("DELL") 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
|
||||
* DELL 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 DELL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_PEF_H
|
||||
#define IPMI_PEF_H
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
/* PEF */
|
||||
|
||||
struct pef_capabilities { /* "get pef capabilities" response */
|
||||
uint8_t version;
|
||||
uint8_t actions; /* mapped by PEF_ACTION_xxx */
|
||||
uint8_t tblsize;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
P_TRUE,
|
||||
P_SUPP,
|
||||
P_ACTV,
|
||||
P_ABLE,
|
||||
} flg_e;
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_table_entry {
|
||||
#define PEF_CONFIG_ENABLED 0x80
|
||||
#define PEF_CONFIG_PRECONFIGURED 0x40
|
||||
uint8_t config;
|
||||
#define PEF_ACTION_DIAGNOSTIC_INTERRUPT 0x20
|
||||
#define PEF_ACTION_OEM 0x10
|
||||
#define PEF_ACTION_POWER_CYCLE 0x08
|
||||
#define PEF_ACTION_RESET 0x04
|
||||
#define PEF_ACTION_POWER_DOWN 0x02
|
||||
#define PEF_ACTION_ALERT 0x01
|
||||
uint8_t action;
|
||||
#define PEF_POLICY_NUMBER_MASK 0x0f
|
||||
uint8_t policy_number;
|
||||
#define PEF_SEVERITY_NON_RECOVERABLE 0x20
|
||||
#define PEF_SEVERITY_CRITICAL 0x10
|
||||
#define PEF_SEVERITY_WARNING 0x08
|
||||
#define PEF_SEVERITY_OK 0x04
|
||||
#define PEF_SEVERITY_INFORMATION 0x02
|
||||
#define PEF_SEVERITY_MONITOR 0x01
|
||||
uint8_t severity;
|
||||
uint8_t generator_ID_addr;
|
||||
uint8_t generator_ID_lun;
|
||||
uint8_t sensor_type;
|
||||
#define PEF_SENSOR_NUMBER_MATCH_ANY 0xff
|
||||
uint8_t sensor_number;
|
||||
#define PEF_EVENT_TRIGGER_UNSPECIFIED 0x0
|
||||
#define PEF_EVENT_TRIGGER_THRESHOLD 0x1
|
||||
#define PEF_EVENT_TRIGGER_SENSOR_SPECIFIC 0x6f
|
||||
#define PEF_EVENT_TRIGGER_MATCH_ANY 0xff
|
||||
uint8_t event_trigger;
|
||||
uint8_t event_data_1_offset_mask[2];
|
||||
uint8_t event_data_1_AND_mask;
|
||||
uint8_t event_data_1_compare_1;
|
||||
uint8_t event_data_1_compare_2;
|
||||
uint8_t event_data_2_AND_mask;
|
||||
uint8_t event_data_2_compare_1;
|
||||
uint8_t event_data_2_compare_2;
|
||||
uint8_t event_data_3_AND_mask;
|
||||
uint8_t event_data_3_compare_1;
|
||||
uint8_t event_data_3_compare_2;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
struct desc_map { /* maps a description to a value/mask */
|
||||
const char *desc;
|
||||
uint32_t mask;
|
||||
};
|
||||
|
||||
struct bit_desc_map { /* description text container */
|
||||
#define BIT_DESC_MAP_LIST 0x1 /* index-based text array */
|
||||
#define BIT_DESC_MAP_ANY 0x2 /* bitwise, but only print 1st one */
|
||||
#define BIT_DESC_MAP_ALL 0x3 /* bitwise, print them all */
|
||||
uint32_t desc_map_type;
|
||||
struct desc_map desc_maps[128];
|
||||
};
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_actions __attribute__((unused)) = {
|
||||
BIT_DESC_MAP_ALL,
|
||||
{ {"Alert", PEF_ACTION_ALERT},
|
||||
{"Power-off", PEF_ACTION_POWER_DOWN},
|
||||
{"Reset", PEF_ACTION_RESET},
|
||||
{"Power-cycle", PEF_ACTION_POWER_CYCLE},
|
||||
{"OEM-defined", PEF_ACTION_OEM},
|
||||
{"Diagnostic-interrupt", PEF_ACTION_DIAGNOSTIC_INTERRUPT},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_severities __attribute__((unused)) = {
|
||||
BIT_DESC_MAP_ANY,
|
||||
{ {"Non-recoverable", PEF_SEVERITY_NON_RECOVERABLE},
|
||||
{"Critical", PEF_SEVERITY_CRITICAL},
|
||||
{"Warning", PEF_SEVERITY_WARNING},
|
||||
{"OK", PEF_SEVERITY_OK},
|
||||
{"Information", PEF_SEVERITY_INFORMATION},
|
||||
{"Monitor", PEF_SEVERITY_MONITOR},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_sensortypes __attribute__((unused)) = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"Any", 255},
|
||||
{"Temperature", 1},
|
||||
{"Voltage", 2},
|
||||
{"Current", 3},
|
||||
{"Fan", 4},
|
||||
{"Chassis Intrusion", 5},
|
||||
{"Platform security breach", 6},
|
||||
{"Processor", 7},
|
||||
{"Power supply", 8},
|
||||
{"Power Unit", 9},
|
||||
{"Cooling device", 10},
|
||||
{"Other (units-based)", 11},
|
||||
{"Memory", 12},
|
||||
{"Drive Slot", 13},
|
||||
{"POST memory resize", 14},
|
||||
{"POST error", 15},
|
||||
{"Logging disabled", 16},
|
||||
{"Watchdog 1", 17},
|
||||
{"System event", 18},
|
||||
{"Critical Interrupt", 19},
|
||||
{"Button", 20},
|
||||
{"Module/board", 21},
|
||||
{"uController/coprocessor", 22},
|
||||
{"Add-in card", 23},
|
||||
{"Chassis", 24},
|
||||
{"Chipset", 25},
|
||||
{"Other (FRU)", 26},
|
||||
{"Cable/interconnect", 27},
|
||||
{"Terminator", 28},
|
||||
{"System boot", 29},
|
||||
{"Boot error", 30},
|
||||
{"OS boot", 31},
|
||||
{"OS critical stop", 32},
|
||||
{"Slot/connector", 33},
|
||||
{"ACPI power state", 34},
|
||||
{"Watchdog 2", 35},
|
||||
{"Platform alert", 36},
|
||||
{"Entity presence", 37},
|
||||
{"Monitor ASIC/IC", 38},
|
||||
{"LAN", 39},
|
||||
{"Management subsytem health",40},
|
||||
{"Battery", 41},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_gentype_1 = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"<LNC", 0}, /* '<' : getting worse */
|
||||
{">LNC", 1}, /* '>' : getting better */
|
||||
{"<LC", 2},
|
||||
{">LC", 3},
|
||||
{"<LNR", 4},
|
||||
{">LNR", 5},
|
||||
{">UNC", 6},
|
||||
{"<UNC", 7},
|
||||
{">UC", 8},
|
||||
{"<UC", 9},
|
||||
{">UNR", 10},
|
||||
{"<UNR", 11},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_gentype_2 = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"transition to idle", 0},
|
||||
{"transition to active", 1},
|
||||
{"transition to busy", 2},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_gentype_3 = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"state deasserted", 0},
|
||||
{"state asserted", 1},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_gentype_4 = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"predictive failure deasserted", 0},
|
||||
{"predictive failure asserted", 1},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_gentype_5 = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"limit not exceeded", 0},
|
||||
{"limit exceeded", 1},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_gentype_6 = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"performance met", 0},
|
||||
{"performance lags", 1},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_gentype_7 = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"ok", 0},
|
||||
{"<warn", 1}, /* '<' : getting worse */
|
||||
{"<fail", 2},
|
||||
{"<dead", 3},
|
||||
{">warn", 4}, /* '>' : getting better */
|
||||
{">fail", 5},
|
||||
{"dead", 6},
|
||||
{"monitor", 7},
|
||||
{"informational", 8},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_gentype_8 = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"device removed/absent", 0},
|
||||
{"device inserted/present", 1},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_gentype_9 = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"device disabled", 0},
|
||||
{"device enabled", 1},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_gentype_10 = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"transition to running", 0},
|
||||
{"transition to in test", 1},
|
||||
{"transition to power off", 2},
|
||||
{"transition to online", 3},
|
||||
{"transition to offline", 4},
|
||||
{"transition to off duty", 5},
|
||||
{"transition to degraded", 6},
|
||||
{"transition to power save", 7},
|
||||
{"install error", 8},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_gentype_11 = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"fully redundant", 0},
|
||||
{"redundancy lost", 1},
|
||||
{"redundancy degraded", 2},
|
||||
{"<non-redundant/sufficient", 3}, /* '<' : getting worse */
|
||||
{">non-redundant/sufficient", 4}, /* '>' : getting better */
|
||||
{"non-redundant/insufficient", 5},
|
||||
{"<redundancy degraded", 6},
|
||||
{">redundancy degraded", 7},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_gentype_12 = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"D0 power state", 0},
|
||||
{"D1 power state", 1},
|
||||
{"D2 power state", 2},
|
||||
{"D3 power state", 3},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map *
|
||||
pef_b2s_generic_ER[] __attribute__((unused)) = {
|
||||
&pef_b2s_gentype_1,
|
||||
&pef_b2s_gentype_2,
|
||||
&pef_b2s_gentype_3,
|
||||
&pef_b2s_gentype_4,
|
||||
&pef_b2s_gentype_5,
|
||||
&pef_b2s_gentype_6,
|
||||
&pef_b2s_gentype_7,
|
||||
&pef_b2s_gentype_8,
|
||||
&pef_b2s_gentype_9,
|
||||
&pef_b2s_gentype_10,
|
||||
&pef_b2s_gentype_11,
|
||||
&pef_b2s_gentype_12,
|
||||
};
|
||||
#define PEF_B2S_GENERIC_ER_ENTRIES \
|
||||
(sizeof(pef_b2s_generic_ER) / sizeof(pef_b2s_generic_ER[0]))
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_policy_entry {
|
||||
#define PEF_POLICY_ID_MASK 0xf0
|
||||
#define PEF_POLICY_ID_SHIFT 4
|
||||
#define PEF_POLICY_ENABLED 0x08
|
||||
#define PEF_POLICY_FLAGS_MASK 0x07
|
||||
#define PEF_POLICY_FLAGS_MATCH_ALWAYS 0
|
||||
#define PEF_POLICY_FLAGS_PREV_OK_SKIP 1
|
||||
#define PEF_POLICY_FLAGS_PREV_OK_NEXT_POLICY_SET 2
|
||||
#define PEF_POLICY_FLAGS_PREV_OK_NEXT_CHANNEL_IN_SET 3
|
||||
#define PEF_POLICY_FLAGS_PREV_OK_NEXT_DESTINATION_IN_SET 4
|
||||
uint8_t policy;
|
||||
#define PEF_POLICY_CHANNEL_MASK 0xf0
|
||||
#define PEF_POLICY_CHANNEL_SHIFT 4
|
||||
#define PEF_POLICY_DESTINATION_MASK 0x0f
|
||||
uint8_t chan_dest;
|
||||
#define PEF_POLICY_EVENT_SPECIFIC 0x80
|
||||
uint8_t alert_string_key;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_policies __attribute__((unused)) = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"Match-always", PEF_POLICY_FLAGS_MATCH_ALWAYS},
|
||||
{"Try-next-entry", PEF_POLICY_FLAGS_PREV_OK_SKIP},
|
||||
{"Try-next-set", PEF_POLICY_FLAGS_PREV_OK_NEXT_POLICY_SET},
|
||||
{"Try-next-channel", PEF_POLICY_FLAGS_PREV_OK_NEXT_CHANNEL_IN_SET},
|
||||
{"Try-next-destination", PEF_POLICY_FLAGS_PREV_OK_NEXT_DESTINATION_IN_SET},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_ch_medium __attribute__((unused)) = {
|
||||
#define PEF_CH_MEDIUM_TYPE_IPMB 1
|
||||
#define PEF_CH_MEDIUM_TYPE_ICMB_10 2
|
||||
#define PEF_CH_MEDIUM_TYPE_ICMB_09 3
|
||||
#define PEF_CH_MEDIUM_TYPE_LAN 4
|
||||
#define PEF_CH_MEDIUM_TYPE_SERIAL 5
|
||||
#define PEF_CH_MEDIUM_TYPE_XLAN 6
|
||||
#define PEF_CH_MEDIUM_TYPE_PCI_SMBUS 7
|
||||
#define PEF_CH_MEDIUM_TYPE_SMBUS_V1X 8
|
||||
#define PEF_CH_MEDIUM_TYPE_SMBUS_V2X 9
|
||||
#define PEF_CH_MEDIUM_TYPE_USB_V1X 10
|
||||
#define PEF_CH_MEDIUM_TYPE_USB_V2X 11
|
||||
#define PEF_CH_MEDIUM_TYPE_SYSTEM 12
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"IPMB (I2C)", PEF_CH_MEDIUM_TYPE_IPMB},
|
||||
{"ICMB v1.0", PEF_CH_MEDIUM_TYPE_ICMB_10},
|
||||
{"ICMB v0.9", PEF_CH_MEDIUM_TYPE_ICMB_09},
|
||||
{"802.3 LAN", PEF_CH_MEDIUM_TYPE_LAN},
|
||||
{"Serial/Modem (RS-232)", PEF_CH_MEDIUM_TYPE_SERIAL},
|
||||
{"Other LAN", PEF_CH_MEDIUM_TYPE_XLAN},
|
||||
{"PCI SMBus", PEF_CH_MEDIUM_TYPE_PCI_SMBUS},
|
||||
{"SMBus v1.0/1.1", PEF_CH_MEDIUM_TYPE_SMBUS_V1X},
|
||||
{"SMBus v2.0", PEF_CH_MEDIUM_TYPE_SMBUS_V2X},
|
||||
{"USB 1.x", PEF_CH_MEDIUM_TYPE_USB_V1X},
|
||||
{"USB 2.x", PEF_CH_MEDIUM_TYPE_USB_V2X},
|
||||
{"System I/F (KCS,SMIC,BT)", PEF_CH_MEDIUM_TYPE_SYSTEM},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_selector {
|
||||
#define PEF_CFGPARM_ID_REVISION_ONLY_MASK 0x80
|
||||
#define PEF_CFGPARM_ID_SET_IN_PROGRESS 0
|
||||
#define PEF_CFGPARM_ID_PEF_CONTROL 1
|
||||
#define PEF_CFGPARM_ID_PEF_ACTION 2
|
||||
#define PEF_CFGPARM_ID_PEF_STARTUP_DELAY 3
|
||||
#define PEF_CFGPARM_ID_PEF_ALERT_STARTUP_DELAY 4
|
||||
#define PEF_CFGPARM_ID_PEF_FILTER_TABLE_SIZE 5
|
||||
#define PEF_CFGPARM_ID_PEF_FILTER_TABLE_ENTRY 6
|
||||
#define PEF_CFGPARM_ID_PEF_FILTER_TABLE_DATA_1 7
|
||||
#define PEF_CFGPARM_ID_PEF_ALERT_POLICY_TABLE_SIZE 8
|
||||
#define PEF_CFGPARM_ID_PEF_ALERT_POLICY_TABLE_ENTRY 9
|
||||
#define PEF_CFGPARM_ID_SYSTEM_GUID 10
|
||||
#define PEF_CFGPARM_ID_PEF_ALERT_STRING_TABLE_SIZE 11
|
||||
#define PEF_CFGPARM_ID_PEF_ALERT_STRING_KEY 12
|
||||
#define PEF_CFGPARM_ID_PEF_ALERT_STRING_TABLE_ENTRY 13
|
||||
uint8_t id;
|
||||
uint8_t set;
|
||||
uint8_t block;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_set_in_progress {
|
||||
#define PEF_SET_IN_PROGRESS_COMMIT_WRITE 0x02
|
||||
#define PEF_SET_IN_PROGRESS 0x01
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_control {
|
||||
#define PEF_CONTROL_ENABLE_ALERT_STARTUP_DELAY 0x08
|
||||
#define PEF_CONTROL_ENABLE_STARTUP_DELAY 0x04
|
||||
#define PEF_CONTROL_ENABLE_EVENT_MESSAGES 0x02
|
||||
#define PEF_CONTROL_ENABLE 0x01
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_control __attribute__((unused)) = {
|
||||
BIT_DESC_MAP_ALL,
|
||||
{ {"PEF", PEF_CONTROL_ENABLE},
|
||||
{"PEF event messages", PEF_CONTROL_ENABLE_EVENT_MESSAGES},
|
||||
{"PEF startup delay", PEF_CONTROL_ENABLE_STARTUP_DELAY},
|
||||
{"Alert startup delay", PEF_CONTROL_ENABLE_ALERT_STARTUP_DELAY},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_action {
|
||||
#define PEF_ACTION_ENABLE_DIAGNOSTIC_INTERRUPT 0x20
|
||||
#define PEF_ACTION_ENABLE_OEM 0x10
|
||||
#define PEF_ACTION_ENABLE_POWER_CYCLE 0x08
|
||||
#define PEF_ACTION_ENABLE_RESET 0x04
|
||||
#define PEF_ACTION_ENABLE_POWER_DOWN 0x02
|
||||
#define PEF_ACTION_ENABLE_ALERT 0x01
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_startup_delay {
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_alert_startup_delay {
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_filter_table_size {
|
||||
#define PEF_FILTER_TABLE_SIZE_MASK 0x7f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_filter_table_entry {
|
||||
#define PEF_FILTER_TABLE_ID_MASK 0x7f
|
||||
uint8_t data1;
|
||||
struct pef_table_entry entry;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_filter_table_data_1 {
|
||||
uint8_t data1;
|
||||
uint8_t data2;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_policy_table_size {
|
||||
#define PEF_POLICY_TABLE_SIZE_MASK 0x7f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_policy_table_entry {
|
||||
#define PEF_POLICY_TABLE_ID_MASK 0x7f
|
||||
uint8_t data1;
|
||||
struct pef_policy_entry entry;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_system_guid {
|
||||
#define PEF_SYSTEM_GUID_USED_IN_PET 0x01
|
||||
uint8_t data1;
|
||||
uint8_t guid[16];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_alert_string_table_size {
|
||||
#define PEF_ALERT_STRING_TABLE_SIZE_MASK 0x7f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_alert_string_keys {
|
||||
#define PEF_ALERT_STRING_ID_MASK 0x7f
|
||||
uint8_t data1;
|
||||
#define PEF_EVENT_FILTER_ID_MASK 0x7f
|
||||
uint8_t data2;
|
||||
#define PEF_ALERT_STRING_SET_ID_MASK 0x7f
|
||||
uint8_t data3;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_cfgparm_alert_string_table_entry {
|
||||
uint8_t id;
|
||||
uint8_t blockno;
|
||||
uint8_t block[16];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
/* PEF - LAN */
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_lan_cfgparm_selector {
|
||||
#define PEF_LAN_CFGPARM_CH_REVISION_ONLY_MASK 0x80
|
||||
#define PEF_LAN_CFGPARM_CH_MASK 0x0f
|
||||
#define PEF_LAN_CFGPARM_ID_PET_COMMUNITY 16
|
||||
#define PEF_LAN_CFGPARM_ID_DEST_COUNT 17
|
||||
#define PEF_LAN_CFGPARM_ID_DESTTYPE 18
|
||||
#define PEF_LAN_CFGPARM_ID_DESTADDR 19
|
||||
uint8_t ch;
|
||||
uint8_t id;
|
||||
uint8_t set;
|
||||
uint8_t block;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_lan_cfgparm_dest_size {
|
||||
#define PEF_LAN_DEST_TABLE_SIZE_MASK 0x0f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_lan_cfgparm_dest_type {
|
||||
#define PEF_LAN_DEST_TYPE_ID_MASK 0x0f
|
||||
uint8_t dest;
|
||||
#define PEF_LAN_DEST_TYPE_ACK 0x80
|
||||
#define PEF_LAN_DEST_TYPE_MASK 0x07
|
||||
#define PEF_LAN_DEST_TYPE_PET 0
|
||||
#define PEF_LAN_DEST_TYPE_OEM_1 6
|
||||
#define PEF_LAN_DEST_TYPE_OEM_2 7
|
||||
uint8_t dest_type;
|
||||
uint8_t alert_timeout;
|
||||
#define PEF_LAN_RETRIES_MASK 0x07
|
||||
uint8_t retries;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_lan_desttype __attribute__((unused)) = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"Acknowledged", PEF_LAN_DEST_TYPE_ACK},
|
||||
{"PET", PEF_LAN_DEST_TYPE_PET},
|
||||
{"OEM 1", PEF_LAN_DEST_TYPE_OEM_1},
|
||||
{"OEM 2", PEF_LAN_DEST_TYPE_OEM_2},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_lan_cfgparm_dest_info {
|
||||
#define PEF_LAN_DEST_MASK 0x0f
|
||||
uint8_t dest;
|
||||
#define PEF_LAN_DEST_ADDRTYPE_MASK 0xf0
|
||||
#define PEF_LAN_DEST_ADDRTYPE_SHIFT 4
|
||||
#define PEF_LAN_DEST_ADDRTYPE_IPV4_MAC 0x00
|
||||
uint8_t addr_type;
|
||||
#define PEF_LAN_DEST_GATEWAY_USE_BACKUP 0x01
|
||||
uint8_t gateway;
|
||||
uint8_t ip[4];
|
||||
uint8_t mac[6];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
/* PEF - Serial/PPP */
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_selector {
|
||||
#define PEF_SERIAL_CFGPARM_CH_REVISION_ONLY_MASK 0x80
|
||||
#define PEF_SERIAL_CFGPARM_CH_MASK 0x0f
|
||||
#define PEF_SERIAL_CFGPARM_ID_DEST_COUNT 16
|
||||
#define PEF_SERIAL_CFGPARM_ID_DESTINFO 17
|
||||
#define PEF_SERIAL_CFGPARM_ID_DEST_DIAL_STRING_COUNT 20
|
||||
#define PEF_SERIAL_CFGPARM_ID_DEST_DIAL_STRING 21
|
||||
#define PEF_SERIAL_CFGPARM_ID_TAP_ACCT_COUNT 24
|
||||
#define PEF_SERIAL_CFGPARM_ID_TAP_ACCT_INFO 25
|
||||
#define PEF_SERIAL_CFGPARM_ID_TAP_ACCT_PAGER_STRING 27
|
||||
uint8_t ch;
|
||||
uint8_t id;
|
||||
uint8_t set;
|
||||
uint8_t block;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_dest_size {
|
||||
#define PEF_SERIAL_DEST_TABLE_SIZE_MASK 0x0f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_dest_info {
|
||||
#define PEF_SERIAL_DEST_MASK 0x0f
|
||||
uint8_t dest;
|
||||
#define PEF_SERIAL_DEST_TYPE_ACK 0x80
|
||||
#define PEF_SERIAL_DEST_TYPE_MASK 0x0f
|
||||
#define PEF_SERIAL_DEST_TYPE_DIAL 0
|
||||
#define PEF_SERIAL_DEST_TYPE_TAP 1
|
||||
#define PEF_SERIAL_DEST_TYPE_PPP 2
|
||||
#define PEF_SERIAL_DEST_TYPE_BASIC_CALLBACK 3
|
||||
#define PEF_SERIAL_DEST_TYPE_PPP_CALLBACK 4
|
||||
#define PEF_SERIAL_DEST_TYPE_OEM_1 14
|
||||
#define PEF_SERIAL_DEST_TYPE_OEM_2 15
|
||||
uint8_t dest_type;
|
||||
uint8_t alert_timeout;
|
||||
#define PEF_SERIAL_RETRIES_MASK 0x77
|
||||
#define PEF_SERIAL_RETRIES_POST_CONNECT_MASK 0x70
|
||||
#define PEF_SERIAL_RETRIES_PRE_CONNECT_MASK 0x07
|
||||
uint8_t retries;
|
||||
#define PEF_SERIAL_DIALPAGE_STRING_ID_MASK 0xf0
|
||||
#define PEF_SERIAL_DIALPAGE_STRING_ID_SHIFT 4
|
||||
#define PEF_SERIAL_TAP_PAGE_SERVICE_ID_MASK 0x0f
|
||||
#define PEF_SERIAL_PPP_ACCT_IPADDR_ID_MASK 0xf0
|
||||
#define PEF_SERIAL_PPP_ACCT_IPADDR_ID_SHIFT 4
|
||||
#define PEF_SERIAL_PPP_ACCT_ID_MASK 0x0f
|
||||
#define PEF_SERIAL_CALLBACK_IPADDR_ID_MASK 0x0f
|
||||
#define PEF_SERIAL_CALLBACK_IPADDR_ID_SHIFT 4
|
||||
#define PEF_SERIAL_CALLBACK_ACCT_ID_MASK 0xf0
|
||||
uint8_t data5;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_serial_desttype __attribute__((unused)) = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"Acknowledged", PEF_SERIAL_DEST_TYPE_ACK},
|
||||
{"TAP page", PEF_SERIAL_DEST_TYPE_TAP},
|
||||
{"PPP PET", PEF_SERIAL_DEST_TYPE_PPP},
|
||||
{"Basic callback", PEF_SERIAL_DEST_TYPE_BASIC_CALLBACK},
|
||||
{"PPP callback", PEF_SERIAL_DEST_TYPE_PPP_CALLBACK},
|
||||
{"OEM 1", PEF_SERIAL_DEST_TYPE_OEM_1},
|
||||
{"OEM 2", PEF_SERIAL_DEST_TYPE_OEM_2},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_dial_string_count {
|
||||
#define PEF_SERIAL_DIAL_STRING_COUNT_MASK 0x0f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_dial_string {
|
||||
#define PEF_SERIAL_DIAL_STRING_MASK 0x0f
|
||||
uint8_t data1;
|
||||
uint8_t data2;
|
||||
uint8_t data3;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_tap_acct_count {
|
||||
#define PEF_SERIAL_TAP_ACCT_COUNT_MASK 0x0f
|
||||
uint8_t data1;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_tap_acct_info {
|
||||
uint8_t data1;
|
||||
#define PEF_SERIAL_TAP_ACCT_INFO_DIAL_STRING_ID_MASK 0xf0
|
||||
#define PEF_SERIAL_TAP_ACCT_INFO_DIAL_STRING_ID_SHIFT 4
|
||||
#define PEF_SERIAL_TAP_ACCT_INFO_SVC_SETTINGS_ID_MASK 0x0f
|
||||
uint8_t data2;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct pef_serial_cfgparm_tap_svc_settings {
|
||||
uint8_t data1;
|
||||
#define PEF_SERIAL_TAP_CONFIRMATION_ACK_AFTER_ETX 0x0
|
||||
#define PEF_SERIAL_TAP_CONFIRMATION_211_ACK_AFTER_ETX 0x01
|
||||
#define PEF_SERIAL_TAP_CONFIRMATION_21X_ACK_AFTER_ETX 0x02
|
||||
uint8_t confirmation_flags;
|
||||
uint8_t service_type[3];
|
||||
uint8_t escape_mask[4];
|
||||
uint8_t timeout_parms[3];
|
||||
uint8_t retry_parms[2];
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
static struct bit_desc_map
|
||||
pef_b2s_tap_svc_confirm __attribute__((unused)) = {
|
||||
BIT_DESC_MAP_LIST,
|
||||
{ {"ACK", PEF_SERIAL_TAP_CONFIRMATION_ACK_AFTER_ETX},
|
||||
{"211+ACK", PEF_SERIAL_TAP_CONFIRMATION_211_ACK_AFTER_ETX},
|
||||
{"{211|213}+ACK", PEF_SERIAL_TAP_CONFIRMATION_21X_ACK_AFTER_ETX},
|
||||
{NULL}
|
||||
} };
|
||||
|
||||
#if 0 /* FYI : config parm groupings */
|
||||
struct pef_config_parms { /* PEF */
|
||||
struct pef_cfgparm_set_in_progress;
|
||||
struct pef_cfgparm_control;
|
||||
struct pef_cfgparm_action;
|
||||
struct pef_cfgparm_startup_delay; /* in seconds, 1-based */
|
||||
struct pef_cfgparm_alert_startup_delay; /* in seconds, 1-based */
|
||||
struct pef_cfgparm_filter_table_size; /* 1-based, READ-ONLY */
|
||||
struct pef_cfgparm_filter_table_entry;
|
||||
struct pef_cfgparm_filter_table_data_1;
|
||||
struct pef_cfgparm_policy_table_size;
|
||||
struct pef_cfgparm_policy_table_entry;
|
||||
struct pef_cfgparm_system_guid;
|
||||
struct pef_cfgparm_alert_string_table_size;
|
||||
struct pef_cfgparm_alert_string_keys;
|
||||
struct pef_cfgparm_alert_string_table_entry;
|
||||
} ATTRIBUTE_PACKING;
|
||||
|
||||
struct pef_lan_config_parms { /* LAN */
|
||||
struct pef_lan_cfgparm_set_in_progress;
|
||||
struct pef_lan_cfgparm_auth_capabilities;
|
||||
struct pef_lan_cfgparm_auth_type;
|
||||
struct pef_lan_cfgparm_ip_address;
|
||||
struct pef_lan_cfgparm_ip_address_source;
|
||||
struct pef_lan_cfgparm_mac_address;
|
||||
struct pef_lan_cfgparm_subnet_mask;
|
||||
struct pef_lan_cfgparm_ipv4_header_parms;
|
||||
struct pef_lan_cfgparm_primary_rmcp_port;
|
||||
struct pef_lan_cfgparm_secondary_rmcp_port;
|
||||
struct pef_lan_cfgparm_bmc_generated_arp_control;
|
||||
struct pef_lan_cfgparm_gratuitous_arp;
|
||||
struct pef_lan_cfgparm_default_gateway_ipaddr;
|
||||
struct pef_lan_cfgparm_default_gateway_macaddr;
|
||||
struct pef_lan_cfgparm_backup_gateway_ipaddr;
|
||||
struct pef_lan_cfgparm_backup_gateway_macaddr;
|
||||
struct pef_lan_cfgparm_pet_community;
|
||||
struct pef_lan_cfgparm_destination_count;
|
||||
struct pef_lan_cfgparm_destination_type;
|
||||
struct pef_lan_cfgparm_destination_ipaddr;
|
||||
} ATTRIBUTE_PACKING;
|
||||
|
||||
struct pef_serial_config_parms { /* Serial/PPP */
|
||||
struct pef_serial_cfgparm_set_in_progress;
|
||||
struct pef_serial_cfgparm_auth_capabilities;
|
||||
struct pef_serial_cfgparm_auth_type;
|
||||
struct pef_serial_cfgparm_connection_mode;
|
||||
struct pef_serial_cfgparm_idle_timeout;
|
||||
struct pef_serial_cfgparm_callback_control;
|
||||
struct pef_serial_cfgparm_session_termination;
|
||||
struct pef_serial_cfgparm_ipmi_settings;
|
||||
struct pef_serial_cfgparm_mux_control;
|
||||
struct pef_serial_cfgparm_modem_ring_time;
|
||||
struct pef_serial_cfgparm_modem_init_string;
|
||||
struct pef_serial_cfgparm_modem_escape_sequence;
|
||||
struct pef_serial_cfgparm_modem_hangup_sequence;
|
||||
struct pef_serial_cfgparm_modem_dial_command;
|
||||
struct pef_serial_cfgparm_page_blackout_interval;
|
||||
struct pef_serial_cfgparm_pet_community;
|
||||
struct pef_serial_cfgparm_destination_count;
|
||||
struct pef_serial_cfgparm_destination_info;
|
||||
struct pef_serial_cfgparm_call_retry_interval;
|
||||
struct pef_serial_cfgparm_destination_settings;
|
||||
struct pef_serial_cfgparm_dialstring_count;
|
||||
struct pef_serial_cfgparm_dialstring_info;
|
||||
struct pef_serial_cfgparm_ipaddr_count;
|
||||
struct pef_serial_cfgparm_ipaddr_info;
|
||||
struct pef_serial_cfgparm_tap_acct_count;
|
||||
struct pef_serial_cfgparm_tap_acct_info;
|
||||
struct pef_serial_cfgparm_tap_acct_passwords; /* WRITE only */
|
||||
struct pef_serial_cfgparm_tap_pager_id_strings;
|
||||
struct pef_serial_cfgparm_tap_service_settings;
|
||||
struct pef_serial_cfgparm_terminal_mode_config;
|
||||
struct pef_serial_cfgparm_ppp_otions;
|
||||
struct pef_serial_cfgparm_ppp_primary_rmcp_port;
|
||||
struct pef_serial_cfgparm_ppp_secondary_rmcp_port;
|
||||
struct pef_serial_cfgparm_ppp_link_auth;
|
||||
struct pef_serial_cfgparm_ppp_chap_name;
|
||||
struct pef_serial_cfgparm_ppp_accm;
|
||||
struct pef_serial_cfgparm_ppp_snoop_accm;
|
||||
struct pef_serial_cfgparm_ppp_acct_count;
|
||||
struct pef_serial_cfgparm_ppp_acct_dialstring_selector;
|
||||
struct pef_serial_cfgparm_ppp_acct_ipaddrs;
|
||||
struct pef_serial_cfgparm_ppp_acct_user_names;
|
||||
struct pef_serial_cfgparm_ppp_acct_user_domains;
|
||||
struct pef_serial_cfgparm_ppp_acct_user_passwords; /* WRITE only */
|
||||
struct pef_serial_cfgparm_ppp_acct_auth_settings;
|
||||
struct pef_serial_cfgparm_ppp_acct_connect_hold_times;
|
||||
struct pef_serial_cfgparm_ppp_udp_proxy_ipheader;
|
||||
struct pef_serial_cfgparm_ppp_udp_proxy_xmit_bufsize;
|
||||
struct pef_serial_cfgparm_ppp_udp_proxy_recv_bufsize;
|
||||
struct pef_serial_cfgparm_ppp_remote_console_ipaddr;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#endif
|
||||
|
||||
#define IPMI_CMD_GET_PEF_CAPABILITIES 0x10
|
||||
#define IPMI_CMD_GET_PEF_CONFIG_PARMS 0x13
|
||||
#define IPMI_CMD_GET_LAST_PROCESSED_EVT_ID 0x15
|
||||
#define IPMI_CMD_GET_SYSTEM_GUID 0x37
|
||||
#define IPMI_CMD_GET_CHANNEL_INFO 0x42
|
||||
#define IPMI_CMD_LAN_GET_CONFIG 0x02
|
||||
#define IPMI_CMD_SERIAL_GET_CONFIG 0x11
|
||||
|
||||
const char * ipmi_pef_bit_desc(struct bit_desc_map * map, uint32_t val);
|
||||
void ipmi_pef_print_flags(struct bit_desc_map * map, flg_e type, uint32_t val);
|
||||
void ipmi_pef_print_dec(const char * text, uint32_t val);
|
||||
void ipmi_pef_print_hex(const char * text, uint32_t val);
|
||||
void ipmi_pef_print_1xd(const char * text, uint32_t val);
|
||||
void ipmi_pef_print_2xd(const char * text, uint8_t u1, uint8_t u2);
|
||||
void ipmi_pef_print_str(const char * text, const char * val);
|
||||
|
||||
int ipmi_pef_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||
|
||||
#endif /* IPMI_PEF_H */
|
@ -1,211 +0,0 @@
|
||||
|
||||
/*
|
||||
(C) Kontron
|
||||
*/
|
||||
|
||||
#ifndef _IPMI_PICMG_H_
|
||||
#define _IPMI_PICMG_H_
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
/* PICMG version */
|
||||
#define PICMG_CPCI_MAJOR_VERSION 1
|
||||
#define PICMG_ATCA_MAJOR_VERSION 2
|
||||
#define PICMG_AMC_MAJOR_VERSION 4
|
||||
|
||||
/* 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
|
||||
|
||||
/* AMC.0 commands */
|
||||
#define PICMG_AMC_SET_PORT_STATE_CMD 0x19
|
||||
#define PICMG_AMC_GET_PORT_STATE_CMD 0x1A
|
||||
/* AMC.0 R2.0 commands */
|
||||
#define PICMG_AMC_SET_CLK_STATE_CMD 0x2C
|
||||
#define PICMG_AMC_GET_CLK_STATE_CMD 0x2D
|
||||
|
||||
/* 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
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct picmg_set_fru_activation_cmd {
|
||||
unsigned char picmg_id; /* always 0*/
|
||||
unsigned char fru_id; /* threshold setting mask */
|
||||
unsigned char fru_state; /* fru activation/deactivation */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
typedef enum picmg_busres_board_cmd_types {
|
||||
PICMG_BUSRES_BOARD_CMD_QUERY =0,
|
||||
PICMG_BUSRES_BOARD_CMD_RELEASE,
|
||||
PICMG_BUSRES_BOARD_CMD_FORCE,
|
||||
PICMG_BUSRES_BOARD_CMD_BUS_FREE
|
||||
} t_picmg_busres_board_cmd_types ;
|
||||
|
||||
typedef enum picmg_busres_shmc_cmd_types {
|
||||
PICMG_BUSRES_SHMC_CMD_REQUEST =0,
|
||||
PICMG_BUSRES_SHMC_CMD_RELINQUISH,
|
||||
PICMG_BUSRES_SHMC_CMD_NOTIFY
|
||||
} t_picmg_busres_shmc_cmd_types ;
|
||||
|
||||
typedef enum picmg_busres_resource_id {
|
||||
PICMG_BUSRES_METAL_TEST_BUS_1=0,
|
||||
PICMG_BUSRES_METAL_TEST_BUS_2,
|
||||
PICMG_BUSRES_SYNC_CLOCK_GROUP_1,
|
||||
PICMG_BUSRES_SYNC_CLOCK_GROUP_2,
|
||||
PICMG_BUSRES_SYNC_CLOCK_GROUP_3
|
||||
} t_picmg_busres_resource_id;
|
||||
|
||||
/* the LED color capabilities */
|
||||
static const char* led_color_str[] __attribute__((unused)) = {
|
||||
"reserved",
|
||||
"BLUE",
|
||||
"RED",
|
||||
"GREEN",
|
||||
"AMBER",
|
||||
"ORANGE",
|
||||
"WHITE",
|
||||
"reserved"
|
||||
};
|
||||
|
||||
|
||||
static const char* amc_link_type_str[] __attribute__((unused)) = {
|
||||
"RESERVED",
|
||||
"RESERVED1",
|
||||
"PCI EXPRESS",
|
||||
"ADVANCED SWITCHING1",
|
||||
"ADVANCED SWITCHING2",
|
||||
"ETHERNET",
|
||||
"RAPIDIO",
|
||||
"STORAGE",
|
||||
};
|
||||
|
||||
static const char* amc_link_type_ext_str[][16] __attribute__((unused)) = {
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_RESERVED */
|
||||
{
|
||||
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_RESERVED1 */
|
||||
{
|
||||
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_PCI_EXPRESS */
|
||||
{
|
||||
"Gen 1 - NSSC",
|
||||
"Gen 1 - SSC",
|
||||
"Gen 2 - NSSC",
|
||||
"Gen 2 - SSC",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_ADVANCED_SWITCHING1 */
|
||||
{
|
||||
"Gen 1 - NSSC",
|
||||
"Gen 1 - SSC",
|
||||
"Gen 2 - NSSC",
|
||||
"Gen 2 - SSC",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_ADVANCED_SWITCHING2 */
|
||||
{
|
||||
"Gen 1 - NSSC",
|
||||
"Gen 1 - SSC",
|
||||
"Gen 2 - NSSC",
|
||||
"Gen 2 - SSC",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_ETHERNET */
|
||||
{
|
||||
"1000BASE-BX (SerDES Gigabit)",
|
||||
"10GBASE-BX410 Gigabit XAUI",
|
||||
"", "",
|
||||
"", "", "", "",
|
||||
"", "", "", "",
|
||||
"", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_RAPIDIO */
|
||||
{
|
||||
"1.25 Gbaud transmission rate",
|
||||
"2.5 Gbaud transmission rate",
|
||||
"3.125 Gbaud transmission rate",
|
||||
"", "", "", "", "",
|
||||
"", "", "", "", "", "", "", ""
|
||||
},
|
||||
/* FRU_PICMGEXT_AMC_LINK_TYPE_STORAGE */
|
||||
{
|
||||
"Fibre Channel",
|
||||
"Serial ATA",
|
||||
"Serial Attached SCSI",
|
||||
"", "", "", "", "",
|
||||
"", "", "", "", "", "", "", ""
|
||||
}
|
||||
};
|
||||
|
||||
struct sAmcPortState {
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
unsigned short lane0 : 1;
|
||||
unsigned short lane1 : 1;
|
||||
unsigned short lane2 : 1;
|
||||
unsigned short lane3 : 1;
|
||||
unsigned short type : 8;
|
||||
unsigned short type_ext : 4;
|
||||
unsigned char group_id : 8;
|
||||
#else
|
||||
unsigned char group_id : 8;
|
||||
unsigned short type_ext : 4;
|
||||
unsigned short type : 8;
|
||||
unsigned short lane3 : 1;
|
||||
unsigned short lane2 : 1;
|
||||
unsigned short lane1 : 1;
|
||||
unsigned short lane0 : 1;
|
||||
#endif
|
||||
|
||||
unsigned char state;
|
||||
};
|
||||
|
||||
|
||||
int ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv);
|
||||
uint8_t picmg_discover(struct ipmi_intf *intf);
|
||||
uint8_t ipmi_picmg_ipmb_address(struct ipmi_intf *intf);
|
||||
|
||||
#endif
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_RAW_H
|
||||
#define IPMI_RAW_H
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
int ipmi_raw_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||
struct ipmi_rs * ipmi_master_write_read(struct ipmi_intf * intf, uint8_t bus, uint8_t addr,
|
||||
uint8_t * wdata, uint8_t wsize, uint8_t rsize);
|
||||
int ipmi_rawi2c_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||
int ipmi_rawspd_main(struct ipmi_intf * intf, int argc, char ** argv);
|
||||
|
||||
#endif /* IPMI_RAW_H */
|
File diff suppressed because it is too large
Load Diff
@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_SDRADD_H
|
||||
#define IPMI_SDRADD_H
|
||||
|
||||
/*
|
||||
* Methods to add SDRs to repository from built-in sensors or files
|
||||
*/
|
||||
int
|
||||
ipmi_sdr_add_from_sensors(struct ipmi_intf *intf, int maxslot);
|
||||
|
||||
int
|
||||
ipmi_sdr_add_from_file(struct ipmi_intf *intf, const char *ifile);
|
||||
|
||||
int
|
||||
ipmi_sdr_add_from_list(struct ipmi_intf *intf, const char *rangeList);
|
||||
|
||||
#endif /* IPMI_SDRADD_H */
|
@ -28,27 +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.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_SEL_H
|
||||
#define IPMI_SEL_H
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_sdr.h>
|
||||
|
||||
#define IPMI_CMD_GET_SEL_INFO 0x40
|
||||
#define IPMI_CMD_GET_SEL_ALLOC_INFO 0x41
|
||||
#define IPMI_CMD_RESERVE_SEL 0x42
|
||||
#define IPMI_CMD_GET_SEL_ENTRY 0x43
|
||||
#define IPMI_CMD_ADD_SEL_ENTRY 0x44
|
||||
#define IPMI_CMD_PARTIAL_ADD_SEL_ENTRY 0x45
|
||||
#define IPMI_CMD_DELETE_SEL_ENTRY 0x46
|
||||
#define IPMI_CMD_CLEAR_SEL 0x47
|
||||
#define IPMI_CMD_GET_SEL_TIME 0x48
|
||||
#define IPMI_CMD_SET_SEL_TIME 0x49
|
||||
#define IPMI_CMD_GET_AUX_LOG_STATUS 0x5A
|
||||
#define IPMI_CMD_SET_AUX_LOG_STATUS 0x5B
|
||||
|
||||
enum {
|
||||
IPMI_EVENT_CLASS_DISCRETE,
|
||||
@ -57,637 +46,316 @@ enum {
|
||||
IPMI_EVENT_CLASS_OEM,
|
||||
};
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sel_get_rq {
|
||||
uint16_t reserve_id;
|
||||
uint16_t record_id;
|
||||
uint8_t offset;
|
||||
uint8_t length;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
unsigned short reserve_id;
|
||||
unsigned short record_id;
|
||||
unsigned char offset;
|
||||
unsigned char length;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct standard_spec_sel_rec{
|
||||
uint32_t timestamp;
|
||||
uint16_t gen_id;
|
||||
uint8_t evm_rev;
|
||||
uint8_t sensor_type;
|
||||
uint8_t sensor_num;
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t event_dir : 1;
|
||||
uint8_t event_type : 7;
|
||||
#else
|
||||
uint8_t event_type : 7;
|
||||
uint8_t event_dir : 1;
|
||||
#endif
|
||||
#define DATA_BYTE2_SPECIFIED_MASK 0xc0 /* event_data[0] bit mask */
|
||||
#define DATA_BYTE3_SPECIFIED_MASK 0x30 /* event_data[0] bit mask */
|
||||
#define EVENT_OFFSET_MASK 0x0f /* event_data[0] bit mask */
|
||||
uint8_t event_data[3];
|
||||
};
|
||||
/* Dell Specific MACRO's */
|
||||
#define OEM_CODE_IN_BYTE2 0x80 /* Dell specific OEM Byte in Byte 2 Mask */
|
||||
#define OEM_CODE_IN_BYTE3 0x20 /* Dell specific OEM Byte in Byte 3 Mask */
|
||||
/* MASK MACROS */
|
||||
#define MASK_LOWER_NIBBLE 0x0F
|
||||
#define MASK_HIGHER_NIBBLE 0xF0
|
||||
/*Senosr type Macro's */
|
||||
#define SENSOR_TYPE_MEMORY 0x0C
|
||||
#define SENSOR_TYPE_CRIT_INTR 0x13
|
||||
#define SENSOR_TYPE_EVT_LOG 0x10
|
||||
#define SENSOR_TYPE_SYS_EVENT 0x12
|
||||
#define SENSOR_TYPE_PROCESSOR 0x07
|
||||
#define SENSOR_TYPE_OEM_SEC_EVENT 0xC1
|
||||
#define SENSOR_TYPE_VER_CHANGE 0x2B
|
||||
#define SENSOR_TYPE_FRM_PROG 0x0F
|
||||
#define SENSOR_TYPE_WTDOG 0x23
|
||||
#define SENSOR_TYPE_OEM_NFATAL_ERROR 0xC2
|
||||
#define SENSOR_TYPE_OEM_FATAL_ERROR 0xC3
|
||||
#define SENSOR_TYPE_TXT_CMD_ERROR 0x20
|
||||
/* End of Macro for DELL Specific */
|
||||
#define SEL_OEM_TS_DATA_LEN 6
|
||||
#define SEL_OEM_NOTS_DATA_LEN 13
|
||||
struct oem_ts_spec_sel_rec{
|
||||
uint32_t timestamp;
|
||||
uint8_t manf_id[3];
|
||||
uint8_t oem_defined[SEL_OEM_TS_DATA_LEN];
|
||||
};
|
||||
|
||||
struct oem_nots_spec_sel_rec{
|
||||
uint8_t oem_defined[SEL_OEM_NOTS_DATA_LEN];
|
||||
};
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sel_event_record {
|
||||
uint16_t record_id;
|
||||
uint8_t record_type;
|
||||
union{
|
||||
struct standard_spec_sel_rec standard_type;
|
||||
struct oem_ts_spec_sel_rec oem_ts_type;
|
||||
struct oem_nots_spec_sel_rec oem_nots_type;
|
||||
} sel_type;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
unsigned short record_id;
|
||||
unsigned char record_type;
|
||||
unsigned long timestamp;
|
||||
unsigned short gen_id;
|
||||
unsigned char evm_rev;
|
||||
unsigned char sensor_type;
|
||||
unsigned char sensor_num;
|
||||
unsigned char event_type : 7;
|
||||
unsigned char event_dir : 1;
|
||||
unsigned char event_data[3];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct sel_oem_record_ts {
|
||||
unsigned short next_id;
|
||||
unsigned short record_id;
|
||||
unsigned char record_type;
|
||||
unsigned long timestamp;
|
||||
unsigned char mfg_id[3];
|
||||
unsigned char oem_defined[6];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct sel_oem_record_nots {
|
||||
unsigned short next_id;
|
||||
unsigned short record_id;
|
||||
unsigned char record_type;
|
||||
unsigned char oem_defined[13];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
struct ipmi_event_sensor_types {
|
||||
uint8_t code;
|
||||
uint8_t offset;
|
||||
#define ALL_OFFSETS_SPECIFIED 0xff
|
||||
uint8_t data;
|
||||
uint8_t class;
|
||||
unsigned char code;
|
||||
unsigned char offset;
|
||||
unsigned char class;
|
||||
const char * type;
|
||||
const char * desc;
|
||||
};
|
||||
|
||||
/* The sel module uses the "iana" number to select the appropriate array at run time
|
||||
This table if for iana number 15000 ( Kontron ), you can add you own OEM sensor types
|
||||
using a similar constuct, look for switch(iana) in ipmi_sel.c
|
||||
*/
|
||||
static struct ipmi_event_sensor_types oem_kontron_event_types[] __attribute__((unused)) = {
|
||||
|
||||
/* event type details uses an oem event type */
|
||||
{ 0xC0 , 0xFF , 0xff, IPMI_EVENT_CLASS_DISCRETE , "OEM Firmware Info", NULL },
|
||||
{ 0xC0 , 0xFF , 0xff, IPMI_EVENT_CLASS_DISCRETE , "OEM Firmware Info", NULL },
|
||||
|
||||
{ 0xC1 , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset(cPCI)", "Push Button" },
|
||||
{ 0xC1 , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset(cPCI)", "Bridge Reset" },
|
||||
{ 0xC1 , 0x02 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset(cPCI)", "Backplane" },
|
||||
{ 0xC1 , 0x03 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset(cPCI)", "Hotswap Fault" },
|
||||
{ 0xC1 , 0x04 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset(cPCI)", "Hotswap Healty" },
|
||||
{ 0xC1 , 0x05 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset(cPCI)", "Unknown" },
|
||||
{ 0xC1 , 0x06 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset(cPCI)", "ITP" },
|
||||
{ 0xC1 , 0x07 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset(cPCI)", "Hardware Watchdog" },
|
||||
{ 0xC1 , 0x08 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset(cPCI)", "Software Reset" },
|
||||
|
||||
/* Uses standard digital reading type */
|
||||
{ 0xC2 , 0xFF , 0xff, IPMI_EVENT_CLASS_DIGITAL , "SDRR Init Agent", NULL },
|
||||
|
||||
/* based on PICMG IPMB-0 Link state sensor */
|
||||
{ 0xC3 , 0x02 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "IPMB-L Link State", "IPMB L Disabled" },
|
||||
{ 0xC3 , 0x03 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "IPMB-L Link State", "IPMB L Enabled" },
|
||||
|
||||
{ 0xC4 , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset", "Push Button" },
|
||||
{ 0xC4 , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset", "Hardware Power Failure" },
|
||||
{ 0xC4 , 0x02 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset", "Unknown" },
|
||||
{ 0xC4 , 0x03 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset", "Hardware Watchdog" },
|
||||
{ 0xC4 , 0x04 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset", "Soft Reset" },
|
||||
{ 0xC4 , 0x05 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset", "Warm Reset" },
|
||||
{ 0xC4 , 0x06 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset", "Cold Reset" },
|
||||
{ 0xC4 , 0x07 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset", "IPMI Command" },
|
||||
{ 0xC4 , 0x08 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset", "Setup Reset (Save CMOS)" },
|
||||
{ 0xC4 , 0x09 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Board Reset", "Power Up Reset" },
|
||||
|
||||
/* event type details uses a standard */
|
||||
{ 0xC5 , 0xFF , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Information Agent", NULL },
|
||||
|
||||
{ 0xC6 , 0x0E , 0xff, IPMI_EVENT_CLASS_DISCRETE , "POST Value", "Post Error (see data2)" },
|
||||
|
||||
{ 0xC7 , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "First Boot After Upgrade" },
|
||||
{ 0xC7 , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "First Boot After Rollback(error)" },
|
||||
{ 0xC7 , 0x02 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "First Boot After Errors (watchdog)" },
|
||||
{ 0xC7 , 0x03 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "First Boot After Manual Rollback" },
|
||||
{ 0xC7 , 0x08 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FWUM Status", "Firmware Watchdog Bite, reset occured" },
|
||||
|
||||
{ 0xC8 , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Switch Mngt Software Status", "Not Loaded" },
|
||||
{ 0xC8 , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Switch Mngt Software Status", "Initializing" },
|
||||
{ 0xC8 , 0x02 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Switch Mngt Software Status", "Ready" },
|
||||
{ 0xC8 , 0x03 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Switch Mngt Software Status", "Failure (see data2)" },
|
||||
|
||||
{ 0xC9 , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Diagnostic Status", "Started" },
|
||||
{ 0xC9 , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Diagnostic Status", "Pass" },
|
||||
{ 0xC9 , 0x02 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Diagnostic Status", "Fail" },
|
||||
|
||||
{ 0xCA , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Firmware Upgrade Status", "In progress"},
|
||||
{ 0xCA , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Firmware Upgrade Status", "Success"},
|
||||
{ 0xCA , 0x02 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Firmware Upgrade Status", "Failure"},
|
||||
|
||||
{ 0xCB , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Over Current", "Asserted"},
|
||||
{ 0xCB , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Over Current", "Deasserted"},
|
||||
|
||||
{ 0xCC , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Sensor Error", "Asserted"},
|
||||
{ 0xCC , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Sensor Error", "Deasserted"},
|
||||
|
||||
{ 0xCD , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Power Denied", "Asserted"},
|
||||
{ 0xCD , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "FRU Power Denied", "Deasserted"},
|
||||
|
||||
{ 0xCF , 0x00 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Reset", "Asserted"},
|
||||
{ 0xCF , 0x01 , 0xff, IPMI_EVENT_CLASS_DISCRETE , "Reset", "Deasserted"},
|
||||
|
||||
/* END */
|
||||
{ 0x00, 0x00, 0xff, 0x00, NULL, NULL },
|
||||
};
|
||||
|
||||
static struct ipmi_event_sensor_types generic_event_types[] __attribute__((unused)) = {
|
||||
/* Threshold Based States */
|
||||
{ 0x01, 0x00, 0xff, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Lower Non-critical going low " },
|
||||
{ 0x01, 0x01, 0xff, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Lower Non-critical going high" },
|
||||
{ 0x01, 0x02, 0xff, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Lower Critical going low " },
|
||||
{ 0x01, 0x03, 0xff, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Lower Critical going high" },
|
||||
{ 0x01, 0x04, 0xff, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Lower Non-recoverable going low " },
|
||||
{ 0x01, 0x05, 0xff, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Lower Non-recoverable going high" },
|
||||
{ 0x01, 0x06, 0xff, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Upper Non-critical going low " },
|
||||
{ 0x01, 0x07, 0xff, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Upper Non-critical going high" },
|
||||
{ 0x01, 0x08, 0xff, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Upper Critical going low " },
|
||||
{ 0x01, 0x09, 0xff, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Upper Critical going high" },
|
||||
{ 0x01, 0x0a, 0xff, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Upper Non-recoverable going low " },
|
||||
{ 0x01, 0x0b, 0xff, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Upper Non-recoverable going high" },
|
||||
{ 0x01, 0x00, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Lower Non-critical - going low" },
|
||||
{ 0x01, 0x01, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Lower Non-critical - going high" },
|
||||
{ 0x01, 0x02, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Lower Critical - going low" },
|
||||
{ 0x01, 0x03, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Lower Critical - going high" },
|
||||
{ 0x01, 0x04, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Lower Non-recoverable - going low" },
|
||||
{ 0x01, 0x05, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Lower Non-recoverable - going high" },
|
||||
{ 0x01, 0x06, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Upper Non-critical - going low" },
|
||||
{ 0x01, 0x07, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Upper Non-critical - going high" },
|
||||
{ 0x01, 0x08, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Upper Critical - going low" },
|
||||
{ 0x01, 0x09, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Upper Critical - going high" },
|
||||
{ 0x01, 0x0a, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Upper Non-recoverable - going low" },
|
||||
{ 0x01, 0x0b, IPMI_EVENT_CLASS_THRESHOLD, "Threshold", "Upper Non-recoverable - going high" },
|
||||
/* DMI-based "usage state" States */
|
||||
{ 0x02, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Usage State", "Transition to Idle" },
|
||||
{ 0x02, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Usage State", "Transition to Active" },
|
||||
{ 0x02, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Usage State", "Transition to Busy" },
|
||||
{ 0x02, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Usage State", "Transition to Idle" },
|
||||
{ 0x02, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Usage State", "Transition to Active" },
|
||||
{ 0x02, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Usage State", "Transition to Busy" },
|
||||
/* Digital-Discrete Event States */
|
||||
{ 0x03, 0x00, 0xff, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "State Deasserted" },
|
||||
{ 0x03, 0x01, 0xff, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "State Asserted" },
|
||||
{ 0x04, 0x00, 0xff, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "Predictive Failure Deasserted" },
|
||||
{ 0x04, 0x01, 0xff, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "Predictive Failure Asserted" },
|
||||
{ 0x05, 0x00, 0xff, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "Limit Not Exceeded" },
|
||||
{ 0x05, 0x01, 0xff, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "Limit Exceeded" },
|
||||
{ 0x06, 0x00, 0xff, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "Performance Met" },
|
||||
{ 0x06, 0x01, 0xff, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "Performance Lags" },
|
||||
{ 0x03, 0x00, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "State Deasserted" },
|
||||
{ 0x03, 0x01, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "State Asserted" },
|
||||
{ 0x04, 0x00, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "Predictive Failure Deasserted" },
|
||||
{ 0x04, 0x01, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "Predictive Failure Asserted" },
|
||||
{ 0x05, 0x00, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "Limit Not Exceeded" },
|
||||
{ 0x05, 0x01, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "Limit Exceeded" },
|
||||
{ 0x06, 0x00, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "Performance Met" },
|
||||
{ 0x06, 0x01, IPMI_EVENT_CLASS_DIGITAL, "Digital State", "Performance Lags" },
|
||||
/* Severity Event States */
|
||||
{ 0x07, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to OK" },
|
||||
{ 0x07, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to Non-critical from OK" },
|
||||
{ 0x07, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to Critical from less severe" },
|
||||
{ 0x07, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to Non-recoverable from less severe" },
|
||||
{ 0x07, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to Non-critical from more severe" },
|
||||
{ 0x07, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to Critical from Non-recoverable" },
|
||||
{ 0x07, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to Non-recoverable" },
|
||||
{ 0x07, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Monitor" },
|
||||
{ 0x07, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Informational" },
|
||||
{ 0x07, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to OK" },
|
||||
{ 0x07, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to Non-critial from OK" },
|
||||
{ 0x07, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to Critical from less severe" },
|
||||
{ 0x07, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to Non-recoverable from less severe" },
|
||||
{ 0x07, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to Non-critical from more severe" },
|
||||
{ 0x07, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to Critical from Non-recoverable" },
|
||||
{ 0x07, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Transition to Non-recoverable" },
|
||||
{ 0x07, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Monitor" },
|
||||
{ 0x07, 0x08, IPMI_EVENT_CLASS_DISCRETE, "Severity State", "Informational" },
|
||||
/* Availability Status States */
|
||||
{ 0x08, 0x00, 0xff, IPMI_EVENT_CLASS_DIGITAL, "Availability State", "Device Absent" },
|
||||
{ 0x08, 0x01, 0xff, IPMI_EVENT_CLASS_DIGITAL, "Availability State", "Device Present" },
|
||||
{ 0x09, 0x00, 0xff, IPMI_EVENT_CLASS_DIGITAL, "Availability State", "Device Disabled" },
|
||||
{ 0x09, 0x01, 0xff, IPMI_EVENT_CLASS_DIGITAL, "Availability State", "Device Enabled" },
|
||||
{ 0x0a, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to Running" },
|
||||
{ 0x0a, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to In Test" },
|
||||
{ 0x0a, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to Power Off" },
|
||||
{ 0x0a, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to On Line" },
|
||||
{ 0x0a, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to Off Line" },
|
||||
{ 0x0a, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to Off Duty" },
|
||||
{ 0x0a, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to Degraded" },
|
||||
{ 0x0a, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to Power Save" },
|
||||
{ 0x0a, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Install Error" },
|
||||
{ 0x08, 0x00, IPMI_EVENT_CLASS_DIGITAL, "Availability State", "Device Removed/Absent" },
|
||||
{ 0x08, 0x01, IPMI_EVENT_CLASS_DIGITAL, "Availability State", "Device Inserted/Present" },
|
||||
{ 0x09, 0x00, IPMI_EVENT_CLASS_DIGITAL, "Availability State", "Device Disabled" },
|
||||
{ 0x09, 0x01, IPMI_EVENT_CLASS_DIGITAL, "Availability State", "Device Enabled" },
|
||||
{ 0x0a, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to Running" },
|
||||
{ 0x0a, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to In Test" },
|
||||
{ 0x0a, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to Power Off" },
|
||||
{ 0x0a, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to On Line" },
|
||||
{ 0x0a, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to Off Line" },
|
||||
{ 0x0a, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to Off Duty" },
|
||||
{ 0x0a, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to Degraded" },
|
||||
{ 0x0a, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Transition to Power Save" },
|
||||
{ 0x0a, 0x08, IPMI_EVENT_CLASS_DISCRETE, "Availability State", "Install Error" },
|
||||
/* Redundancy States */
|
||||
{ 0x0b, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Fully Redundant" },
|
||||
{ 0x0b, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Redundancy Lost" },
|
||||
{ 0x0b, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Redundancy Degraded" },
|
||||
{ 0x0b, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Non-Redundant: Sufficient from Redundant" },
|
||||
{ 0x0b, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Non-Redundant: Sufficient from Insufficient" },
|
||||
{ 0x0b, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Non-Redundant: Insufficient Resources" },
|
||||
{ 0x0b, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Redundancy Degraded from Fully Redundant" },
|
||||
{ 0x0b, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Redundancy Degraded from Non-Redundant" },
|
||||
{ 0x0b, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Fully Redundant" },
|
||||
{ 0x0b, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Redundancy Lost" },
|
||||
{ 0x0b, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Redundancy Degraded" },
|
||||
{ 0x0b, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Non-Redundant: Sufficient from Redundant" },
|
||||
{ 0x0b, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Non-Redundant: Sufficient from Insufficient" },
|
||||
{ 0x0b, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Non-Redundant: Insufficient Resources" },
|
||||
{ 0x0b, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Redundancy Degraded from Fully Redundant" },
|
||||
{ 0x0b, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Redundancy State", "Redundancy Degraded from Non-Redundant" },
|
||||
/* ACPI Device Power States */
|
||||
{ 0x0c, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "ACPI Device Power State", "D0 Power State" },
|
||||
{ 0x0c, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "ACPI Device Power State", "D1 Power State" },
|
||||
{ 0x0c, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "ACPI Device Power State", "D2 Power State" },
|
||||
{ 0x0c, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "ACPI Device Power State", "D3 Power State" },
|
||||
{ 0x0c, 0x00, IPMI_EVENT_CLASS_DISCRETE, "ACPI Device Power State", "D0 Power State" },
|
||||
{ 0x0c, 0x01, IPMI_EVENT_CLASS_DISCRETE, "ACPI Device Power State", "D1 Power State" },
|
||||
{ 0x0c, 0x02, IPMI_EVENT_CLASS_DISCRETE, "ACPI Device Power State", "D2 Power State" },
|
||||
{ 0x0c, 0x03, IPMI_EVENT_CLASS_DISCRETE, "ACPI Device Power State", "D3 Power State" },
|
||||
/* END */
|
||||
{ 0x00, 0x00, 0xff, 0x00, NULL, NULL },
|
||||
{ 0x00, 0x00, 0x00, NULL, NULL },
|
||||
};
|
||||
|
||||
static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unused)) = {
|
||||
{ 0x00, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Reserved", NULL },
|
||||
{ 0x01, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Temperature", NULL },
|
||||
{ 0x02, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Voltage", NULL },
|
||||
{ 0x03, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Current", NULL },
|
||||
{ 0x04, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Fan", NULL },
|
||||
{ 0x00, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Reserved", NULL },
|
||||
{ 0x01, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Temperature", NULL },
|
||||
{ 0x02, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Voltage", NULL },
|
||||
{ 0x03, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Current", NULL },
|
||||
{ 0x04, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Fan", NULL },
|
||||
|
||||
{ 0x05, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "General Chassis intrusion" },
|
||||
{ 0x05, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "Drive Bay intrusion" },
|
||||
{ 0x05, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "I/O Card area intrusion" },
|
||||
{ 0x05, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "Processor area intrusion" },
|
||||
{ 0x05, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "System unplugged from LAN" },
|
||||
{ 0x05, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "Unauthorized dock" },
|
||||
{ 0x05, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "FAN area intrusion" },
|
||||
{ 0x05, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "General Chassis intrusion" },
|
||||
{ 0x05, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "Drive Bay intrusion" },
|
||||
{ 0x05, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "I/O Card area intrusion" },
|
||||
{ 0x05, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "Processor area intrusion" },
|
||||
{ 0x05, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "System unplugged from LAN" },
|
||||
{ 0x05, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "Unauthorized dock/undock" },
|
||||
{ 0x05, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Physical Security", "FAN area intrusion" },
|
||||
|
||||
{ 0x06, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Platform Security", "Front Panel Lockout violation attempted" },
|
||||
{ 0x06, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Platform Security", "Pre-boot password violation - user password" },
|
||||
{ 0x06, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Platform Security", "Pre-boot password violation - setup password" },
|
||||
{ 0x06, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Platform Security", "Pre-boot password violation - network boot password" },
|
||||
{ 0x06, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Platform Security", "Other pre-boot password violation" },
|
||||
{ 0x06, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Platform Security", "Out-of-band access password violation" },
|
||||
{ 0x06, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Platform Security", "Front Panel Lockout violation attempted" },
|
||||
{ 0x06, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Platform Security", "Pre-boot password viiolation - user password" },
|
||||
{ 0x06, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Platform Security", "Pre-boot password violation - setup password" },
|
||||
{ 0x06, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Platform Security", "Pre-boot password violation - network boot password" },
|
||||
{ 0x06, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Platform Security", "Other pre-boot password violation" },
|
||||
{ 0x06, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Platform Security", "Out-of-band access password violation" },
|
||||
|
||||
{ 0x07, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "IERR" },
|
||||
{ 0x07, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Thermal Trip" },
|
||||
{ 0x07, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "FRB1/BIST failure" },
|
||||
{ 0x07, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "FRB2/Hang in POST failure" },
|
||||
{ 0x07, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "FRB3/Processor startup/init failure" },
|
||||
{ 0x07, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Configuration Error" },
|
||||
{ 0x07, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "SM BIOS Uncorrectable CPU-complex Error" },
|
||||
{ 0x07, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Presence detected" },
|
||||
{ 0x07, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Disabled" },
|
||||
{ 0x07, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Terminator presence detected" },
|
||||
{ 0x07, 0x0a, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Throttled" },
|
||||
{ 0x07, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Processor", "IERR" },
|
||||
{ 0x07, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Thermal Trip" },
|
||||
{ 0x07, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Processor", "FRB1/BIST failure" },
|
||||
{ 0x07, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Processor", "FRB2/Hang in POST failure" },
|
||||
{ 0x07, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Processor", "FRB3/Processor startup/init failure" },
|
||||
{ 0x07, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Configuration Error" },
|
||||
{ 0x07, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Processor", "SM BIOS Uncorrectable CPU-complex Error" },
|
||||
{ 0x07, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Presence detected" },
|
||||
{ 0x07, 0x08, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Disabled" },
|
||||
{ 0x07, 0x09, IPMI_EVENT_CLASS_DISCRETE, "Processor", "Terminator presence detected" },
|
||||
|
||||
{ 0x08, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Presence detected" },
|
||||
{ 0x08, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Failure detected" },
|
||||
{ 0x08, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Predictive failure" },
|
||||
{ 0x08, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Power Supply AC lost" },
|
||||
{ 0x08, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "AC lost or out-of-range" },
|
||||
{ 0x08, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "AC out-of-range, but present" },
|
||||
{ 0x08, 0x06, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error: Vendor Mismatch" },
|
||||
{ 0x08, 0x06, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error: Revision Mismatch" },
|
||||
{ 0x08, 0x06, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error: Processor Missing" },
|
||||
{ 0x08, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Config Error" },
|
||||
{ 0x08, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Presence detected" },
|
||||
{ 0x08, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Failure detected" },
|
||||
{ 0x08, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Predictive failure" },
|
||||
{ 0x08, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "Power Supply AC lost" },
|
||||
{ 0x08, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "AC lost or out-of-range" },
|
||||
{ 0x08, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Power Supply", "AC out-of-range, but present" },
|
||||
|
||||
{ 0x09, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Power off/down" },
|
||||
{ 0x09, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Power cycle" },
|
||||
{ 0x09, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "240VA power down" },
|
||||
{ 0x09, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Interlock power down" },
|
||||
{ 0x09, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "AC lost" },
|
||||
{ 0x09, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Soft-power control failure" },
|
||||
{ 0x09, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Failure detected" },
|
||||
{ 0x09, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Predictive failure" },
|
||||
{ 0x09, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Power off/down" },
|
||||
{ 0x09, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Power cycle" },
|
||||
{ 0x09, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "240VA power down" },
|
||||
{ 0x09, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Interlock power down" },
|
||||
{ 0x09, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "AC lost" },
|
||||
{ 0x09, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Soft-power control failure" },
|
||||
{ 0x09, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Failure detected" },
|
||||
{ 0x09, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Power Unit", "Predictive failure" },
|
||||
|
||||
{ 0x0a, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Cooling Device", NULL },
|
||||
{ 0x0b, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Other Units-based Sensor", NULL },
|
||||
{ 0x0a, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Cooling Device", NULL },
|
||||
{ 0x0b, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Other Units-based Sensor", NULL },
|
||||
|
||||
{ 0x0c, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Correctable ECC" },
|
||||
{ 0x0c, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Uncorrectable ECC" },
|
||||
{ 0x0c, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Parity" },
|
||||
{ 0x0c, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Memory Scrub Failed" },
|
||||
{ 0x0c, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Memory Device Disabled" },
|
||||
{ 0x0c, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Correctable ECC logging limit reached" },
|
||||
{ 0x0c, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Presence Detected" },
|
||||
{ 0x0c, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Configuration Error" },
|
||||
{ 0x0c, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Spare" },
|
||||
{ 0x0c, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Throttled" },
|
||||
{ 0x0c, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Correctable ECC" },
|
||||
{ 0x0c, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Uncorrectable ECC" },
|
||||
{ 0x0c, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Parity" },
|
||||
{ 0x0c, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Memory Scrub Failed" },
|
||||
{ 0x0c, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Memory Device Disabled" },
|
||||
{ 0x0c, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Memory", "Correctable ECC logging limit reached" },
|
||||
|
||||
{ 0x0d, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "Drive Present" },
|
||||
{ 0x0d, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "Drive Fault" },
|
||||
{ 0x0d, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "Predictive Failure" },
|
||||
{ 0x0d, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "Hot Spare" },
|
||||
{ 0x0d, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "Parity Check In Progress" },
|
||||
{ 0x0d, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "In Critical Array" },
|
||||
{ 0x0d, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "In Failed Array" },
|
||||
{ 0x0d, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "Rebuild In Progress" },
|
||||
{ 0x0d, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", "Rebuild Aborted" },
|
||||
{ 0x0d, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Drive Slot", NULL },
|
||||
{ 0x0e, 0x00, IPMI_EVENT_CLASS_DISCRETE, "POST Memory Resize", NULL },
|
||||
|
||||
{ 0x0e, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "POST Memory Resize", NULL },
|
||||
{ 0x0f, 0x00, IPMI_EVENT_CLASS_DISCRETE, "System Firmware", "Error" },
|
||||
{ 0x0f, 0x01, IPMI_EVENT_CLASS_DISCRETE, "System Firmware", "Hang" },
|
||||
{ 0x0f, 0x02, IPMI_EVENT_CLASS_DISCRETE, "System Firmware", "Progress" },
|
||||
|
||||
{ 0x0f, 0x00, 0x00, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "Unspecified" },
|
||||
{ 0x0f, 0x00, 0x01, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "No system memory installed" },
|
||||
{ 0x0f, 0x00, 0x02, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "No usable system memory" },
|
||||
{ 0x0f, 0x00, 0x03, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "Unrecoverable IDE device failure" },
|
||||
{ 0x0f, 0x00, 0x04, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "Unrecoverable system-board failure" },
|
||||
{ 0x0f, 0x00, 0x05, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "Unrecoverable diskette failure" },
|
||||
{ 0x0f, 0x00, 0x06, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "Unrecoverable hard-disk controller failure" },
|
||||
{ 0x0f, 0x00, 0x07, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "Unrecoverable PS/2 or USB keyboard failure" },
|
||||
{ 0x0f, 0x00, 0x08, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "Removable boot media not found" },
|
||||
{ 0x0f, 0x00, 0x09, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "Unrecoverable video controller failure" },
|
||||
{ 0x0f, 0x00, 0x0a, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "No video device selected" },
|
||||
{ 0x0f, 0x00, 0x0b, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "BIOS corruption detected" },
|
||||
{ 0x0f, 0x00, 0x0c, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "CPU voltage mismatch" },
|
||||
{ 0x0f, 0x00, 0x0d, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "CPU speed mismatch failure" },
|
||||
{ 0x0f, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Error", "Unknown Error" },
|
||||
{ 0x10, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Event Logging Disabled", "Correctable memory error logging disabled" },
|
||||
{ 0x10, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Event Logging Disabled", "Event logging disabled" },
|
||||
{ 0x10, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Event Logging Disabled", "Log area reset/cleared" },
|
||||
{ 0x10, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Event Logging Disabled", "All event logging disabled" },
|
||||
|
||||
{ 0x0f, 0x01, 0x00, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Unspecified" },
|
||||
{ 0x0f, 0x01, 0x01, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Memory initialization" },
|
||||
{ 0x0f, 0x01, 0x02, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Hard-disk initialization" },
|
||||
{ 0x0f, 0x01, 0x03, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Secondary CPU Initialization" },
|
||||
{ 0x0f, 0x01, 0x04, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "User authentication" },
|
||||
{ 0x0f, 0x01, 0x05, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "User-initiated system setup" },
|
||||
{ 0x0f, 0x01, 0x06, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "USB resource configuration" },
|
||||
{ 0x0f, 0x01, 0x07, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "PCI resource configuration" },
|
||||
{ 0x0f, 0x01, 0x08, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Option ROM initialization" },
|
||||
{ 0x0f, 0x01, 0x09, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Video initialization" },
|
||||
{ 0x0f, 0x01, 0x0a, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Cache initialization" },
|
||||
{ 0x0f, 0x01, 0x0b, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "SMBus initialization" },
|
||||
{ 0x0f, 0x01, 0x0c, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Keyboard controller initialization" },
|
||||
{ 0x0f, 0x01, 0x0d, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Management controller initialization" },
|
||||
{ 0x0f, 0x01, 0x0e, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Docking station attachment" },
|
||||
{ 0x0f, 0x01, 0x0f, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Enabling docking station" },
|
||||
{ 0x0f, 0x01, 0x10, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Docking station ejection" },
|
||||
{ 0x0f, 0x01, 0x11, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Disabling docking station" },
|
||||
{ 0x0f, 0x01, 0x12, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Calling operating system wake-up vector" },
|
||||
{ 0x0f, 0x01, 0x13, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "System boot initiated" },
|
||||
{ 0x0f, 0x01, 0x14, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Motherboard initialization" },
|
||||
{ 0x0f, 0x01, 0x15, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "reserved" },
|
||||
{ 0x0f, 0x01, 0x16, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Floppy initialization" },
|
||||
{ 0x0f, 0x01, 0x17, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Keyboard test" },
|
||||
{ 0x0f, 0x01, 0x18, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Pointing device test" },
|
||||
{ 0x0f, 0x01, 0x19, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Primary CPU initialization" },
|
||||
{ 0x0f, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Hang", "Unknown Hang" },
|
||||
{ 0x11, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "BIOS Reset" },
|
||||
{ 0x11, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS Reset" },
|
||||
{ 0x11, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS Shut Down" },
|
||||
{ 0x11, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS Power Down" },
|
||||
{ 0x11, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS Power Cycle" },
|
||||
{ 0x11, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS NMI/diag Interrupt" },
|
||||
{ 0x11, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS Expired" },
|
||||
{ 0x11, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS pre-timeout Interrupt" },
|
||||
|
||||
{ 0x0f, 0x02, 0x00, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Unspecified" },
|
||||
{ 0x0f, 0x02, 0x01, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Memory initialization" },
|
||||
{ 0x0f, 0x02, 0x02, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Hard-disk initialization" },
|
||||
{ 0x0f, 0x02, 0x03, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Secondary CPU Initialization" },
|
||||
{ 0x0f, 0x02, 0x04, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "User authentication" },
|
||||
{ 0x0f, 0x02, 0x05, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "User-initiated system setup" },
|
||||
{ 0x0f, 0x02, 0x06, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "USB resource configuration" },
|
||||
{ 0x0f, 0x02, 0x07, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "PCI resource configuration" },
|
||||
{ 0x0f, 0x02, 0x08, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Option ROM initialization" },
|
||||
{ 0x0f, 0x02, 0x09, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Video initialization" },
|
||||
{ 0x0f, 0x02, 0x0a, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Cache initialization" },
|
||||
{ 0x0f, 0x02, 0x0b, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "SMBus initialization" },
|
||||
{ 0x0f, 0x02, 0x0c, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Keyboard controller initialization" },
|
||||
{ 0x0f, 0x02, 0x0d, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Management controller initialization" },
|
||||
{ 0x0f, 0x02, 0x0e, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Docking station attachment" },
|
||||
{ 0x0f, 0x02, 0x0f, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Enabling docking station" },
|
||||
{ 0x0f, 0x02, 0x10, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Docking station ejection" },
|
||||
{ 0x0f, 0x02, 0x11, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Disabling docking station" },
|
||||
{ 0x0f, 0x02, 0x12, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Calling operating system wake-up vector" },
|
||||
{ 0x0f, 0x02, 0x13, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "System boot initiated" },
|
||||
{ 0x0f, 0x02, 0x14, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Motherboard initialization" },
|
||||
{ 0x0f, 0x02, 0x15, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "reserved" },
|
||||
{ 0x0f, 0x02, 0x16, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Floppy initialization" },
|
||||
{ 0x0f, 0x02, 0x17, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Keyboard test" },
|
||||
{ 0x0f, 0x02, 0x18, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Pointing device test" },
|
||||
{ 0x0f, 0x02, 0x19, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Primary CPU initialization" },
|
||||
{ 0x0f, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Firmware Progress", "Unknown Progress" },
|
||||
{ 0x12, 0x00, IPMI_EVENT_CLASS_DISCRETE, "System Event", "System Reconfigured" },
|
||||
{ 0x12, 0x01, IPMI_EVENT_CLASS_DISCRETE, "System Event", "OEM System boot event" },
|
||||
{ 0x12, 0x02, IPMI_EVENT_CLASS_DISCRETE, "System Event", "Undetermined system hardware failure" },
|
||||
{ 0x12, 0x03, IPMI_EVENT_CLASS_DISCRETE, "System Event", "Entry added to auxillary log" },
|
||||
{ 0x12, 0x04, IPMI_EVENT_CLASS_DISCRETE, "System Event", "PEF Action" },
|
||||
{ 0x12, 0x05, IPMI_EVENT_CLASS_DISCRETE, "System Event", "Timestamp Clock Sync." },
|
||||
|
||||
{ 0x10, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Event Logging Disabled", "Correctable memory error logging disabled" },
|
||||
{ 0x10, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Event Logging Disabled", "Event logging disabled" },
|
||||
{ 0x10, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Event Logging Disabled", "Log area reset/cleared" },
|
||||
{ 0x10, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Event Logging Disabled", "All event logging disabled" },
|
||||
{ 0x10, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Event Logging Disabled", "Log full" },
|
||||
{ 0x10, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Event Logging Disabled", "Log almost full" },
|
||||
{ 0x13, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Front Panel NMI" },
|
||||
{ 0x13, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Timeout" },
|
||||
{ 0x13, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "I/O Channel check NMI" },
|
||||
{ 0x13, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Software NMI" },
|
||||
{ 0x13, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "PCI PERR" },
|
||||
{ 0x13, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "PCI SERR" },
|
||||
{ 0x13, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "EISA failsafe timeout" },
|
||||
{ 0x13, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Correctable error" },
|
||||
{ 0x13, 0x08, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Uncorrectable error" },
|
||||
{ 0x13, 0x09, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Fatal NMI" },
|
||||
|
||||
{ 0x11, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "BIOS Reset" },
|
||||
{ 0x11, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS Reset" },
|
||||
{ 0x11, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS Shut Down" },
|
||||
{ 0x11, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS Power Down" },
|
||||
{ 0x11, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS Power Cycle" },
|
||||
{ 0x11, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS NMI/Diag Interrupt" },
|
||||
{ 0x11, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS Expired" },
|
||||
{ 0x11, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 1", "OS pre-timeout Interrupt" },
|
||||
{ 0x14, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Button", "Power Button pressed" },
|
||||
{ 0x14, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Button", "Sleep Button pressed" },
|
||||
{ 0x14, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Button", "Reset Button pressed" },
|
||||
|
||||
{ 0x12, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Event", "System Reconfigured" },
|
||||
{ 0x12, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Event", "OEM System boot event" },
|
||||
{ 0x12, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Event", "Undetermined system hardware failure" },
|
||||
{ 0x12, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Event", "Entry added to auxiliary log" },
|
||||
{ 0x12, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Event", "PEF Action" },
|
||||
{ 0x12, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Event", "Timestamp Clock Sync" },
|
||||
{ 0x15, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Module/Board", NULL },
|
||||
{ 0x16, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Microcontroller/Coprocessor", NULL },
|
||||
{ 0x17, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Add-in Card", NULL },
|
||||
{ 0x18, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Chassis", NULL },
|
||||
{ 0x19, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Chip Set", NULL },
|
||||
{ 0x1a, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Other FRU", NULL },
|
||||
{ 0x1b, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Cable/Interconnect", NULL },
|
||||
{ 0x1c, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Terminator", NULL },
|
||||
|
||||
{ 0x13, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "NMI/Diag Interrupt" },
|
||||
{ 0x13, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Timeout" },
|
||||
{ 0x13, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "I/O Channel check NMI" },
|
||||
{ 0x13, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Software NMI" },
|
||||
{ 0x13, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "PCI PERR" },
|
||||
{ 0x13, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "PCI SERR" },
|
||||
{ 0x13, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "EISA failsafe timeout" },
|
||||
{ 0x13, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Correctable error" },
|
||||
{ 0x13, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Uncorrectable error" },
|
||||
{ 0x13, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Fatal NMI" },
|
||||
{ 0x13, 0x0a, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Critical Interrupt", "Bus Fatal Error" },
|
||||
{ 0x1d, 0x00, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "Initiated by power up" },
|
||||
{ 0x1d, 0x01, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "Initiated by hard reset" },
|
||||
{ 0x1d, 0x02, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "Initiated by warm reset" },
|
||||
{ 0x1d, 0x03, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "User requested PXE boot" },
|
||||
{ 0x1d, 0x04, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "Automatic boot to diagnostic" },
|
||||
|
||||
{ 0x14, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Button", "Power Button pressed" },
|
||||
{ 0x14, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Button", "Sleep Button pressed" },
|
||||
{ 0x14, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Button", "Reset Button pressed" },
|
||||
{ 0x14, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Button", "FRU Latch" },
|
||||
{ 0x14, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Button", "FRU Service" },
|
||||
{ 0x1e, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Boot Error", "No bootable media" },
|
||||
{ 0x1e, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Boot Error", "Non-bootable disk in drive" },
|
||||
{ 0x1e, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Boot Error", "PXE server not found" },
|
||||
{ 0x1e, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Boot Error", "Invalid boot sector" },
|
||||
{ 0x1e, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Boot Error", "Timeout waiting for selection" },
|
||||
|
||||
{ 0x15, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Module/Board", NULL },
|
||||
{ 0x16, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Microcontroller/Coprocessor", NULL },
|
||||
{ 0x17, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Add-in Card", NULL },
|
||||
{ 0x18, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Chassis", NULL },
|
||||
{ 0x19, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Chip Set", NULL },
|
||||
{ 0x1a, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Other FRU", NULL },
|
||||
{ 0x1f, 0x00, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "A: boot completed" },
|
||||
{ 0x1f, 0x01, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "C: boot completed" },
|
||||
{ 0x1f, 0x02, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "PXE boot completed" },
|
||||
{ 0x1f, 0x03, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "Diagnostic boot completed" },
|
||||
{ 0x1f, 0x04, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "CD-ROM boot completed" },
|
||||
{ 0x1f, 0x05, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "ROM boot completed" },
|
||||
{ 0x1f, 0x06, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "boot completed - device not specified" },
|
||||
|
||||
{ 0x1b, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Cable/Interconnect", "Connected" },
|
||||
{ 0x1b, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Cable/Interconnect", "Config Error" },
|
||||
{ 0x20, 0x00, IPMI_EVENT_CLASS_DISCRETE, "OS Critical Stop", "Stop during OS load/init" },
|
||||
{ 0x20, 0x01, IPMI_EVENT_CLASS_DISCRETE, "OS Critical Stop", "Run-time stop" },
|
||||
|
||||
{ 0x1c, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Terminator", NULL },
|
||||
{ 0x21, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Fault Status asserted" },
|
||||
{ 0x21, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Identify Status asserted" },
|
||||
{ 0x21, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Slot/Connector Device installed/attached" },
|
||||
{ 0x21, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Slot/Connector ready for device installation" },
|
||||
{ 0x21, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Slot/Connector ready for device removal" },
|
||||
{ 0x21, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Slot Power is off" },
|
||||
{ 0x21, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Slot/Connector device removal request" },
|
||||
{ 0x21, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Interlock asserted" },
|
||||
{ 0x21, 0x08, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Slot is disabled" },
|
||||
|
||||
{ 0x1d, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "Initiated by power up" },
|
||||
{ 0x1d, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "Initiated by hard reset" },
|
||||
{ 0x1d, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "Initiated by warm reset" },
|
||||
{ 0x1d, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "User requested PXE boot" },
|
||||
{ 0x1d, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "Automatic boot to diagnostic" },
|
||||
{ 0x1d, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "OS initiated hard reset" },
|
||||
{ 0x1d, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "OS initiated warm reset" },
|
||||
{ 0x1d, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System Boot Initiated", "System Restart" },
|
||||
{ 0x22, 0x00, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S0/G0: working" },
|
||||
{ 0x22, 0x01, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S1: sleeping with system hw & processor context maintained" },
|
||||
{ 0x22, 0x02, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S2: sleeping, processor context lost" },
|
||||
{ 0x22, 0x03, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S3: sleeping, processor & hw context lost, memory retained" },
|
||||
{ 0x22, 0x04, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S4: non-volatile sleep/suspend-to-disk" },
|
||||
{ 0x22, 0x05, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S5/G2: soft-off" },
|
||||
{ 0x22, 0x06, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S4/S5: soft-off" },
|
||||
{ 0x22, 0x07, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "G3: mechanical off" },
|
||||
{ 0x22, 0x08, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "Sleeping in S1/S2/S3 state" },
|
||||
{ 0x22, 0x09, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "G1: sleeping" },
|
||||
{ 0x22, 0x0a, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S5: entered by override" },
|
||||
{ 0x22, 0x0b, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "Legacy ON state" },
|
||||
{ 0x22, 0x0c, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "Legacy OFF state" },
|
||||
{ 0x22, 0x0e, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "Unknown" },
|
||||
|
||||
{ 0x1e, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Boot Error", "No bootable media" },
|
||||
{ 0x1e, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Boot Error", "Non-bootable disk in drive" },
|
||||
{ 0x1e, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Boot Error", "PXE server not found" },
|
||||
{ 0x1e, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Boot Error", "Invalid boot sector" },
|
||||
{ 0x1e, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Boot Error", "Timeout waiting for selection" },
|
||||
{ 0x23, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "Timer expired" },
|
||||
{ 0x23, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "Hard reset" },
|
||||
{ 0x23, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "Power down" },
|
||||
{ 0x23, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "Power cycle" },
|
||||
{ 0x23, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "reserved" },
|
||||
{ 0x23, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "reserved" },
|
||||
{ 0x23, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "reserved" },
|
||||
{ 0x23, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "reserved" },
|
||||
{ 0x23, 0x08, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "Timer interrupt" },
|
||||
|
||||
{ 0x1f, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "A: boot completed" },
|
||||
{ 0x1f, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "C: boot completed" },
|
||||
{ 0x1f, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "PXE boot completed" },
|
||||
{ 0x1f, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "Diagnostic boot completed" },
|
||||
{ 0x1f, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "CD-ROM boot completed" },
|
||||
{ 0x1f, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "ROM boot completed" },
|
||||
{ 0x1f, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Boot", "boot completed - device not specified" },
|
||||
{ 0x24, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Platform Alert", "Platform generated page" },
|
||||
{ 0x24, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Platform Alert", "Platform generated LAN alert" },
|
||||
{ 0x24, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Platform Alert", "Platform Event Trap generated" },
|
||||
{ 0x24, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Platform Alert", "Platform generated SNMP trap, OEM format" },
|
||||
|
||||
{ 0x20, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Stop/Shutdown", "Error during system startup" },
|
||||
{ 0x20, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Stop/Shutdown", "Run-time critical stop" },
|
||||
{ 0x20, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Stop/Shutdown", "OS graceful stop" },
|
||||
{ 0x20, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Stop/Shutdown", "OS graceful shutdown" },
|
||||
{ 0x20, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Stop/Shutdown", "PEF initiated soft shutdown" },
|
||||
{ 0x20, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "OS Stop/Shutdown", "Agent not responding" },
|
||||
{ 0x25, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Entity Presence", "Present" },
|
||||
{ 0x25, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Entity Presence", "Absent" },
|
||||
{ 0x25, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Entity Presence", "Disabled" },
|
||||
|
||||
{ 0x21, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Fault Status" },
|
||||
{ 0x21, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Identify Status" },
|
||||
{ 0x21, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Device Installed" },
|
||||
{ 0x21, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Ready for Device Installation" },
|
||||
{ 0x21, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Ready for Device Removal" },
|
||||
{ 0x21, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Slot Power is Off" },
|
||||
{ 0x21, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Device Removal Request" },
|
||||
{ 0x21, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Interlock" },
|
||||
{ 0x21, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Slot is Disabled" },
|
||||
{ 0x21, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Slot/Connector", "Spare Device" },
|
||||
{ 0x26, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Monitor ASIC/IC", NULL },
|
||||
|
||||
{ 0x22, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S0/G0: working" },
|
||||
{ 0x22, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S1: sleeping with system hw & processor context maintained" },
|
||||
{ 0x22, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S2: sleeping, processor context lost" },
|
||||
{ 0x22, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S3: sleeping, processor & hw context lost, memory retained" },
|
||||
{ 0x22, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S4: non-volatile sleep/suspend-to-disk" },
|
||||
{ 0x22, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S5/G2: soft-off" },
|
||||
{ 0x22, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S4/S5: soft-off" },
|
||||
{ 0x22, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "G3: mechanical off" },
|
||||
{ 0x22, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "Sleeping in S1/S2/S3 state" },
|
||||
{ 0x22, 0x09, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "G1: sleeping" },
|
||||
{ 0x22, 0x0a, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "S5: entered by override" },
|
||||
{ 0x22, 0x0b, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "Legacy ON state" },
|
||||
{ 0x22, 0x0c, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "Legacy OFF state" },
|
||||
{ 0x22, 0x0e, 0xff, IPMI_EVENT_CLASS_DISCRETE, "System ACPI Power State", "Unknown" },
|
||||
{ 0x27, 0x00, IPMI_EVENT_CLASS_DISCRETE, "LAN", "Heartbeat Lost" },
|
||||
{ 0x27, 0x01, IPMI_EVENT_CLASS_DISCRETE, "LAN", "Heartbeat" },
|
||||
|
||||
{ 0x23, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "Timer expired" },
|
||||
{ 0x23, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "Hard reset" },
|
||||
{ 0x23, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "Power down" },
|
||||
{ 0x23, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "Power cycle" },
|
||||
{ 0x23, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "reserved" },
|
||||
{ 0x23, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "reserved" },
|
||||
{ 0x23, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "reserved" },
|
||||
{ 0x23, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "reserved" },
|
||||
{ 0x23, 0x08, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Watchdog 2", "Timer interrupt" },
|
||||
{ 0x28, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Management Subsystem Health", "Sensor access degraded or unavailable" },
|
||||
{ 0x28, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Management Subsystem Health", "Controller access degraded or unavailable" },
|
||||
{ 0x28, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Management Subsystem Health", "Management controller off-line" },
|
||||
{ 0x28, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Management Subsystem Health", "Management controller unavailable" },
|
||||
|
||||
{ 0x24, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Platform Alert", "Platform generated page" },
|
||||
{ 0x24, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Platform Alert", "Platform generated LAN alert" },
|
||||
{ 0x24, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Platform Alert", "Platform Event Trap generated" },
|
||||
{ 0x24, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Platform Alert", "Platform generated SNMP trap, OEM format" },
|
||||
{ 0x29, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Battery", "Low" },
|
||||
{ 0x29, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Battery", "Failed" },
|
||||
{ 0x29, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Battery", "Presence Detected" },
|
||||
|
||||
{ 0x25, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Entity Presence", "Present" },
|
||||
{ 0x25, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Entity Presence", "Absent" },
|
||||
{ 0x25, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Entity Presence", "Disabled" },
|
||||
|
||||
{ 0x26, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Monitor ASIC/IC", NULL },
|
||||
|
||||
{ 0x27, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "LAN", "Heartbeat Lost" },
|
||||
{ 0x27, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "LAN", "Heartbeat" },
|
||||
|
||||
{ 0x28, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Management Subsystem Health", "Sensor access degraded or unavailable" },
|
||||
{ 0x28, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Management Subsystem Health", "Controller access degraded or unavailable" },
|
||||
{ 0x28, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Management Subsystem Health", "Management controller off-line" },
|
||||
{ 0x28, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Management Subsystem Health", "Management controller unavailable" },
|
||||
{ 0x28, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Management Subsystem Health", "Sensor failure" },
|
||||
{ 0x28, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Management Subsystem Health", "FRU failure" },
|
||||
|
||||
{ 0x29, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Battery", "Low" },
|
||||
{ 0x29, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Battery", "Failed" },
|
||||
{ 0x29, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Battery", "Presence Detected" },
|
||||
|
||||
{ 0x2b, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Hardware change detected" },
|
||||
{ 0x2b, 0x01, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected" },
|
||||
{ 0x2b, 0x01, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Dev Id" },
|
||||
{ 0x2b, 0x01, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Firm Rev" },
|
||||
{ 0x2b, 0x01, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Dev Rev" },
|
||||
{ 0x2b, 0x01, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Manuf Id" },
|
||||
{ 0x2b, 0x01, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl IPMI Vers" },
|
||||
{ 0x2b, 0x01, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Aux Firm Id" },
|
||||
{ 0x2b, 0x01, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Firm Boot Block" },
|
||||
{ 0x2b, 0x01, 0x08, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt Ctrl Other" },
|
||||
{ 0x2b, 0x01, 0x09, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, BIOS/EFI change" },
|
||||
{ 0x2b, 0x01, 0x0A, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, SMBIOS change" },
|
||||
{ 0x2b, 0x01, 0x0B, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, O/S change" },
|
||||
{ 0x2b, 0x01, 0x0C, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, O/S loader change" },
|
||||
{ 0x2b, 0x01, 0x0D, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Service Diag change" },
|
||||
{ 0x2b, 0x01, 0x0E, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt SW agent change" },
|
||||
{ 0x2b, 0x01, 0x0F, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt SW App change" },
|
||||
{ 0x2b, 0x01, 0x10, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Mngmt SW Middle" },
|
||||
{ 0x2b, 0x01, 0x11, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, Prog HW Change (FPGA)" },
|
||||
{ 0x2b, 0x01, 0x12, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, board/FRU module change" },
|
||||
{ 0x2b, 0x01, 0x13, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, board/FRU component change" },
|
||||
{ 0x2b, 0x01, 0x14, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, board/FRU replace equ ver" },
|
||||
{ 0x2b, 0x01, 0x15, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, board/FRU replace new ver" },
|
||||
{ 0x2b, 0x01, 0x16, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, board/FRU replace old ver" },
|
||||
{ 0x2b, 0x01, 0x17, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change detected, board/FRU HW conf change" },
|
||||
{ 0x2b, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Hardware incompatibility detected" },
|
||||
{ 0x2b, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software incompatibility detected" },
|
||||
{ 0x2b, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Invalid or unsupported hardware version" },
|
||||
{ 0x2b, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Invalid or unsupported firmware or software version" },
|
||||
{ 0x2b, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Hardware change success" },
|
||||
{ 0x2b, 0x07, 0x00, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success" },
|
||||
{ 0x2b, 0x07, 0x01, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Dev Id" },
|
||||
{ 0x2b, 0x07, 0x02, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Firm Rev" },
|
||||
{ 0x2b, 0x07, 0x03, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Dev Rev" },
|
||||
{ 0x2b, 0x07, 0x04, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Manuf Id" },
|
||||
{ 0x2b, 0x07, 0x05, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl IPMI Vers" },
|
||||
{ 0x2b, 0x07, 0x06, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Aux Firm Id" },
|
||||
{ 0x2b, 0x07, 0x07, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Firm Boot Block" },
|
||||
{ 0x2b, 0x07, 0x08, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt Ctrl Other" },
|
||||
{ 0x2b, 0x07, 0x09, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, BIOS/EFI change" },
|
||||
{ 0x2b, 0x07, 0x0A, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, SMBIOS change" },
|
||||
{ 0x2b, 0x07, 0x0B, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, O/S change" },
|
||||
{ 0x2b, 0x07, 0x0C, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, O/S loader change" },
|
||||
{ 0x2b, 0x07, 0x0D, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Service Diag change" },
|
||||
{ 0x2b, 0x07, 0x0E, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt SW agent change" },
|
||||
{ 0x2b, 0x07, 0x0F, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt SW App change" },
|
||||
{ 0x2b, 0x07, 0x10, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Mngmt SW Middle" },
|
||||
{ 0x2b, 0x07, 0x11, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, Prog HW Change (FPGA)" },
|
||||
{ 0x2b, 0x07, 0x12, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, board/FRU module change" },
|
||||
{ 0x2b, 0x07, 0x13, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, board/FRU component change" },
|
||||
{ 0x2b, 0x07, 0x14, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, board/FRU replace equ ver" },
|
||||
{ 0x2b, 0x07, 0x15, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, board/FRU replace new ver" },
|
||||
{ 0x2b, 0x07, 0x16, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, board/FRU replace old ver" },
|
||||
{ 0x2b, 0x07, 0x17, IPMI_EVENT_CLASS_DISCRETE, "Version Change", "Firmware or software change success, board/FRU HW conf change" },
|
||||
|
||||
{ 0x2c, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Not Installed" },
|
||||
{ 0x2c, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Inactive" },
|
||||
{ 0x2c, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Activation Requested" },
|
||||
{ 0x2c, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Activation in Progress" },
|
||||
{ 0x2c, 0x04, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Active" },
|
||||
{ 0x2c, 0x05, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Deactivation Requested" },
|
||||
{ 0x2c, 0x06, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Deactivation in Progress" },
|
||||
{ 0x2c, 0x07, 0xff, IPMI_EVENT_CLASS_DISCRETE, "FRU State", "Communication lost" },
|
||||
|
||||
{ 0xF0, 0x00, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M0" },
|
||||
{ 0xF0, 0x01, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M1" },
|
||||
{ 0xF0, 0x02, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M2" },
|
||||
{ 0xF0, 0x03, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M3" },
|
||||
{ 0xF0, 0x04, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M4" },
|
||||
{ 0xF0, 0x05, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M5" },
|
||||
{ 0xF0, 0x06, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M6" },
|
||||
{ 0xF0, 0x07, 0xFF, IPMI_EVENT_CLASS_DISCRETE, "FRU Hot Swap", "Transition to M7" },
|
||||
|
||||
{ 0xF1, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "IPMB-0 Status", "IPMB-A disabled, IPMB-B disabled" },
|
||||
{ 0xF1, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "IPMB-0 Status", "IPMB-A enabled, IPMB-B disabled" },
|
||||
{ 0xF1, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "IPMB-0 Status", "IPMB-A disabled, IPMB-B enabled" },
|
||||
{ 0xF1, 0x03, 0xff, IPMI_EVENT_CLASS_DISCRETE, "IPMB-0 Status", "IPMB-A enabled, IPMP-B enabled" },
|
||||
|
||||
{ 0xF2, 0x00, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Module Hot Swap", "Module Handle Closed" },
|
||||
{ 0xF2, 0x01, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Module Hot Swap", "Module Handle Opened" },
|
||||
{ 0xF2, 0x02, 0xff, IPMI_EVENT_CLASS_DISCRETE, "Module Hot Swap", "Quiesced" },
|
||||
|
||||
{ 0xC0, 0x00, 0xff, 0x00, "OEM", "OEM Specific" },
|
||||
|
||||
{ 0x00, 0x00, 0x00, 0x00, NULL, NULL },
|
||||
{ 0x00, 0x00, 0x00, NULL, NULL },
|
||||
};
|
||||
|
||||
int ipmi_sel_main(struct ipmi_intf *, int, char **);
|
||||
void ipmi_sel_print_std_entry(struct ipmi_intf * intf, struct sel_event_record * evt);
|
||||
void ipmi_sel_print_std_entry_verbose(struct ipmi_intf * intf, struct sel_event_record * evt);
|
||||
void ipmi_sel_print_extended_entry(struct ipmi_intf * intf, struct sel_event_record * evt);
|
||||
void ipmi_sel_print_extended_entry_verbose(struct ipmi_intf * intf, struct sel_event_record * evt);
|
||||
void ipmi_get_event_desc(struct ipmi_intf * intf, struct sel_event_record * rec, char ** desc);
|
||||
const char * ipmi_sel_get_sensor_type(uint8_t code);
|
||||
const char * ipmi_sel_get_sensor_type_offset(uint8_t code, uint8_t offset);
|
||||
uint16_t ipmi_sel_get_std_entry(struct ipmi_intf * intf, uint16_t id, struct sel_event_record * evt);
|
||||
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);
|
||||
void ipmi_sel_print_std_entry(int num, struct sel_event_record * evt);
|
||||
|
||||
#endif /* IPMI_SEL_H */
|
||||
|
@ -1,89 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_SENSOR_H
|
||||
#define IPMI_SENSOR_H
|
||||
|
||||
#include <math.h>
|
||||
#include <ipmitool/bswap.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_sdr.h>
|
||||
|
||||
/* threshold specification bits for analog sensors for get sensor threshold command
|
||||
* and set sensor threshold command
|
||||
*/
|
||||
#define UPPER_NON_RECOV_SPECIFIED 0x20
|
||||
#define UPPER_CRIT_SPECIFIED 0x10
|
||||
#define UPPER_NON_CRIT_SPECIFIED 0x08
|
||||
#define LOWER_NON_RECOV_SPECIFIED 0x04
|
||||
#define LOWER_CRIT_SPECIFIED 0x02
|
||||
#define LOWER_NON_CRIT_SPECIFIED 0x01
|
||||
|
||||
/* state assertion bits for discrete sensors for get sensor reading command */
|
||||
#define STATE_0_ASSERTED 0x01
|
||||
#define STATE_1_ASSERTED 0x02
|
||||
#define STATE_2_ASSERTED 0x04
|
||||
#define STATE_3_ASSERTED 0x08
|
||||
#define STATE_4_ASSERTED 0x10
|
||||
#define STATE_5_ASSERTED 0x20
|
||||
#define STATE_6_ASSERTED 0x40
|
||||
#define STATE_7_ASSERTED 0x80
|
||||
#define STATE_8_ASSERTED 0x01
|
||||
#define STATE_9_ASSERTED 0x02
|
||||
#define STATE_10_ASSERTED 0x04
|
||||
#define STATE_11_ASSERTED 0x08
|
||||
#define STATE_12_ASSERTED 0x10
|
||||
#define STATE_13_ASSERTED 0x20
|
||||
#define STATE_14_ASSERTED 0x40
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sensor_set_thresh_rq {
|
||||
uint8_t sensor_num; /* sensor # */
|
||||
uint8_t set_mask; /* threshold setting mask */
|
||||
uint8_t lower_non_crit; /* new lower non critical threshold*/
|
||||
uint8_t lower_crit; /* new lower critical threshold*/
|
||||
uint8_t lower_non_recov; /* new lower non recoverable threshold*/
|
||||
uint8_t upper_non_crit; /* new upper non critical threshold*/
|
||||
uint8_t upper_crit; /* new upper critical threshold*/
|
||||
uint8_t upper_non_recov; /* new upper non recoverable threshold*/
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
|
||||
int ipmi_sensor_main(struct ipmi_intf *, int, char **);
|
||||
int ipmi_sensor_print_fc(struct ipmi_intf *, struct sdr_record_common_sensor *, uint8_t);
|
||||
int ipmi_sensor_get_sensor_reading_factors( struct ipmi_intf * intf, struct sdr_record_full_sensor * sensor, uint8_t reading);
|
||||
#endif /* IPMI_SENSOR_H */
|
@ -1,131 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_SESSION_H
|
||||
#define IPMI_SESSION_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
#define IPMI_GET_SESSION_INFO 0x3D
|
||||
|
||||
/*
|
||||
* From table 22.25 of the IPMIv2 specification
|
||||
*/
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct get_session_info_rsp
|
||||
{
|
||||
uint8_t session_handle;
|
||||
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved1 : 2;
|
||||
uint8_t session_slot_count : 6; /* 1-based */
|
||||
#else
|
||||
uint8_t session_slot_count : 6; /* 1-based */
|
||||
uint8_t __reserved1 : 2;
|
||||
#endif
|
||||
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved2 : 2;
|
||||
uint8_t active_session_count : 6; /* 1-based */
|
||||
#else
|
||||
uint8_t active_session_count : 6; /* 1-based */
|
||||
uint8_t __reserved2 : 2;
|
||||
#endif
|
||||
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved3 : 2;
|
||||
uint8_t user_id : 6;
|
||||
#else
|
||||
uint8_t user_id : 6;
|
||||
uint8_t __reserved3 : 2;
|
||||
#endif
|
||||
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved4 : 4;
|
||||
uint8_t privilege_level : 4;
|
||||
#else
|
||||
uint8_t privilege_level : 4;
|
||||
uint8_t __reserved4 : 4;
|
||||
#endif
|
||||
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t auxiliary_data : 4;
|
||||
uint8_t channel_number : 4;
|
||||
#else
|
||||
uint8_t channel_number : 4;
|
||||
uint8_t auxiliary_data : 4;
|
||||
#endif
|
||||
|
||||
union
|
||||
{
|
||||
/* Only exists if channel type is 802.3 LAN */
|
||||
struct
|
||||
{
|
||||
uint8_t console_ip[4]; /* MSBF */
|
||||
uint8_t console_mac[6]; /* MSBF */
|
||||
uint16_t console_port; /* LSBF */
|
||||
} lan_data;
|
||||
|
||||
/* Only exists if channel type is async. serial modem */
|
||||
struct
|
||||
{
|
||||
uint8_t session_channel_activity_type;
|
||||
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved5 : 4;
|
||||
uint8_t destination_selector : 4;
|
||||
#else
|
||||
uint8_t destination_selector : 4;
|
||||
uint8_t __reserved5 : 4;
|
||||
#endif
|
||||
|
||||
uint8_t console_ip[4]; /* MSBF */
|
||||
|
||||
/* Only exists if session is PPP */
|
||||
uint16_t console_port; /* LSBF */
|
||||
} modem_data;
|
||||
} channel_data;
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int ipmi_session_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /*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_SOL_H
|
||||
@ -35,74 +39,17 @@
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
#define SOL_ESCAPE_CHARACTER_DEFAULT '~'
|
||||
#define SOL_KEEPALIVE_TIMEOUT 15
|
||||
#define SOL_KEEPALIVE_RETRIES 3
|
||||
#define ACTIVATE_SOL 0x01
|
||||
#define SET_SOL_CONFIG 0x03
|
||||
#define GET_SOL_CONFIG 0x04
|
||||
|
||||
#define IPMI_SOL_SERIAL_ALERT_MASK_SUCCEED 0x08
|
||||
#define IPMI_SOL_SERIAL_ALERT_MASK_DEFERRED 0x04
|
||||
#define IPMI_SOL_SERIAL_ALERT_MASK_FAIL 0x00
|
||||
#define IPMI_SOL_BMC_ASSERTS_CTS_MASK_TRUE 0x00
|
||||
#define IPMI_SOL_BMC_ASSERTS_CTS_MASK_FALSE 0x02
|
||||
|
||||
|
||||
struct sol_config_parameters {
|
||||
uint8_t set_in_progress;
|
||||
uint8_t enabled;
|
||||
uint8_t force_encryption;
|
||||
uint8_t force_authentication;
|
||||
uint8_t privilege_level;
|
||||
uint8_t character_accumulate_level;
|
||||
uint8_t character_send_threshold;
|
||||
uint8_t retry_count;
|
||||
uint8_t retry_interval;
|
||||
uint8_t non_volatile_bit_rate;
|
||||
uint8_t volatile_bit_rate;
|
||||
uint8_t payload_channel;
|
||||
uint16_t payload_port;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* The ACTIVATE PAYLOAD command reponse structure
|
||||
* From table 24-2 of the IPMI v2.0 spec
|
||||
*/
|
||||
#ifdef PRAGMA_PACK
|
||||
#pramga pack(1)
|
||||
#endif
|
||||
struct activate_payload_rsp {
|
||||
uint8_t auxiliary_data[4];
|
||||
uint8_t inbound_payload_size[2]; /* LS byte first */
|
||||
uint8_t outbound_payload_size[2]; /* LS byte first */
|
||||
uint8_t payload_udp_port[2]; /* LS byte first */
|
||||
uint8_t payload_vlan_number[2]; /* LS byte first */
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef PRAGMA_PACK
|
||||
#pramga pack(0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Small function to validate that user-supplied SOL
|
||||
* configuration parameter values we store in uint8_t
|
||||
* data type falls within valid range. With minval
|
||||
* and maxval parameters we can use the same function
|
||||
* to validate parameters that have different ranges
|
||||
* of values.
|
||||
*
|
||||
* function will return -1 if value is not valid, or
|
||||
* will return 0 if valid.
|
||||
*/
|
||||
int ipmi_sol_set_param_isvalid_uint8_t( const char *strval,
|
||||
const char *name,
|
||||
int base,
|
||||
uint8_t minval,
|
||||
uint8_t maxval,
|
||||
uint8_t *out_value);
|
||||
#define SOL_ENABLE_PARAM 0x01
|
||||
#define SOL_AUTHENTICATION_PARAM 0x02
|
||||
#define SOL_ENABLE_FLAG 0x01
|
||||
#define SOL_PRIVILEGE_LEVEL_USER 0x02
|
||||
#define SOL_BAUD_RATE_PARAM 0x05
|
||||
#define SOL_PREFERRED_BAUD_RATE 0x07
|
||||
|
||||
int ipmi_sol_main(struct ipmi_intf *, int, char **);
|
||||
int ipmi_get_sol_info(struct ipmi_intf * intf,
|
||||
uint8_t channel,
|
||||
struct sol_config_parameters * params);
|
||||
|
||||
|
||||
#endif /* IPMI_SOL_H */
|
||||
|
@ -1,75 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_STRINGS_H
|
||||
#define IPMI_STRINGS_H
|
||||
|
||||
#include <ipmitool/helper.h>
|
||||
|
||||
extern const struct valstr completion_code_vals[];
|
||||
extern const struct valstr entity_id_vals[];
|
||||
extern const struct valstr entity_device_type_vals[];
|
||||
extern const struct valstr ipmi_netfn_vals[];
|
||||
extern const struct valstr ipmi_channel_activity_type_vals[];
|
||||
extern const struct valstr ipmi_privlvl_vals[];
|
||||
extern const struct valstr ipmi_bit_rate_vals[];
|
||||
extern const struct valstr ipmi_set_in_progress_vals[];
|
||||
extern const struct valstr ipmi_authtype_session_vals[];
|
||||
extern const struct valstr ipmi_authtype_vals[];
|
||||
extern const struct valstr ipmi_channel_protocol_vals[];
|
||||
extern const struct valstr ipmi_channel_medium_vals[];
|
||||
extern const struct valstr ipmi_chassis_power_control_vals[];
|
||||
extern const struct valstr ipmi_auth_algorithms[];
|
||||
extern const struct valstr ipmi_integrity_algorithms[];
|
||||
extern const struct valstr ipmi_encryption_algorithms[];
|
||||
extern const struct valstr ipmi_oem_info[];
|
||||
|
||||
extern const struct valstr picmg_frucontrol_vals[];
|
||||
extern const struct valstr picmg_clk_family_vals[];
|
||||
extern const struct oemvalstr picmg_clk_accuracy_vals[];
|
||||
extern const struct oemvalstr picmg_clk_resource_vals[];
|
||||
extern const struct oemvalstr picmg_clk_id_vals[];
|
||||
|
||||
extern const struct valstr picmg_busres_id_vals[];
|
||||
extern const struct valstr picmg_busres_board_cmd_vals[];
|
||||
extern const struct valstr picmg_busres_shmc_cmd_vals[];
|
||||
extern const struct oemvalstr picmg_busres_board_status_vals[];
|
||||
extern const struct oemvalstr picmg_busres_shmc_status_vals[];
|
||||
|
||||
/* these are similar, expect that the lookup takes the IANA number
|
||||
as first parameter */
|
||||
extern const struct oemvalstr ipmi_oem_product_info[];
|
||||
extern const struct oemvalstr ipmi_oem_sdr_type_vals[];
|
||||
|
||||
|
||||
|
||||
#endif /*IPMI_STRINGS_H*/
|
@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_SUNOEM_H
|
||||
#define IPMI_SUNOEM_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_sdr.h>
|
||||
|
||||
#define IPMI_NETFN_SUNOEM 0x2e
|
||||
|
||||
#define IPMI_SUNOEM_SET_SSH_KEY 0x01
|
||||
#define IPMI_SUNOEM_DEL_SSH_KEY 0x02
|
||||
#define IPMI_SUNOEM_GET_HEALTH_STATUS 0x10
|
||||
#define IPMI_SUNOEM_SET_FAN_SPEED 0x20
|
||||
#define IPMI_SUNOEM_LED_GET 0x21
|
||||
#define IPMI_SUNOEM_LED_SET 0x22
|
||||
|
||||
int ipmi_sunoem_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
struct ipmi_rs * sunoem_led_get(struct ipmi_intf * intf, struct sdr_record_generic_locator * dev, int ledtype);
|
||||
struct ipmi_rs * sunoem_led_set(struct ipmi_intf * intf, struct sdr_record_generic_locator * dev, int ledtype, int ledmode);
|
||||
|
||||
#endif /*IPMI_SUNOEM_H*/
|
||||
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2005 Tyan Computer Corp. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_TSOL_H
|
||||
#define IPMI_TSOL_H
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
#define IPMI_TSOL_CMD_SENDKEY 0x03
|
||||
#define IPMI_TSOL_CMD_START 0x06
|
||||
#define IPMI_TSOL_CMD_STOP 0x02
|
||||
|
||||
#define IPMI_TSOL_DEF_PORT 6230
|
||||
|
||||
int ipmi_tsol_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_TSOL_H */
|
@ -1,95 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMI_USER_H
|
||||
#define IPMI_USER_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
|
||||
/*
|
||||
* The GET USER ACCESS response from table 22-32 of the IPMI v2.0 spec
|
||||
*/
|
||||
struct user_access_rsp {
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved1 : 2;
|
||||
uint8_t maximum_ids : 6;
|
||||
#else
|
||||
uint8_t maximum_ids : 6;
|
||||
uint8_t __reserved1 : 2;
|
||||
#endif
|
||||
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved2 : 2;
|
||||
uint8_t enabled_user_count : 6;
|
||||
#else
|
||||
uint8_t enabled_user_count : 6;
|
||||
uint8_t __reserved2 : 2;
|
||||
#endif
|
||||
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved3 : 2;
|
||||
uint8_t fixed_name_count : 6;
|
||||
#else
|
||||
uint8_t fixed_name_count : 6;
|
||||
uint8_t __reserved3 : 2;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
#if WORDS_BIGENDIAN
|
||||
uint8_t __reserved4 : 1;
|
||||
uint8_t no_callin_access : 1;
|
||||
uint8_t link_auth_access : 1;
|
||||
uint8_t ipmi_messaging_access : 1;
|
||||
uint8_t channel_privilege_limit : 4;
|
||||
#else
|
||||
uint8_t channel_privilege_limit : 4;
|
||||
uint8_t ipmi_messaging_access : 1;
|
||||
uint8_t link_auth_access : 1;
|
||||
uint8_t no_callin_access : 1;
|
||||
uint8_t __reserved4 : 1;
|
||||
#endif
|
||||
} ATTRIBUTE_PACKING;
|
||||
#ifdef HAVE_PRAGMA_PACK
|
||||
#pragma pack(0)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int ipmi_user_main(struct ipmi_intf *, int, char **);
|
||||
|
||||
#endif /* IPMI_USER_H */
|
@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* Redistribution of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistribution in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of Sun Microsystems, Inc. or the names of
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* This software is provided "AS IS," without a warranty of any kind.
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
|
||||
* INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
||||
* PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
|
||||
* SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE
|
||||
* FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
|
||||
* OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
|
||||
* SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
|
||||
* OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
|
||||
* PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef IPMITOOL_LOG_H
|
||||
#define IPMITOOL_LOG_H
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
/* sys/syslog.h:
|
||||
* LOG_EMERG 0 system is unusable
|
||||
* LOG_ALERT 1 action must be taken immediately
|
||||
* LOG_CRIT 2 critical conditions
|
||||
* LOG_ERR 3 error conditions
|
||||
* LOG_WARNING 4 warning conditions
|
||||
* LOG_NOTICE 5 normal but significant condition
|
||||
* LOG_INFO 6 informational
|
||||
* LOG_DEBUG 7 debug-level messages
|
||||
*/
|
||||
|
||||
#define LOG_ERROR LOG_ERR
|
||||
#define LOG_WARN LOG_WARNING
|
||||
|
||||
#define LOG_NAME_DEFAULT "ipmitool"
|
||||
#define LOG_MSG_LENGTH 1024
|
||||
|
||||
void log_init(const char * name, int isdaemon, int verbose);
|
||||
void log_halt(void);
|
||||
void log_level_set(int level);
|
||||
int log_level_get(void);
|
||||
void lprintf(int level, const char * format, ...);
|
||||
void lperror(int level, const char * format, ...);
|
||||
|
||||
#endif /*IPMITOOL_LOG_H*/
|
||||
|
119
ipmitool/ipmitool.spec.in
Normal file
119
ipmitool/ipmitool.spec.in
Normal file
@ -0,0 +1,119 @@
|
||||
Name: @IPMITOOL_PKG@
|
||||
Summary: @IPMITOOL_PKG@ - Utility for interfacing with IPMI devices
|
||||
Version: @VERSION@
|
||||
Release: 1
|
||||
Copyright: BSD
|
||||
Group: Utilities
|
||||
Vendor: Sun Microsystems
|
||||
Packager: Duncan Laurie <duncan@sun.com>
|
||||
Source: @IPMITOOL_PKG@-@VERSION@.tar.gz
|
||||
Buildroot: /var/tmp/@IPMITOOL_PKG@-root
|
||||
|
||||
%package dev
|
||||
Summary: Development files for ipmitool
|
||||
Group: Utilities
|
||||
|
||||
%description
|
||||
This package contains a utility for interfacing with IPMI-enabled devices
|
||||
through either the OpenIPMI kernel driver or with IPMI-over-LAN protocol.
|
||||
It provides some basic functions for reading the SDR and displaying sensor
|
||||
values, displaying the contents of the SEL, printing FRU information,
|
||||
reading and setting LAN configuration, and chassis power control.
|
||||
|
||||
%description dev
|
||||
Additional development files for creating applications or interface plugins
|
||||
for ipmitool.
|
||||
|
||||
%prep
|
||||
if [ "$RPM_BUILD_ROOT" ] && [ "$RPM_BUILD_ROOT" != "/" ]; then
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
fi
|
||||
|
||||
%setup
|
||||
|
||||
%build
|
||||
./configure @ac_configure_args@ \
|
||||
--prefix=%{_prefix} \
|
||||
--bindir=%{_bindir} \
|
||||
--datadir=%{_datadir} \
|
||||
--includedir=%{_includedir} \
|
||||
--libdir=%{_libdir} \
|
||||
--mandir=%{_mandir} \
|
||||
--sysconfdir=%{_sysconfdir}
|
||||
make
|
||||
|
||||
%install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
%clean
|
||||
if [ "$RPM_BUILD_ROOT" ] && [ "$RPM_BUILD_ROOT" != "/" ]; then
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
fi
|
||||
rm -rf $RPM_BUILD_DIR/@IPMITOOL_PKG@-@VERSION@
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc %{_mandir}/man1/*
|
||||
%{_bindir}/*
|
||||
%dir %{_libdir}/ipmitool
|
||||
%attr(755,root,root) %{_libdir}/ipmitool/*
|
||||
|
||||
%files dev
|
||||
%defattr(-,root,root)
|
||||
%dir %{_includedir}/ipmitool
|
||||
%{_includedir}/ipmitool/*.h
|
||||
|
||||
%changelog
|
||||
* Mon Jan 5 2004 <duncan@sun.com> 1.5.7-1
|
||||
- add IPMIv1.5 eratta fixes
|
||||
- additions to FRU printing and FRU multirecords
|
||||
- better handling of SDR printing
|
||||
- contrib scripts for creating rrdtool graphs
|
||||
|
||||
* Thu Dec 4 2003 <duncan@sun.com> 1.5.6-1
|
||||
- Fix SEL event decoding for generic events
|
||||
- Handle empty SEL gracefully when doing "sel list"
|
||||
- Fix sdr handling of sensors that do not return a reading
|
||||
- Fix for CSV display of sensor readings/units from Fredrik <EFBFBD>hrn
|
||||
|
||||
* Tue Nov 25 2003 <duncan@sun.com> 1.5.5-1
|
||||
- Add -U option for setting LAN username
|
||||
- Fix -v usage for plugin interfaces
|
||||
|
||||
* Fri Nov 14 2003 <duncan@sun.com> 1.5.4-1
|
||||
- pull interface plugin api into library
|
||||
- fix ipmievd
|
||||
|
||||
* Fri Oct 31 2003 <duncan@sun.com> 1.5.3-1
|
||||
- add -g optin for pedantic ipmi-over-lan communication
|
||||
|
||||
* Fri Oct 24 2003 <duncan@sun.com> 1.5.2-1
|
||||
- add gratuitous arp interval setting
|
||||
|
||||
* Wed Oct 8 2003 <duncan@sun.com> 1.5.1-1
|
||||
- better SEL support
|
||||
- fix display bug in SDR list
|
||||
|
||||
* Fri Sep 5 2003 <duncan@sun.com> 1.5.0-1
|
||||
- use automake/autoconf/libtool
|
||||
- dynamic loading interface plugins
|
||||
|
||||
* Wed May 28 2003 <duncan@sun.com> 1.4.0-1
|
||||
- make UDP packet handling more robust
|
||||
- fix imb driver support
|
||||
|
||||
* Thu May 22 2003 <duncan@sun.com> 1.3-1
|
||||
- update manpage
|
||||
- rework of low-level network handling
|
||||
- add basic imb driver support
|
||||
|
||||
* Wed Apr 2 2003 <duncan@sun.com> 1.2-1
|
||||
- change command line option parsing
|
||||
- support for more chassis commands
|
||||
|
||||
* Tue Apr 1 2003 <duncan@sun.com> 1.1-1
|
||||
- minor fixes.
|
||||
|
||||
* Sun Mar 30 2003 <duncan@sun.com> 1.0-1
|
||||
- Initial release.
|
||||
|
@ -27,22 +27,17 @@
|
||||
# PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
|
||||
# LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
||||
# EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
#
|
||||
# You acknowledge that this software is not designed or intended for use
|
||||
# in the design, construction, operation or maintenance of any nuclear
|
||||
# facility.
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
noinst_LTLIBRARIES = libipmitool.la
|
||||
libipmitool_la_SOURCES = helper.c ipmi_sdr.c ipmi_sel.c ipmi_sol.c ipmi_pef.c \
|
||||
ipmi_lanp.c ipmi_fru.c ipmi_chassis.c ipmi_mc.c log.c \
|
||||
dimm_spd.c ipmi_sensor.c ipmi_channel.c ipmi_event.c \
|
||||
ipmi_session.c ipmi_strings.c ipmi_user.c ipmi_raw.c \
|
||||
ipmi_oem.c ipmi_isol.c ipmi_sunoem.c ipmi_fwum.c ipmi_picmg.c \
|
||||
ipmi_main.c ipmi_tsol.c ipmi_firewall.c ipmi_kontronoem.c \
|
||||
ipmi_hpmfwupg.c ipmi_sdradd.c ipmi_ekanalyzer.c ipmi_gendev.c \
|
||||
ipmi_ime.c ipmi_delloem.c ipmi_dcmi.c \
|
||||
../src/plugins/lan/md5.c ../src/plugins/lan/md5.h
|
||||
|
||||
libipmitool_la_SOURCES = helper.c ipmi_sdr.c ipmi_sel.c ipmi_sol.c ipmi_lanp.c \
|
||||
ipmi_fru.c ipmi_chassis.c ipmi_bmc.c ipmi_intf.c dimm_spd.c
|
||||
libipmitool_la_LDFLAGS = -export-dynamic
|
||||
libipmitool_la_LIBADD = -lm
|
||||
libipmitool_la_DEPENDENCIES =
|
||||
|
||||
libipmitool_la_LIBADD = -lm $(LIBLTDL)
|
||||
libipmitool_la_DEPENDENCIES = $(LIBLTDL)
|
||||
|
@ -28,12 +28,13 @@
|
||||
* 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>
|
||||
#include <ipmitool/log.h>
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/ipmi_intf.h>
|
||||
#include <ipmitool/ipmi_fru.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -41,56 +42,10 @@
|
||||
|
||||
extern int verbose;
|
||||
|
||||
/*
|
||||
* Also, see ipmi_fru.c.
|
||||
*
|
||||
* Apparently some systems have problems with FRU access greater than 16 bytes
|
||||
* at a time, even when using byte (not word) access. In order to ensure we
|
||||
* work with the widest variety of hardware request size is capped at 16 bytes.
|
||||
* Since this may result in slowdowns on some systems with lots of FRU data you
|
||||
* can change this define to enable larger (up to 32 bytes at a time) access.
|
||||
*/
|
||||
#define FRU_DATA_RQST_SIZE 16;
|
||||
|
||||
const struct valstr spd_memtype_vals[] = {
|
||||
{ 0x01, "STD FPM DRAM" },
|
||||
{ 0x02, "EDO" },
|
||||
{ 0x04, "SDRAM" },
|
||||
{ 0x05, "ROM" },
|
||||
{ 0x06, "DDR SGRAM" },
|
||||
{ 0x07, "DDR SDRAM" },
|
||||
{ 0x08, "DDR2 SDRAM" },
|
||||
{ 0x09, "DDR2 SDRAM FB-DIMM" },
|
||||
{ 0x0A, "DDR2 SDRAM FB-DIMM Probe" },
|
||||
{ 0x0B, "DDR3 SDRAM" },
|
||||
{ 0x00, NULL },
|
||||
};
|
||||
|
||||
const struct valstr ddr3_density_vals[] =
|
||||
{
|
||||
{ 0, "256 Mb" },
|
||||
{ 1, "512 Mb" },
|
||||
{ 2, "1 Gb" },
|
||||
{ 3, "2 Gb" },
|
||||
{ 4, "4 Gb" },
|
||||
{ 5, "8 Gb" },
|
||||
{ 6, "16 Gb" },
|
||||
{ 0x00, NULL },
|
||||
};
|
||||
|
||||
const struct valstr ddr3_banks_vals[] =
|
||||
{
|
||||
{ 0, "3 (8 Banks)" },
|
||||
{ 1, "4 (16 Banks)" },
|
||||
{ 2, "5 (32 Banks)" },
|
||||
{ 3, "6 (64 Banks)" },
|
||||
{ 0x00, NULL },
|
||||
};
|
||||
|
||||
const struct valstr ddr3_ecc_vals[] =
|
||||
{
|
||||
{ 0, "0 bits" },
|
||||
{ 1, "8 bits" },
|
||||
{ 0x07, "DDR" },
|
||||
{ 0x00, NULL },
|
||||
};
|
||||
|
||||
@ -98,7 +53,6 @@ const struct valstr spd_config_vals[] = {
|
||||
{ 0x00, "None" },
|
||||
{ 0x01, "Parity" },
|
||||
{ 0x02, "ECC" },
|
||||
{ 0x04, "Addr Cmd Parity" },
|
||||
{ 0x00, NULL },
|
||||
};
|
||||
|
||||
@ -108,7 +62,6 @@ const struct valstr spd_voltage_vals[] = {
|
||||
{ 0x02, "HSTL 1.5V" },
|
||||
{ 0x03, "SSTL 3.3V" },
|
||||
{ 0x04, "SSTL 2.5V" },
|
||||
{ 0x05, "SSTL 1.8V" },
|
||||
{ 0x00, NULL },
|
||||
};
|
||||
|
||||
@ -716,152 +669,14 @@ const struct valstr jedec_id5_vals[] = {
|
||||
{ 0x00, NULL },
|
||||
};
|
||||
|
||||
int
|
||||
ipmi_spd_print(uint8_t *spd_data, int len)
|
||||
{
|
||||
int size;
|
||||
|
||||
if (len < 92)
|
||||
return -1; /* we need first 91 bytes to do our thing */
|
||||
|
||||
printf(" Memory Type : %s\n",
|
||||
val2str(spd_data[2], spd_memtype_vals));
|
||||
|
||||
if (spd_data[2] == 0x0B) /* DDR3 SDRAM */
|
||||
{
|
||||
int iPN;
|
||||
char *pchPN = spd_data+128;
|
||||
int sdram_cap = 0;
|
||||
int pri_bus_width = 0;
|
||||
int sdram_width = 0;
|
||||
int ranks = 0;
|
||||
int mem_size = 0;
|
||||
|
||||
if (len < 148)
|
||||
return -1; /* we need first 91 bytes to do our thing */
|
||||
|
||||
|
||||
sdram_cap = ldexp(256,(spd_data[4]&15));
|
||||
pri_bus_width = ldexp(8,(spd_data[8]&7));
|
||||
sdram_width = ldexp(4,(spd_data[7]&7));
|
||||
ranks = ldexp(1,((spd_data[7]&0x3F)>>3));
|
||||
mem_size = (sdram_cap/8) * (pri_bus_width/sdram_width) * ranks;
|
||||
printf(" SDRAM Capacity : %d MB\n", sdram_cap );
|
||||
printf(" Memory Banks : %s\n", val2str(spd_data[4]>>4, ddr3_banks_vals));
|
||||
printf(" Primary Bus Width : %d bits\n", pri_bus_width );
|
||||
printf(" SDRAM Device Width : %d bits\n", sdram_width );
|
||||
printf(" Number of Ranks : %d\n", ranks );
|
||||
printf(" Memory size : %d MB\n", mem_size );
|
||||
|
||||
/* printf(" Memory Density : %s\n", val2str(spd_data[4]&15, ddr3_density_vals)); */
|
||||
printf(" 1.5 V Nominal Op : %s\n", (((spd_data[6]&1) != 0) ? "No":"Yes" ) );
|
||||
printf(" 1.35 V Nominal Op : %s\n", (((spd_data[6]&2) != 0) ? "No":"Yes" ) );
|
||||
printf(" 1.2X V Nominal Op : %s\n", (((spd_data[6]&4) != 0) ? "No":"Yes" ) );
|
||||
printf(" Error Detect/Cor : %s\n", val2str(spd_data[8]>>3, ddr3_ecc_vals));
|
||||
|
||||
printf(" Manufacturer : ");
|
||||
switch (spd_data[117]&127)
|
||||
{
|
||||
case 0:
|
||||
printf("%s\n", val2str(spd_data[118], jedec_id1_vals));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
printf("%s\n", val2str(spd_data[118], jedec_id2_vals));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
printf("%s\n", val2str(spd_data[118], jedec_id3_vals));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
printf("%s\n", val2str(spd_data[118], jedec_id4_vals));
|
||||
break;
|
||||
|
||||
case 4:
|
||||
printf("%s\n", val2str(spd_data[118], jedec_id5_vals));
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("%s\n", "JEDEC JEP106 update required" );
|
||||
|
||||
}
|
||||
|
||||
printf(" Manufacture Date : year %c%c week %c%c\n",
|
||||
'0'+(spd_data[120]>>4), '0'+(spd_data[120]&15), '0'+(spd_data[121]>>4), '0'+(spd_data[121]&15) );
|
||||
|
||||
printf(" Serial Number : %02x%02x%02x%02x\n",
|
||||
spd_data[122], spd_data[123], spd_data[124], spd_data[125]);
|
||||
|
||||
printf(" Part Number : ");
|
||||
for (iPN=0; iPN < 19; iPN++)
|
||||
{
|
||||
printf( "%c", *pchPN++ );
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
size = spd_data[5] * (spd_data[31] << 2);
|
||||
printf(" Memory Size : %d MB\n", size);
|
||||
printf(" Voltage Intf : %s\n",
|
||||
val2str(spd_data[8], spd_voltage_vals));
|
||||
printf(" Error Detect/Cor : %s\n",
|
||||
val2str(spd_data[11], spd_config_vals));
|
||||
|
||||
/* handle jedec table bank continuation values */
|
||||
printf(" Manufacturer : ");
|
||||
if (spd_data[64] != 0x7f)
|
||||
printf("%s\n",
|
||||
val2str(spd_data[64], jedec_id1_vals));
|
||||
else {
|
||||
if (spd_data[65] != 0x7f)
|
||||
printf("%s\n",
|
||||
val2str(spd_data[65], jedec_id2_vals));
|
||||
else {
|
||||
if (spd_data[66] != 0x7f)
|
||||
printf("%s\n",
|
||||
val2str(spd_data[66], jedec_id3_vals));
|
||||
else {
|
||||
if (spd_data[67] != 0x7f)
|
||||
printf("%s\n",
|
||||
val2str(spd_data[67],
|
||||
jedec_id4_vals));
|
||||
else
|
||||
printf("%s\n",
|
||||
val2str(spd_data[68],
|
||||
jedec_id5_vals));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (spd_data[73]) {
|
||||
char part[19];
|
||||
memcpy(part, spd_data+73, 18);
|
||||
part[18] = 0;
|
||||
printf(" Part Number : %s\n", part);
|
||||
}
|
||||
|
||||
printf(" Serial Number : %02x%02x%02x%02x\n",
|
||||
spd_data[95], spd_data[96], spd_data[97], spd_data[98]);
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
printf("\n");
|
||||
printbuf(spd_data, len, "SPD DATA");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id)
|
||||
void ipmi_spd_print(struct ipmi_intf * intf, unsigned char id)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
struct fru_info fru;
|
||||
uint8_t spd_data[256], msg_data[4];
|
||||
int len, offset;
|
||||
unsigned char spd_data[256], msg_data[4];
|
||||
int i, len, offset;
|
||||
int size, conf;
|
||||
|
||||
msg_data[0] = id;
|
||||
|
||||
@ -872,27 +687,14 @@ ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id)
|
||||
req.msg.data_len = 1;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
printf(" Device not present (No Response)\n");
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
printf(" Device not present (%s)\n",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
if (!rsp || rsp->ccode)
|
||||
return;
|
||||
memcpy(&fru, rsp->data, sizeof(fru));
|
||||
|
||||
fru.size = (rsp->data[1] << 8) | rsp->data[0];
|
||||
fru.access = rsp->data[2] & 0x1;
|
||||
|
||||
lprintf(LOG_DEBUG, "fru.size = %d bytes (accessed by %s)",
|
||||
if (verbose > 1)
|
||||
printf("fru.size = %d bytes (accessed by %s)\n",
|
||||
fru.size, fru.access ? "words" : "bytes");
|
||||
|
||||
if (fru.size < 1) {
|
||||
lprintf(LOG_ERR, " Invalid FRU size %d", fru.size);
|
||||
return -1;
|
||||
}
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_STORAGE;
|
||||
req.msg.cmd = GET_FRU_DATA;
|
||||
@ -905,31 +707,60 @@ ipmi_spd_print_fru(struct ipmi_intf * intf, uint8_t id)
|
||||
msg_data[0] = id;
|
||||
msg_data[1] = offset;
|
||||
msg_data[2] = 0;
|
||||
msg_data[3] = FRU_DATA_RQST_SIZE;
|
||||
msg_data[3] = 32;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
printf(" Device not present (No Response)\n");
|
||||
return -1;
|
||||
if (!rsp) {
|
||||
printf(" Error while reading FRU data.\n");
|
||||
return;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
printf(" Device not present (%s)\n",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
|
||||
/* Timeouts are acceptable. No DIMM in the socket */
|
||||
if (rsp->ccode == 0xc3)
|
||||
return 1;
|
||||
|
||||
return -1;
|
||||
if (rsp->ccode == 0xc3) {
|
||||
printf(" Timeout while reading FRU data. (Device not present?)\n");
|
||||
return;
|
||||
}
|
||||
if (rsp->ccode)
|
||||
break;
|
||||
|
||||
len = rsp->data[0];
|
||||
memcpy(&spd_data[offset], rsp->data + 1, len);
|
||||
offset += len;
|
||||
} while (offset < fru.size);
|
||||
|
||||
/* now print spd info */
|
||||
ipmi_spd_print(spd_data, offset);
|
||||
if (verbose)
|
||||
printbuf(spd_data, offset, "SPD DATA");
|
||||
|
||||
return 0;
|
||||
if (offset < 92)
|
||||
return; /* we need first 91 bytes to do our thing */
|
||||
|
||||
size = spd_data[5] * (spd_data[31] << 2);
|
||||
printf(" Memory Size : %d MB\n", size);
|
||||
printf(" Memory Type : %s\n", val2str(spd_data[2], spd_memtype_vals));
|
||||
printf(" Voltage Intf : %s\n", val2str(spd_data[8], spd_voltage_vals));
|
||||
printf(" Error Detect/Cor : %s\n", val2str(spd_data[11], spd_config_vals));
|
||||
|
||||
/* handle jedec table bank continuation values */
|
||||
printf(" Manufacturer : ");
|
||||
if (spd_data[64] != 0x7f)
|
||||
printf("%s\n", val2str(spd_data[64], jedec_id1_vals));
|
||||
else {
|
||||
if (spd_data[65] != 0x7f)
|
||||
printf("%s\n", val2str(spd_data[65], jedec_id2_vals));
|
||||
else {
|
||||
if (spd_data[66] != 0x7f)
|
||||
printf("%s\n", val2str(spd_data[66], jedec_id3_vals));
|
||||
else {
|
||||
if (spd_data[67] != 0x7f)
|
||||
printf("%s\n", val2str(spd_data[67], jedec_id4_vals));
|
||||
else
|
||||
printf("%s\n", val2str(spd_data[68], jedec_id5_vals));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (spd_data[73]) {
|
||||
char part[19];
|
||||
memcpy(part, spd_data+73, 18);
|
||||
part[18] = 0;
|
||||
printf(" Part Number : %s\n", part);
|
||||
}
|
||||
}
|
||||
|
@ -28,59 +28,39 @@
|
||||
* 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>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h> /* For TIOCNOTTY */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <inttypes.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PATHS_H
|
||||
# include <paths.h>
|
||||
#else
|
||||
# define _PATH_VARRUN "/var/run/"
|
||||
#endif
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_intf.h>
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/log.h>
|
||||
|
||||
extern int verbose;
|
||||
#include <string.h>
|
||||
|
||||
uint32_t buf2long(uint8_t * buf)
|
||||
|
||||
unsigned long buf2long(unsigned char * buf)
|
||||
{
|
||||
return (uint32_t)(buf[3] << 24 | buf[2] << 16 | buf[1] << 8 | buf[0]);
|
||||
return (unsigned long)(buf[3] << 24 | buf[2] << 16 | buf[1] << 8 | buf[0]);
|
||||
}
|
||||
|
||||
uint16_t buf2short(uint8_t * buf)
|
||||
unsigned short buf2short(unsigned char * buf)
|
||||
{
|
||||
return (uint16_t)(buf[1] << 8 | buf[0]);
|
||||
return (unsigned short)(buf[1] << 8 | buf[0]);
|
||||
}
|
||||
|
||||
const char * buf2str(uint8_t * buf, int len)
|
||||
const char * buf2str(unsigned char * buf, int len)
|
||||
{
|
||||
static char str[2049];
|
||||
static char str[1024];
|
||||
int i;
|
||||
|
||||
if (len <= 0 || len > 1024)
|
||||
if (!len || len > 1024)
|
||||
return NULL;
|
||||
|
||||
memset(str, 0, 2049);
|
||||
memset(str, 0, 1024);
|
||||
|
||||
for (i=0; i<len; i++)
|
||||
sprintf(str+i+i, "%2.2x", buf[i]);
|
||||
@ -90,669 +70,58 @@ const char * buf2str(uint8_t * buf, int len)
|
||||
return (const char *)str;
|
||||
}
|
||||
|
||||
void printbuf(const uint8_t * buf, int len, const char * desc)
|
||||
void printbuf(unsigned char * buf, int len, char * desc)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (len <= 0)
|
||||
if (!len)
|
||||
return;
|
||||
|
||||
if (verbose < 1)
|
||||
return;
|
||||
|
||||
fprintf(stderr, "%s (%d bytes)\n", desc, len);
|
||||
printf("%s (%d bytes)\n", desc, len);
|
||||
for (i=0; i<len; i++) {
|
||||
if (((i%16) == 0) && (i != 0))
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, " %2.2x", buf[i]);
|
||||
printf("\n");
|
||||
printf(" %2.2x", buf[i]);
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
const char * val2str(uint16_t val, const struct valstr *vs)
|
||||
const char * val2str(unsigned char val, const struct valstr *vs)
|
||||
{
|
||||
static char un_str[32];
|
||||
int i;
|
||||
static char un_str[16];
|
||||
int i = 0;
|
||||
|
||||
for (i = 0; vs[i].str != NULL; i++) {
|
||||
while (vs[i].str) {
|
||||
if (vs[i].val == val)
|
||||
return vs[i].str;
|
||||
}
|
||||
|
||||
memset(un_str, 0, 32);
|
||||
snprintf(un_str, 32, "Unknown (0x%02X)", val);
|
||||
|
||||
return un_str;
|
||||
}
|
||||
|
||||
const char * oemval2str(uint32_t oem, uint16_t val,
|
||||
const struct oemvalstr *vs)
|
||||
{
|
||||
static char un_str[32];
|
||||
int i;
|
||||
|
||||
for (i = 0; vs[i].oem != 0xffffff && vs[i].str != NULL; i++) {
|
||||
/* FIXME: for now on we assume PICMG capability on all IANAs */
|
||||
if ( (vs[i].oem == oem || vs[i].oem == IPMI_OEM_PICMG) &&
|
||||
vs[i].val == val ) {
|
||||
return vs[i].str;
|
||||
}
|
||||
}
|
||||
|
||||
memset(un_str, 0, 32);
|
||||
snprintf(un_str, 32, "Unknown (0x%X)", val);
|
||||
|
||||
return un_str;
|
||||
}
|
||||
|
||||
/* str2double - safely convert string to double
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @double_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2double(const char * str, double * double_ptr)
|
||||
{
|
||||
char * end_ptr = 0;
|
||||
if (!str || !double_ptr)
|
||||
return (-1);
|
||||
|
||||
*double_ptr = 0;
|
||||
errno = 0;
|
||||
*double_ptr = strtod(str, &end_ptr);
|
||||
|
||||
if (*end_ptr != '\0')
|
||||
return (-2);
|
||||
|
||||
if (errno != 0)
|
||||
return (-3);
|
||||
|
||||
return 0;
|
||||
} /* str2double(...) */
|
||||
|
||||
/* str2long - safely convert string to int64_t
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @lng_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2long(const char * str, int64_t * lng_ptr)
|
||||
{
|
||||
char * end_ptr = 0;
|
||||
if (!str || !lng_ptr)
|
||||
return (-1);
|
||||
|
||||
*lng_ptr = 0;
|
||||
errno = 0;
|
||||
*lng_ptr = strtol(str, &end_ptr, 0);
|
||||
|
||||
if (*end_ptr != '\0')
|
||||
return (-2);
|
||||
|
||||
if (errno != 0)
|
||||
return (-3);
|
||||
|
||||
return 0;
|
||||
} /* str2long(...) */
|
||||
|
||||
/* str2ulong - safely convert string to uint64_t
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @ulng_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2ulong(const char * str, uint64_t * ulng_ptr)
|
||||
{
|
||||
char * end_ptr = 0;
|
||||
if (!str || !ulng_ptr)
|
||||
return (-1);
|
||||
|
||||
*ulng_ptr = 0;
|
||||
errno = 0;
|
||||
*ulng_ptr = strtoul(str, &end_ptr, 0);
|
||||
|
||||
if (*end_ptr != '\0')
|
||||
return (-2);
|
||||
|
||||
if (errno != 0)
|
||||
return (-3);
|
||||
|
||||
return 0;
|
||||
} /* str2ulong(...) */
|
||||
|
||||
/* str2int - safely convert string to int32_t
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @int_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2int(const char * str, int32_t * int_ptr)
|
||||
{
|
||||
int rc = 0;
|
||||
int64_t arg_long = 0;
|
||||
if (!str || !int_ptr)
|
||||
return (-1);
|
||||
|
||||
if ( (rc = str2long(str, &arg_long)) != 0 ) {
|
||||
*int_ptr = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (arg_long < INT32_MIN || arg_long > INT32_MAX)
|
||||
return (-3);
|
||||
|
||||
*int_ptr = (int32_t)arg_long;
|
||||
return 0;
|
||||
} /* str2int(...) */
|
||||
|
||||
/* str2uint - safely convert string to uint32_t
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @uint_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2uint(const char * str, uint32_t * uint_ptr)
|
||||
{
|
||||
int rc = 0;
|
||||
uint64_t arg_ulong = 0;
|
||||
if (!str || !uint_ptr)
|
||||
return (-1);
|
||||
|
||||
if ( (rc = str2ulong(str, &arg_ulong)) != 0) {
|
||||
*uint_ptr = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (arg_ulong > UINT32_MAX)
|
||||
return (-3);
|
||||
|
||||
*uint_ptr = (uint32_t)arg_ulong;
|
||||
return 0;
|
||||
} /* str2uint(...) */
|
||||
|
||||
/* str2short - safely convert string to int16_t
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @shrt_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2short(const char * str, int16_t * shrt_ptr)
|
||||
{
|
||||
int rc = (-3);
|
||||
int64_t arg_long = 0;
|
||||
if (!str || !shrt_ptr)
|
||||
return (-1);
|
||||
|
||||
if ( (rc = str2long(str, &arg_long)) != 0 ) {
|
||||
*shrt_ptr = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (arg_long < INT16_MIN || arg_long > INT16_MAX)
|
||||
return (-3);
|
||||
|
||||
*shrt_ptr = (int16_t)arg_long;
|
||||
return 0;
|
||||
} /* str2short(...) */
|
||||
|
||||
/* str2ushort - safely convert string to uint16_t
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @ushrt_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) invalid input, (-3) for *flow
|
||||
*/
|
||||
int str2ushort(const char * str, uint16_t * ushrt_ptr)
|
||||
{
|
||||
int rc = (-3);
|
||||
uint64_t arg_ulong = 0;
|
||||
if (!str || !ushrt_ptr)
|
||||
return (-1);
|
||||
|
||||
if ( (rc = str2ulong(str, &arg_ulong)) != 0 ) {
|
||||
*ushrt_ptr = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (arg_ulong > UINT16_MAX)
|
||||
return (-3);
|
||||
|
||||
*ushrt_ptr = (uint16_t)arg_ulong;
|
||||
return 0;
|
||||
} /* str2ushort(...) */
|
||||
|
||||
/* str2char - safely convert string to int8
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @chr_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) or (-3) if conversion fails
|
||||
*/
|
||||
int str2char(const char *str, int8_t * chr_ptr)
|
||||
{
|
||||
int rc = (-3);
|
||||
int64_t arg_long = 0;
|
||||
if (!str || !chr_ptr) {
|
||||
return (-1);
|
||||
}
|
||||
if ((rc = str2long(str, &arg_long)) != 0) {
|
||||
*chr_ptr = 0;
|
||||
return rc;
|
||||
}
|
||||
if (arg_long < INT8_MIN || arg_long > INT8_MAX) {
|
||||
return (-3);
|
||||
}
|
||||
return 0;
|
||||
} /* str2char(...) */
|
||||
|
||||
/* str2uchar - safely convert string to uint8
|
||||
*
|
||||
* @str: source string to convert from
|
||||
* @uchr_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) if one of args is NULL, (-2) or (-3) if conversion fails
|
||||
*/
|
||||
int str2uchar(const char * str, uint8_t * uchr_ptr)
|
||||
{
|
||||
int rc = (-3);
|
||||
uint64_t arg_ulong = 0;
|
||||
if (!str || !uchr_ptr)
|
||||
return (-1);
|
||||
|
||||
if ( (rc = str2ulong(str, &arg_ulong)) != 0 ) {
|
||||
*uchr_ptr = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (arg_ulong > UINT8_MAX)
|
||||
return (-3);
|
||||
|
||||
*uchr_ptr = (uint8_t)arg_ulong;
|
||||
return 0;
|
||||
} /* str2uchar(...) */
|
||||
|
||||
uint16_t str2val(const char *str, const struct valstr *vs)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; vs[i].str != NULL; i++) {
|
||||
if (strncasecmp(vs[i].str, str, __maxlen(str, vs[i].str)) == 0)
|
||||
return vs[i].val;
|
||||
}
|
||||
|
||||
return vs[i].val;
|
||||
}
|
||||
|
||||
/* print_valstr - print value string list to log or stdout
|
||||
*
|
||||
* @vs: value string list to print
|
||||
* @title: name of this value string list
|
||||
* @loglevel: what log level to print, -1 for stdout
|
||||
*/
|
||||
void
|
||||
print_valstr(const struct valstr * vs, const char * title, int loglevel)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (vs == NULL)
|
||||
return;
|
||||
|
||||
if (title != NULL) {
|
||||
if (loglevel < 0)
|
||||
printf("\n%s:\n\n", title);
|
||||
else
|
||||
lprintf(loglevel, "\n%s:\n", title);
|
||||
}
|
||||
|
||||
if (loglevel < 0) {
|
||||
printf(" VALUE\tHEX\tSTRING\n");
|
||||
printf("==============================================\n");
|
||||
} else {
|
||||
lprintf(loglevel, " VAL\tHEX\tSTRING");
|
||||
lprintf(loglevel, "==============================================");
|
||||
}
|
||||
|
||||
for (i = 0; vs[i].str != NULL; i++) {
|
||||
if (loglevel < 0) {
|
||||
if (vs[i].val < 256)
|
||||
printf(" %d\t0x%02x\t%s\n", vs[i].val, vs[i].val, vs[i].str);
|
||||
else
|
||||
printf(" %d\t0x%04x\t%s\n", vs[i].val, vs[i].val, vs[i].str);
|
||||
} else {
|
||||
if (vs[i].val < 256)
|
||||
lprintf(loglevel, " %d\t0x%02x\t%s", vs[i].val, vs[i].val, vs[i].str);
|
||||
else
|
||||
lprintf(loglevel, " %d\t0x%04x\t%s", vs[i].val, vs[i].val, vs[i].str);
|
||||
}
|
||||
}
|
||||
|
||||
if (loglevel < 0)
|
||||
printf("\n");
|
||||
else
|
||||
lprintf(loglevel, "");
|
||||
}
|
||||
|
||||
/* print_valstr_2col - print value string list in two columns to log or stdout
|
||||
*
|
||||
* @vs: value string list to print
|
||||
* @title: name of this value string list
|
||||
* @loglevel: what log level to print, -1 for stdout
|
||||
*/
|
||||
void
|
||||
print_valstr_2col(const struct valstr * vs, const char * title, int loglevel)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (vs == NULL)
|
||||
return;
|
||||
|
||||
if (title != NULL) {
|
||||
if (loglevel < 0)
|
||||
printf("\n%s:\n\n", title);
|
||||
else
|
||||
lprintf(loglevel, "\n%s:\n", title);
|
||||
}
|
||||
|
||||
for (i = 0; vs[i].str != NULL; i++) {
|
||||
if (vs[i+1].str == NULL) {
|
||||
/* last one */
|
||||
if (loglevel < 0) {
|
||||
printf(" %4d %-32s\n", vs[i].val, vs[i].str);
|
||||
} else {
|
||||
lprintf(loglevel, " %4d %-32s\n", vs[i].val, vs[i].str);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (loglevel < 0) {
|
||||
printf(" %4d %-32s %4d %-32s\n",
|
||||
vs[i].val, vs[i].str, vs[i+1].val, vs[i+1].str);
|
||||
} else {
|
||||
lprintf(loglevel, " %4d %-32s %4d %-32s\n",
|
||||
vs[i].val, vs[i].str, vs[i+1].val, vs[i+1].str);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
if (loglevel < 0)
|
||||
printf("\n");
|
||||
else
|
||||
lprintf(loglevel, "");
|
||||
memset(un_str, 0, 16);
|
||||
snprintf(un_str, 16, "Unknown (0x%02x)", val);
|
||||
|
||||
return un_str;
|
||||
}
|
||||
|
||||
/* ipmi_csum - calculate an ipmi checksum
|
||||
*
|
||||
* @d: buffer to check
|
||||
* @s: position in buffer to start checksum from
|
||||
*/
|
||||
uint8_t
|
||||
ipmi_csum(uint8_t * d, int s)
|
||||
void signal_handler(int sig, void * handler)
|
||||
{
|
||||
uint8_t c = 0;
|
||||
for (; s > 0; s--, d++)
|
||||
c += *d;
|
||||
return -c;
|
||||
struct sigaction act;
|
||||
|
||||
if (!sig || !handler)
|
||||
return;
|
||||
|
||||
memset(&act, 0, sizeof(act));
|
||||
act.sa_handler = handler;
|
||||
act.sa_flags = 0;
|
||||
|
||||
if (sigemptyset(&act.sa_mask) < 0) {
|
||||
psignal(sig, "unable to empty signal set");
|
||||
return;
|
||||
}
|
||||
|
||||
if (sigaction(sig, &act, NULL) < 0) {
|
||||
psignal(sig, "unable to register handler");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* ipmi_open_file - safely open a file for reading or writing
|
||||
*
|
||||
* @file: filename
|
||||
* @rw: read-write flag, 1=write
|
||||
*
|
||||
* returns pointer to file handler on success
|
||||
* returns NULL on error
|
||||
*/
|
||||
FILE *
|
||||
ipmi_open_file(const char * file, int rw)
|
||||
{
|
||||
struct stat st1, st2;
|
||||
FILE * fp;
|
||||
|
||||
/* verify existance */
|
||||
if (lstat(file, &st1) < 0) {
|
||||
if (rw) {
|
||||
/* does not exist, ok to create */
|
||||
fp = fopen(file, "w");
|
||||
if (fp == NULL) {
|
||||
lperror(LOG_ERR, "Unable to open file %s "
|
||||
"for write", file);
|
||||
return NULL;
|
||||
}
|
||||
/* created ok, now return the descriptor */
|
||||
return fp;
|
||||
} else {
|
||||
lprintf(LOG_ERR, "File %s does not exist", file);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#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",
|
||||
file, st1.st_mode);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* allow only files with 1 link (itself) */
|
||||
if (st1.st_nlink != 1) {
|
||||
lprintf(LOG_ERR, "File %s has invalid link count: %d != 1",
|
||||
file, (int)st1.st_nlink);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fp = fopen(file, rw ? "w+" : "r");
|
||||
if (fp == NULL) {
|
||||
lperror(LOG_ERR, "Unable to open file %s", file);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* stat again */
|
||||
if (fstat(fileno(fp), &st2) < 0) {
|
||||
lperror(LOG_ERR, "Unable to stat file %s", file);
|
||||
fclose(fp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* verify inode */
|
||||
if (st1.st_ino != st2.st_ino) {
|
||||
lprintf(LOG_ERR, "File %s has invalid inode: %d != %d",
|
||||
file, st1.st_ino, st2.st_ino);
|
||||
fclose(fp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* verify owner */
|
||||
if (st1.st_uid != st2.st_uid) {
|
||||
lprintf(LOG_ERR, "File %s has invalid user id: %d != %d",
|
||||
file, st1.st_uid, st2.st_uid);
|
||||
fclose(fp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* verify inode */
|
||||
if (st2.st_nlink != 1) {
|
||||
lprintf(LOG_ERR, "File %s has invalid link count: %d != 1",
|
||||
file, st2.st_nlink);
|
||||
fclose(fp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return fp;
|
||||
}
|
||||
|
||||
void
|
||||
ipmi_start_daemon(struct ipmi_intf *intf)
|
||||
{
|
||||
pid_t pid;
|
||||
int fd;
|
||||
#ifdef SIGHUP
|
||||
sigset_t sighup;
|
||||
#endif
|
||||
|
||||
#ifdef SIGHUP
|
||||
sigemptyset(&sighup);
|
||||
sigaddset(&sighup, SIGHUP);
|
||||
if (sigprocmask(SIG_UNBLOCK, &sighup, NULL) < 0)
|
||||
fprintf(stderr, "ERROR: could not unblock SIGHUP signal\n");
|
||||
signal(SIGHUP, SIG_IGN);
|
||||
#endif
|
||||
#ifdef SIGTTOU
|
||||
signal(SIGTTOU, SIG_IGN);
|
||||
#endif
|
||||
#ifdef SIGTTIN
|
||||
signal(SIGTTIN, SIG_IGN);
|
||||
#endif
|
||||
#ifdef SIGQUIT
|
||||
signal(SIGQUIT, SIG_IGN);
|
||||
#endif
|
||||
#ifdef SIGTSTP
|
||||
signal(SIGTSTP, SIG_IGN);
|
||||
#endif
|
||||
|
||||
pid = (pid_t) fork();
|
||||
if (pid < 0 || pid > 0)
|
||||
exit(0);
|
||||
|
||||
#if defined(SIGTSTP) && defined(TIOCNOTTY)
|
||||
if (setpgid(0, getpid()) == -1)
|
||||
exit(1);
|
||||
if ((fd = open(_PATH_TTY, O_RDWR)) >= 0) {
|
||||
ioctl(fd, TIOCNOTTY, NULL);
|
||||
close(fd);
|
||||
}
|
||||
#else
|
||||
if (setpgid(0, 0) == -1)
|
||||
exit(1);
|
||||
pid = (pid_t) fork();
|
||||
if (pid < 0 || pid > 0)
|
||||
exit(0);
|
||||
#endif
|
||||
|
||||
chdir("/");
|
||||
umask(0);
|
||||
|
||||
for (fd=0; fd<64; fd++) {
|
||||
if (fd != intf->fd)
|
||||
close(fd);
|
||||
}
|
||||
|
||||
open("/dev/null", O_RDWR);
|
||||
dup(0);
|
||||
dup(0);
|
||||
}
|
||||
|
||||
/* is_fru_id - wrapper for str-2-int FRU ID conversion. Message is printed
|
||||
* on error.
|
||||
* FRU ID range: <0..255>
|
||||
*
|
||||
* @argv_ptr: source string to convert from; usually argv
|
||||
* @fru_id_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) on error and message is printed on STDERR
|
||||
*/
|
||||
int
|
||||
is_fru_id(const char *argv_ptr, uint8_t *fru_id_ptr)
|
||||
{
|
||||
if (!argv_ptr || !fru_id_ptr) {
|
||||
lprintf(LOG_ERR, "is_fru_id(): invalid argument(s).");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if (str2uchar(argv_ptr, fru_id_ptr) == 0) {
|
||||
return 0;
|
||||
}
|
||||
lprintf(LOG_ERR, "FRU ID '%s' is either invalid or out of range.",
|
||||
argv_ptr);
|
||||
return (-1);
|
||||
} /* is_fru_id(...) */
|
||||
|
||||
/* is_ipmi_channel_num - wrapper for str-2-int Channel conversion. Message is
|
||||
* printed on error.
|
||||
*
|
||||
* 6.3 Channel Numbers, p. 45, IPMIv2 spec.
|
||||
* Valid channel numbers are: <0..7>, <E-F>
|
||||
* Reserved channel numbers: <8-D>
|
||||
*
|
||||
* @argv_ptr: source string to convert from; usually argv
|
||||
* @channel_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) on error and message is printed on STDERR
|
||||
*/
|
||||
int
|
||||
is_ipmi_channel_num(const char *argv_ptr, uint8_t *channel_ptr)
|
||||
{
|
||||
if (!argv_ptr || !channel_ptr) {
|
||||
lprintf(LOG_ERR,
|
||||
"is_ipmi_channel_num(): invalid argument(s).");
|
||||
return (-1);
|
||||
}
|
||||
if ((str2uchar(argv_ptr, channel_ptr) == 0)
|
||||
&& ((*channel_ptr >= 0x0 && *channel_ptr <= 0x7)
|
||||
|| (*channel_ptr >= 0xE && *channel_ptr <= 0xF))) {
|
||||
return 0;
|
||||
}
|
||||
lprintf(LOG_ERR,
|
||||
"Given Channel number '%s' is either invalid or out of range.",
|
||||
argv_ptr);
|
||||
lprintf(LOG_ERR, "Channel number must be from ranges: <0..7>, <0xE..0xF>");
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* is_ipmi_user_id() - wrapper for str-2-uint IPMI UID conversion. Message is
|
||||
* printed on error.
|
||||
*
|
||||
* @argv_ptr: source string to convert from; usually argv
|
||||
* @ipmi_uid_ptr: pointer where to store result
|
||||
*
|
||||
* returns zero on success
|
||||
* returns (-1) on error and message is printed on STDERR
|
||||
*/
|
||||
int
|
||||
is_ipmi_user_id(const char *argv_ptr, uint8_t *ipmi_uid_ptr)
|
||||
{
|
||||
if (!argv_ptr || !ipmi_uid_ptr) {
|
||||
lprintf(LOG_ERR,
|
||||
"is_ipmi_user_id(): invalid argument(s).");
|
||||
return (-1);
|
||||
}
|
||||
if ((str2uchar(argv_ptr, ipmi_uid_ptr) == 0)
|
||||
&& *ipmi_uid_ptr >= IPMI_UID_MIN
|
||||
&& *ipmi_uid_ptr <= IPMI_UID_MAX) {
|
||||
return 0;
|
||||
}
|
||||
lprintf(LOG_ERR,
|
||||
"Given User ID '%s' is either invalid or out of range.",
|
||||
argv_ptr);
|
||||
lprintf(LOG_ERR, "User ID is limited to range <%i..%i>.",
|
||||
IPMI_UID_MIN, IPMI_UID_MAX);
|
||||
return (-1);
|
||||
}
|
||||
|
119
ipmitool/lib/ipmi_bmc.c
Normal file
119
ipmitool/lib/ipmi_bmc.c
Normal file
@ -0,0 +1,119 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_bmc.h>
|
||||
|
||||
extern int verbose;
|
||||
|
||||
const struct valstr completion_code_vals[] = {
|
||||
{ 0x00, "Command completed normally" },
|
||||
{ 0xc0, "Node busy" },
|
||||
{ 0xc1, "Invalid command" },
|
||||
{ 0xc2, "Invalid command on LUN" },
|
||||
{ 0xc3, "Timeout" },
|
||||
{ 0xc4, "Out of space" },
|
||||
{ 0xc5, "Reservation cancelled or invalid" },
|
||||
{ 0xc6, "Request data truncated" },
|
||||
{ 0xc7, "Request data length invalid" },
|
||||
{ 0xc8, "Request data field length limit exceeded" },
|
||||
{ 0xc9, "Parameter out of range" },
|
||||
{ 0xca, "Cannot return number of requested data bytes" },
|
||||
{ 0xcb, "Requested sensor, data, or record not found" },
|
||||
{ 0xcc, "Invalid data field in request" },
|
||||
{ 0xcd, "Command illegal for specified sensor or record type" },
|
||||
{ 0xce, "Command response could not be provided" },
|
||||
{ 0xcf, "Cannot execute duplicated request" },
|
||||
{ 0xd0, "SDR Repository in update mode" },
|
||||
{ 0xd1, "Device firmeware in update mode" },
|
||||
{ 0xd2, "BMC initialization in progress" },
|
||||
{ 0xd3, "Destination unavailable" },
|
||||
{ 0xd4, "Insufficient priviledge level" },
|
||||
{ 0xd5, "Command not supported in present state" },
|
||||
{ 0xff, "Unspecified error" },
|
||||
{ 0x00, NULL }
|
||||
};
|
||||
|
||||
static int ipmi_bmc_reset(struct ipmi_intf * intf, int cmd)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_APP;
|
||||
req.msg.cmd = cmd;
|
||||
req.msg.data_len = 0;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (!rsp) {
|
||||
printf("Error in BMC Reset Command\n");
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode) {
|
||||
printf("BMC Reset Command returned %x\n", rsp->ccode);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ipmi_bmc_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
{
|
||||
if (!argc || !strncmp(argv[0], "help", 4)) {
|
||||
printf("BMC Commands: reset\n");
|
||||
return 0;
|
||||
}
|
||||
else if (!strncmp(argv[0], "reset", 5)) {
|
||||
if (argc < 2 || !strncmp(argv[1], "help", 4)) {
|
||||
printf("reset commands: warm, cold\n");
|
||||
}
|
||||
else if (!strncmp(argv[1], "cold", 4)) {
|
||||
ipmi_bmc_reset(intf, BMC_COLD_RESET);
|
||||
}
|
||||
else if (!strncmp(argv[1], "warm", 4)) {
|
||||
ipmi_bmc_reset(intf, BMC_WARM_RESET);
|
||||
}
|
||||
else {
|
||||
printf("reset commands: warm, cold\n");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,903 +0,0 @@
|
||||
/* -*-mode: C; indent-tabs-mode: t; -*-
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_intf.h>
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/log.h>
|
||||
#include <ipmitool/ipmi_lanp.h>
|
||||
#include <ipmitool/ipmi_channel.h>
|
||||
#include <ipmitool/ipmi_strings.h>
|
||||
#include <ipmitool/ipmi_constants.h>
|
||||
|
||||
extern int csv_output;
|
||||
extern int verbose;
|
||||
|
||||
void printf_channel_usage (void);
|
||||
|
||||
/**
|
||||
* ipmi_1_5_authtypes
|
||||
*
|
||||
* Create a string describing the supported authentication types as
|
||||
* specificed by the parameter n
|
||||
*/
|
||||
static const char *
|
||||
ipmi_1_5_authtypes(uint8_t n)
|
||||
{
|
||||
uint32_t i;
|
||||
static char supportedTypes[128];
|
||||
|
||||
bzero(supportedTypes, 128);
|
||||
|
||||
for (i = 0; ipmi_authtype_vals[i].val != 0; i++) {
|
||||
if (n & ipmi_authtype_vals[i].val) {
|
||||
strcat(supportedTypes, ipmi_authtype_vals[i].str);
|
||||
strcat(supportedTypes, " ");
|
||||
}
|
||||
}
|
||||
|
||||
return supportedTypes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ipmi_get_channel_auth_cap
|
||||
*
|
||||
* return 0 on success
|
||||
* -1 on failure
|
||||
*/
|
||||
int
|
||||
ipmi_get_channel_auth_cap(struct ipmi_intf * intf,
|
||||
uint8_t channel,
|
||||
uint8_t priv)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
struct get_channel_auth_cap_rsp auth_cap;
|
||||
uint8_t msg_data[2];
|
||||
|
||||
msg_data[0] = channel | 0x80; // Ask for IPMI v2 data as well
|
||||
msg_data[1] = priv;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_APP; // 0x06
|
||||
req.msg.cmd = IPMI_GET_CHANNEL_AUTH_CAP; // 0x38
|
||||
req.msg.data = msg_data;
|
||||
req.msg.data_len = 2;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
|
||||
if ((rsp == NULL) || (rsp->ccode > 0)) {
|
||||
/*
|
||||
* It's very possible that this failed because we asked for IPMI v2 data
|
||||
* Ask again, without requesting IPMI v2 data
|
||||
*/
|
||||
msg_data[0] &= 0x7F;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to Get Channel Authentication Capabilities");
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Channel Authentication Capabilities failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(&auth_cap, rsp->data, sizeof(struct get_channel_auth_cap_rsp));
|
||||
|
||||
printf("Channel number : %d\n",
|
||||
auth_cap.channel_number);
|
||||
printf("IPMI v1.5 auth types : %s\n",
|
||||
ipmi_1_5_authtypes(auth_cap.enabled_auth_types));
|
||||
|
||||
if (auth_cap.v20_data_available)
|
||||
printf("KG status : %s\n",
|
||||
(auth_cap.kg_status) ? "non-zero" : "default (all zeroes)");
|
||||
|
||||
printf("Per message authentication : %sabled\n",
|
||||
(auth_cap.per_message_auth) ? "dis" : "en");
|
||||
printf("User level authentication : %sabled\n",
|
||||
(auth_cap.user_level_auth) ? "dis" : "en");
|
||||
|
||||
printf("Non-null user names exist : %s\n",
|
||||
(auth_cap.non_null_usernames) ? "yes" : "no");
|
||||
printf("Null user names exist : %s\n",
|
||||
(auth_cap.null_usernames) ? "yes" : "no");
|
||||
printf("Anonymous login enabled : %s\n",
|
||||
(auth_cap.anon_login_enabled) ? "yes" : "no");
|
||||
|
||||
if (auth_cap.v20_data_available) {
|
||||
printf("Channel supports IPMI v1.5 : %s\n",
|
||||
(auth_cap.ipmiv15_support) ? "yes" : "no");
|
||||
printf("Channel supports IPMI v2.0 : %s\n",
|
||||
(auth_cap.ipmiv20_support) ? "yes" : "no");
|
||||
}
|
||||
|
||||
/*
|
||||
* If there is support for an OEM authentication type, there is some
|
||||
* information.
|
||||
*/
|
||||
if (auth_cap.enabled_auth_types & IPMI_1_5_AUTH_TYPE_BIT_OEM) {
|
||||
printf("IANA Number for OEM : %d\n",
|
||||
auth_cap.oem_id[0] |
|
||||
auth_cap.oem_id[1] << 8 |
|
||||
auth_cap.oem_id[2] << 16);
|
||||
printf("OEM Auxiliary Data : 0x%x\n",
|
||||
auth_cap.oem_aux_data);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* ipmi_get_channel_info
|
||||
*
|
||||
* returns 0 on success
|
||||
* -1 on failure
|
||||
*
|
||||
*/
|
||||
int
|
||||
ipmi_get_channel_info(struct ipmi_intf * intf, uint8_t channel)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t rqdata[2];
|
||||
uint8_t medium;
|
||||
struct get_channel_info_rsp channel_info;
|
||||
struct get_channel_access_rsp channel_access;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_APP; // 0x06
|
||||
req.msg.cmd = IPMI_GET_CHANNEL_INFO; // 0x42
|
||||
req.msg.data = &channel;
|
||||
req.msg.data_len = 1;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to Get Channel Info");
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Channel Info failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(&channel_info, rsp->data, sizeof(struct get_channel_info_rsp));
|
||||
|
||||
printf("Channel 0x%x info:\n", channel_info.channel_number);
|
||||
|
||||
printf(" Channel Medium Type : %s\n",
|
||||
val2str(channel_info.channel_medium, ipmi_channel_medium_vals));
|
||||
|
||||
printf(" Channel Protocol Type : %s\n",
|
||||
val2str(channel_info.channel_protocol, ipmi_channel_protocol_vals));
|
||||
|
||||
printf(" Session Support : ");
|
||||
switch (channel_info.session_support) {
|
||||
case 0x0:
|
||||
printf("session-less\n");
|
||||
break;
|
||||
case 0x1:
|
||||
printf("single-session\n");
|
||||
break;
|
||||
case 0x2:
|
||||
printf("multi-session\n");
|
||||
break;
|
||||
case 0x3:
|
||||
default:
|
||||
printf("session-based\n");
|
||||
break;
|
||||
}
|
||||
|
||||
printf(" Active Session Count : %d\n",
|
||||
channel_info.active_sessions);
|
||||
|
||||
printf(" Protocol Vendor ID : %d\n",
|
||||
channel_info.vendor_id[0] |
|
||||
channel_info.vendor_id[1] << 8 |
|
||||
channel_info.vendor_id[2] << 16);
|
||||
|
||||
|
||||
/* only proceed if this is LAN channel */
|
||||
medium = ipmi_get_channel_medium(intf, channel);
|
||||
if (medium != IPMI_CHANNEL_MEDIUM_LAN &&
|
||||
medium != IPMI_CHANNEL_MEDIUM_LAN_OTHER) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
rqdata[0] = channel & 0xf;
|
||||
|
||||
/* get volatile settings */
|
||||
|
||||
rqdata[1] = 0x80; /* 0x80=active */
|
||||
req.msg.netfn = IPMI_NETFN_APP; // 0x06
|
||||
req.msg.cmd = IPMI_GET_CHANNEL_ACCESS; // 0x41
|
||||
req.msg.data = rqdata;
|
||||
req.msg.data_len = 2;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to Get Channel Access (volatile)");
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Channel Access (volatile) failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(&channel_access, rsp->data, sizeof(struct get_channel_access_rsp));
|
||||
|
||||
|
||||
printf(" Volatile(active) Settings\n");
|
||||
printf(" Alerting : %sabled\n",
|
||||
(channel_access.alerting) ? "dis" : "en");
|
||||
printf(" Per-message Auth : %sabled\n",
|
||||
(channel_access.per_message_auth) ? "dis" : "en");
|
||||
printf(" User Level Auth : %sabled\n",
|
||||
(channel_access.user_level_auth) ? "dis" : "en");
|
||||
|
||||
printf(" Access Mode : ");
|
||||
switch (channel_access.access_mode) {
|
||||
case 0:
|
||||
printf("disabled\n");
|
||||
break;
|
||||
case 1:
|
||||
printf("pre-boot only\n");
|
||||
break;
|
||||
case 2:
|
||||
printf("always available\n");
|
||||
break;
|
||||
case 3:
|
||||
printf("shared\n");
|
||||
break;
|
||||
default:
|
||||
printf("unknown\n");
|
||||
break;
|
||||
}
|
||||
|
||||
/* get non-volatile settings */
|
||||
|
||||
rqdata[1] = 0x40; /* 0x40=non-volatile */
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to Get Channel Access (non-volatile)");
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Channel Access (non-volatile) failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(&channel_access, rsp->data, sizeof(struct get_channel_access_rsp));
|
||||
|
||||
printf(" Non-Volatile Settings\n");
|
||||
printf(" Alerting : %sabled\n",
|
||||
(channel_access.alerting) ? "dis" : "en");
|
||||
printf(" Per-message Auth : %sabled\n",
|
||||
(channel_access.per_message_auth) ? "dis" : "en");
|
||||
printf(" User Level Auth : %sabled\n",
|
||||
(channel_access.user_level_auth) ? "dis" : "en");
|
||||
|
||||
printf(" Access Mode : ");
|
||||
switch (channel_access.access_mode) {
|
||||
case 0:
|
||||
printf("disabled\n");
|
||||
break;
|
||||
case 1:
|
||||
printf("pre-boot only\n");
|
||||
break;
|
||||
case 2:
|
||||
printf("always available\n");
|
||||
break;
|
||||
case 3:
|
||||
printf("shared\n");
|
||||
break;
|
||||
default:
|
||||
printf("unknown\n");
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_get_user_access(struct ipmi_intf * intf, uint8_t channel, uint8_t userid)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req1, req2;
|
||||
uint8_t rqdata[2];
|
||||
struct get_user_access_rsp user_access;
|
||||
int curr_uid, max_uid = 0, init = 1;
|
||||
|
||||
curr_uid = userid ? : 1;
|
||||
|
||||
memset(&req1, 0, sizeof(req1));
|
||||
req1.msg.netfn = IPMI_NETFN_APP;
|
||||
req1.msg.cmd = IPMI_GET_USER_ACCESS;
|
||||
req1.msg.data = rqdata;
|
||||
req1.msg.data_len = 2;
|
||||
|
||||
memset(&req2, 0, sizeof(req2));
|
||||
req2.msg.netfn = IPMI_NETFN_APP;
|
||||
req2.msg.cmd = IPMI_GET_USER_NAME;
|
||||
req2.msg.data = rqdata;
|
||||
req2.msg.data_len = 1;
|
||||
|
||||
do
|
||||
{
|
||||
rqdata[0] = channel & 0xf;
|
||||
rqdata[1] = curr_uid & 0x3f;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req1);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to Get User Access (channel %d id %d)",
|
||||
rqdata[0], rqdata[1]);
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get User Access (channel %d id %d) failed: %s",
|
||||
rqdata[0], rqdata[1],
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(&user_access, rsp->data, sizeof(struct get_user_access_rsp));
|
||||
|
||||
rqdata[0] = curr_uid & 0x3f;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req2);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to Get User Name (id %d)", rqdata[0]);
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get User Name (id %d) failed: %s",
|
||||
rqdata[0], val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (init) {
|
||||
printf("Maximum User IDs : %d\n", user_access.max_user_ids);
|
||||
printf("Enabled User IDs : %d\n", user_access.enabled_user_ids);
|
||||
max_uid = user_access.max_user_ids;
|
||||
init = 0;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
printf("User ID : %d\n", curr_uid);
|
||||
printf("User Name : %s\n", rsp->data);
|
||||
printf("Fixed Name : %s\n",
|
||||
(curr_uid <= user_access.fixed_user_ids) ? "Yes" : "No");
|
||||
printf("Access Available : %s\n",
|
||||
(user_access.callin_callback) ? "callback" : "call-in / callback");
|
||||
printf("Link Authentication : %sabled\n",
|
||||
(user_access.link_auth) ? "en" : "dis");
|
||||
printf("IPMI Messaging : %sabled\n",
|
||||
(user_access.ipmi_messaging) ? "en" : "dis");
|
||||
printf("Privilege Level : %s\n",
|
||||
val2str(user_access.privilege_limit, ipmi_privlvl_vals));
|
||||
|
||||
curr_uid ++;
|
||||
|
||||
} while (!userid && curr_uid <= max_uid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_set_user_access(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
{
|
||||
uint8_t channel, privilege_limit, userid;
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t rqdata[2];
|
||||
struct get_user_access_rsp user_access;
|
||||
struct set_user_access_data set_access;
|
||||
int i;
|
||||
|
||||
if ((argc < 3) || (strncmp(argv[0], "help", 4) == 0)) {
|
||||
printf_channel_usage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (str2uchar(argv[0], &channel) != 0) {
|
||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[0]);
|
||||
return (-1);
|
||||
}
|
||||
if (str2uchar(argv[1], &userid) != 0) {
|
||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[1]);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_APP;
|
||||
req.msg.cmd = IPMI_GET_USER_ACCESS;
|
||||
req.msg.data = rqdata;
|
||||
req.msg.data_len = 2;
|
||||
|
||||
rqdata[0] = channel & 0xf;
|
||||
rqdata[1] = userid & 0x3f;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to Get User Access (channel %d id %d)",
|
||||
rqdata[0], rqdata[1]);
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get User Access (channel %d id %d) failed: %s",
|
||||
rqdata[0], rqdata[1],
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
memcpy(&user_access, rsp->data, sizeof(struct get_user_access_rsp));
|
||||
|
||||
memset(&set_access, 0, sizeof(set_access));
|
||||
set_access.change_bits = 1;
|
||||
set_access.callin_callback = user_access.callin_callback;
|
||||
set_access.link_auth = user_access.link_auth;
|
||||
set_access.ipmi_messaging = user_access.ipmi_messaging;
|
||||
set_access.channel = channel;
|
||||
set_access.user_id = userid;
|
||||
set_access.privilege_limit = user_access.privilege_limit;
|
||||
set_access.session_limit = 0;
|
||||
|
||||
for (i = 2; i < argc; i ++)
|
||||
{
|
||||
if (strncmp(argv[i], "callin=", 7) == 0) {
|
||||
set_access.callin_callback = !(strncmp (argv[i]+7, "off", 3));
|
||||
}
|
||||
else if (strncmp(argv[i], "link=", 5) == 0) {
|
||||
set_access.link_auth = strncmp (argv[i]+5, "off", 3);
|
||||
}
|
||||
else if (strncmp(argv[i], "ipmi=", 5) == 0) {
|
||||
set_access.ipmi_messaging = strncmp (argv[i]+5, "off", 3);
|
||||
}
|
||||
else if (strncmp(argv[i], "privilege=", 10) == 0) {
|
||||
if (str2uchar(argv[i]+10, &privilege_limit) != 0) {
|
||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[i]+10);
|
||||
return (-1);
|
||||
}
|
||||
set_access.privilege_limit = privilege_limit;
|
||||
}
|
||||
else {
|
||||
printf ("Invalid option: %s\n", argv [i]);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_APP;
|
||||
req.msg.cmd = IPMI_SET_USER_ACCESS;
|
||||
req.msg.data = (uint8_t *) &set_access;
|
||||
req.msg.data_len = 4;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to Set User Access (channel %d id %d)",
|
||||
set_access.channel, set_access.user_id);
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Set User Access (channel %d id %d) failed: %s",
|
||||
set_access.channel, set_access.user_id,
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static const char *
|
||||
iana_string(uint32_t iana)
|
||||
{
|
||||
static char s[10];
|
||||
|
||||
if (iana)
|
||||
{
|
||||
sprintf(s, "%06x", iana);
|
||||
return s;
|
||||
}
|
||||
else
|
||||
return "N/A";
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ipmi_get_channel_cipher_suites(struct ipmi_intf * intf,
|
||||
const char * payload_type,
|
||||
uint8_t channel)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
|
||||
uint8_t oem_record;
|
||||
uint8_t rqdata[3];
|
||||
uint32_t iana;
|
||||
uint8_t auth_alg, integrity_alg, crypt_alg;
|
||||
uint8_t cipher_suite_id;
|
||||
uint8_t list_index = 0;
|
||||
uint8_t cipher_suite_data[1024]; // 0x40 sets * 16 bytes per set
|
||||
uint16_t offset = 0;
|
||||
uint16_t cipher_suite_data_length = 0; // how much was returned, total
|
||||
|
||||
memset(cipher_suite_data, 0, sizeof(cipher_suite_data));
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_APP; // 0x06
|
||||
req.msg.cmd = IPMI_GET_CHANNEL_CIPHER_SUITES; // 0x54
|
||||
req.msg.data = rqdata;
|
||||
req.msg.data_len = 3;
|
||||
|
||||
rqdata[0] = channel;
|
||||
rqdata[1] = ((strncmp(payload_type, "ipmi", 4) == 0)? 0: 1);
|
||||
rqdata[2] = 0x80; // Always ask for cipher suite format
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to Get Channel Cipher Suites");
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Channel Cipher Suites failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
// Grab the returned channel number once. We assume it's the same
|
||||
// in future calls.
|
||||
if (rsp->data_len >= 1)
|
||||
channel = rsp->data[0];
|
||||
|
||||
while ((rsp->data_len > 1) && (rsp->data_len == 17) && (list_index < 0x3F))
|
||||
{
|
||||
//
|
||||
// We got back cipher suite data -- store it.
|
||||
//printf("copying data to offset %d\n", offset);
|
||||
//printbuf(rsp->data + 1, rsp->data_len - 1, "this is the data");
|
||||
memcpy(cipher_suite_data + offset, rsp->data + 1, rsp->data_len - 1);
|
||||
offset += rsp->data_len - 1;
|
||||
|
||||
//
|
||||
// Increment our list for the next call
|
||||
//
|
||||
++list_index;
|
||||
rqdata[2] = (rqdata[2] & 0x80) + list_index;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Unable to Get Channel Cipher Suites");
|
||||
return -1;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Get Channel Cipher Suites failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Copy last chunk */
|
||||
if(rsp->data_len > 1)
|
||||
{
|
||||
//
|
||||
// We got back cipher suite data -- store it.
|
||||
//printf("copying data to offset %d\n", offset);
|
||||
//printbuf(rsp->data + 1, rsp->data_len - 1, "this is the data");
|
||||
memcpy(cipher_suite_data + offset, rsp->data + 1, rsp->data_len - 1);
|
||||
offset += rsp->data_len - 1;
|
||||
}
|
||||
|
||||
//
|
||||
// We can chomp on all our data now.
|
||||
//
|
||||
cipher_suite_data_length = offset;
|
||||
offset = 0;
|
||||
|
||||
if (! csv_output)
|
||||
printf("ID IANA Auth Alg Integrity Alg Confidentiality Alg\n");
|
||||
|
||||
while (offset < cipher_suite_data_length)
|
||||
{
|
||||
if (cipher_suite_data[offset++] == 0xC0)
|
||||
{
|
||||
oem_record = 0; // standard type
|
||||
iana = 0;
|
||||
|
||||
// Verify that we have at least a full record left
|
||||
if ((cipher_suite_data_length - offset) < 4) // id + 3 algs
|
||||
{
|
||||
lprintf(LOG_ERR, "Incomplete data record in cipher suite data");
|
||||
return -1;
|
||||
}
|
||||
|
||||
cipher_suite_id = cipher_suite_data[offset++];
|
||||
|
||||
}
|
||||
else if (cipher_suite_data[offset++] == 0xC1)
|
||||
{
|
||||
oem_record = 1; // OEM record type
|
||||
|
||||
// Verify that we have at least a full record left
|
||||
if ((cipher_suite_data_length - offset) < 4) // id + iana + 3 algs
|
||||
{
|
||||
lprintf(LOG_ERR, "Incomplete data record in cipher suite data");
|
||||
return -1;
|
||||
}
|
||||
|
||||
cipher_suite_id = cipher_suite_data[offset++];
|
||||
|
||||
//
|
||||
// Grab the IANA
|
||||
//
|
||||
iana =
|
||||
cipher_suite_data[offset] |
|
||||
(cipher_suite_data[offset + 1] << 8) |
|
||||
(cipher_suite_data[offset + 2] << 16);
|
||||
offset += 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
lprintf(LOG_ERR, "Bad start of record byte in cipher suite data");
|
||||
return -1;
|
||||
}
|
||||
|
||||
//
|
||||
// Grab the algorithms for this cipher suite. I guess we can't be
|
||||
// sure of what order they'll come in. Also, I suppose we default
|
||||
// to the NONE algorithm if one were absent. This part of the spec is
|
||||
// poorly written -- I have read the errata document. For now, I'm only
|
||||
// allowing one algorithm per type (auth, integrity, crypt) because I
|
||||
// don't I understand how it could be otherwise.
|
||||
//
|
||||
auth_alg = IPMI_AUTH_RAKP_NONE;
|
||||
integrity_alg = IPMI_INTEGRITY_NONE;
|
||||
crypt_alg = IPMI_CRYPT_NONE;
|
||||
|
||||
while (((cipher_suite_data[offset] & 0xC0) != 0xC0) &&
|
||||
((cipher_suite_data_length - offset) > 0))
|
||||
{
|
||||
switch (cipher_suite_data[offset] & 0xC0)
|
||||
{
|
||||
case 0x00:
|
||||
// Authentication algorithm specifier
|
||||
auth_alg = cipher_suite_data[offset++] & 0x3F;
|
||||
break;
|
||||
case 0x40:
|
||||
// Interity algorithm specifier
|
||||
integrity_alg = cipher_suite_data[offset++] & 0x3F;
|
||||
break;
|
||||
case 0x80:
|
||||
// Confidentiality algorithm specifier
|
||||
crypt_alg = cipher_suite_data[offset++] & 0x3F;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// We have everything we need to spit out a cipher suite record
|
||||
//
|
||||
printf((csv_output? "%d,%s,%s,%s,%s\n" :
|
||||
"%-4d %-7s %-15s %-15s %-15s\n"),
|
||||
cipher_suite_id,
|
||||
iana_string(iana),
|
||||
val2str(auth_alg, ipmi_auth_algorithms),
|
||||
val2str(integrity_alg, ipmi_integrity_algorithms),
|
||||
val2str(crypt_alg, ipmi_encryption_algorithms));
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
uint8_t
|
||||
ipmi_get_channel_medium(struct ipmi_intf * intf, uint8_t channel)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
struct get_channel_info_rsp info;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_APP;
|
||||
req.msg.cmd = IPMI_GET_CHANNEL_INFO;
|
||||
req.msg.data = &channel;
|
||||
req.msg.data_len = 1;
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Get Channel Info command failed");
|
||||
return 0;
|
||||
}
|
||||
if (rsp->ccode > 0) {
|
||||
if (rsp->ccode == 0xcc)
|
||||
return IPMI_CHANNEL_MEDIUM_RESERVED;
|
||||
lprintf(LOG_INFO, "Get Channel Info command failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return IPMI_CHANNEL_MEDIUM_RESERVED;
|
||||
}
|
||||
|
||||
memcpy(&info, rsp->data, sizeof(struct get_channel_info_rsp));
|
||||
|
||||
lprintf(LOG_DEBUG, "Channel type: %s",
|
||||
val2str(info.channel_medium, ipmi_channel_medium_vals));
|
||||
|
||||
return info.channel_medium;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
ipmi_current_channel_medium(struct ipmi_intf * intf)
|
||||
{
|
||||
return ipmi_get_channel_medium(intf, 0xE);
|
||||
}
|
||||
|
||||
void
|
||||
printf_channel_usage()
|
||||
{
|
||||
lprintf(LOG_NOTICE, "Channel Commands: authcap <channel number> <max privilege>");
|
||||
lprintf(LOG_NOTICE, " getaccess <channel number> [user id]");
|
||||
lprintf(LOG_NOTICE, " setaccess <channel number> "
|
||||
"<user id> [callin=on|off] [ipmi=on|off] [link=on|off] [privilege=level]");
|
||||
lprintf(LOG_NOTICE, " info [channel number]");
|
||||
lprintf(LOG_NOTICE, " getciphers <ipmi | sol> [channel]\n");
|
||||
lprintf(LOG_NOTICE, "Possible privilege levels are:");
|
||||
lprintf(LOG_NOTICE, " 1 Callback level");
|
||||
lprintf(LOG_NOTICE, " 2 User level");
|
||||
lprintf(LOG_NOTICE, " 3 Operator level");
|
||||
lprintf(LOG_NOTICE, " 4 Administrator level");
|
||||
lprintf(LOG_NOTICE, " 5 OEM Proprietary level");
|
||||
lprintf(LOG_NOTICE, " 15 No access");
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ipmi_channel_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
{
|
||||
int retval = 0;
|
||||
uint8_t channel, priv = 0;
|
||||
|
||||
if ((argc == 0) || (strncmp(argv[0], "help", 4) == 0))
|
||||
{
|
||||
printf_channel_usage();
|
||||
}
|
||||
else if (strncmp(argv[0], "authcap", 7) == 0)
|
||||
{
|
||||
if (argc != 3) {
|
||||
printf_channel_usage();
|
||||
return (-1);
|
||||
} else {
|
||||
if (str2uchar(argv[1], &channel) != 0) {
|
||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[1]);
|
||||
return (-1);
|
||||
}
|
||||
if (str2uchar(argv[2], &priv) != 0) {
|
||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[2]);
|
||||
return (-1);
|
||||
}
|
||||
retval = ipmi_get_channel_auth_cap(intf, channel, priv);
|
||||
}
|
||||
}
|
||||
else if (strncmp(argv[0], "getaccess", 10) == 0)
|
||||
{
|
||||
if ((argc < 2) || (argc > 3))
|
||||
printf_channel_usage();
|
||||
else {
|
||||
uint8_t ch = 0;
|
||||
uint8_t id = 0;
|
||||
if (str2uchar(argv[1], &ch) != 0) {
|
||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[1]);
|
||||
return (-1);
|
||||
}
|
||||
if (argc == 3) {
|
||||
if (str2uchar(argv[2], &id) != 0) {
|
||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[2]);
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
retval = ipmi_get_user_access(intf, ch, id);
|
||||
}
|
||||
}
|
||||
else if (strncmp(argv[0], "setaccess", 9) == 0)
|
||||
{
|
||||
retval = ipmi_set_user_access(intf, argc-1, &(argv[1]));
|
||||
}
|
||||
else if (strncmp(argv[0], "info", 4) == 0)
|
||||
{
|
||||
if (argc > 2)
|
||||
printf_channel_usage();
|
||||
else {
|
||||
uint8_t ch = 0xe;
|
||||
if (argc == 2) {
|
||||
if (str2uchar(argv[1], &ch) != 0) {
|
||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[1]);
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
retval = ipmi_get_channel_info(intf, ch);
|
||||
}
|
||||
}
|
||||
|
||||
// it channel getciphers <ipmi | sol> [channel]
|
||||
else if (strncmp(argv[0], "getciphers", 10) == 0)
|
||||
{
|
||||
if ((argc < 2) || (argc > 3) ||
|
||||
(strncmp(argv[1], "ipmi", 4) && strncmp(argv[1], "sol", 3)))
|
||||
printf_channel_usage();
|
||||
else
|
||||
{
|
||||
uint8_t ch = 0xe;
|
||||
if (argc == 3) {
|
||||
if (str2uchar(argv[2], &ch) != 0) {
|
||||
lprintf(LOG_ERR, "Numeric value expected, but '%s' given.", argv[2]);
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
retval = ipmi_get_channel_cipher_suites(intf,
|
||||
argv[1], // ipmi | sol
|
||||
ch);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Invalid CHANNEL command: %s\n", argv[0]);
|
||||
printf_channel_usage();
|
||||
retval = -1;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,642 +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.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_intf.h>
|
||||
#include <ipmitool/helper.h>
|
||||
#include <ipmitool/log.h>
|
||||
#include <ipmitool/ipmi_sel.h>
|
||||
#include <ipmitool/ipmi_strings.h>
|
||||
#include <ipmitool/ipmi_channel.h>
|
||||
#include <ipmitool/ipmi_event.h>
|
||||
#include <ipmitool/ipmi_sdr.h>
|
||||
|
||||
|
||||
static void
|
||||
ipmi_event_msg_print(struct ipmi_intf * intf, struct platform_event_msg * pmsg)
|
||||
{
|
||||
struct sel_event_record sel_event;
|
||||
|
||||
memset(&sel_event, 0, sizeof(struct sel_event_record));
|
||||
|
||||
sel_event.record_id = 0;
|
||||
sel_event.sel_type.standard_type.gen_id = 2;
|
||||
|
||||
sel_event.sel_type.standard_type.evm_rev = pmsg->evm_rev;
|
||||
sel_event.sel_type.standard_type.sensor_type = pmsg->sensor_type;
|
||||
sel_event.sel_type.standard_type.sensor_num = pmsg->sensor_num;
|
||||
sel_event.sel_type.standard_type.event_type = pmsg->event_type;
|
||||
sel_event.sel_type.standard_type.event_dir = pmsg->event_dir;
|
||||
sel_event.sel_type.standard_type.event_data[0] = pmsg->event_data[0];
|
||||
sel_event.sel_type.standard_type.event_data[1] = pmsg->event_data[1];
|
||||
sel_event.sel_type.standard_type.event_data[2] = pmsg->event_data[2];
|
||||
|
||||
if (verbose)
|
||||
ipmi_sel_print_extended_entry_verbose(intf, &sel_event);
|
||||
else
|
||||
ipmi_sel_print_extended_entry(intf, &sel_event);
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_send_platform_event(struct ipmi_intf * intf, struct platform_event_msg * emsg)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
uint8_t rqdata[8];
|
||||
uint8_t chmed;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
memset(rqdata, 0, 8);
|
||||
|
||||
req.msg.netfn = IPMI_NETFN_SE;
|
||||
req.msg.cmd = 0x02;
|
||||
req.msg.data = rqdata;
|
||||
|
||||
chmed = ipmi_current_channel_medium(intf);
|
||||
if (chmed == IPMI_CHANNEL_MEDIUM_SYSTEM) {
|
||||
/* system interface, need extra generator ID */
|
||||
req.msg.data_len = 8;
|
||||
rqdata[0] = 0x41; // As per Fig. 29-2 and Table 5-4
|
||||
memcpy(rqdata+1, emsg, sizeof(struct platform_event_msg));
|
||||
}
|
||||
else {
|
||||
req.msg.data_len = 7;
|
||||
memcpy(rqdata, emsg, sizeof(struct platform_event_msg));
|
||||
}
|
||||
|
||||
ipmi_event_msg_print(intf, emsg);
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Platform Event Message command failed");
|
||||
return -1;
|
||||
}
|
||||
else if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Platform Event Message command failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define EVENT_THRESH_STATE_LNC_LO 0
|
||||
#define EVENT_THRESH_STATE_LNC_HI 1
|
||||
#define EVENT_THRESH_STATE_LCR_LO 2
|
||||
#define EVENT_THRESH_STATE_LCR_HI 3
|
||||
#define EVENT_THRESH_STATE_LNR_LO 4
|
||||
#define EVENT_THRESH_STATE_LNR_HI 5
|
||||
#define EVENT_THRESH_STATE_UNC_LO 6
|
||||
#define EVENT_THRESH_STATE_UNC_HI 7
|
||||
#define EVENT_THRESH_STATE_UCR_LO 8
|
||||
#define EVENT_THRESH_STATE_UCR_HI 9
|
||||
#define EVENT_THRESH_STATE_UNR_LO 10
|
||||
#define EVENT_THRESH_STATE_UNR_HI 11
|
||||
|
||||
static const struct valstr ipmi_event_thresh_lo[] = {
|
||||
{ EVENT_THRESH_STATE_LNC_LO, "lnc" },
|
||||
{ EVENT_THRESH_STATE_LCR_LO, "lcr" },
|
||||
{ EVENT_THRESH_STATE_LNR_LO, "lnr" },
|
||||
{ EVENT_THRESH_STATE_UNC_LO, "unc" },
|
||||
{ EVENT_THRESH_STATE_UCR_LO, "ucr" },
|
||||
{ EVENT_THRESH_STATE_UNR_LO, "unr" },
|
||||
{ 0, NULL },
|
||||
};
|
||||
static const struct valstr ipmi_event_thresh_hi[] = {
|
||||
{ EVENT_THRESH_STATE_LNC_HI, "lnc" },
|
||||
{ EVENT_THRESH_STATE_LCR_HI, "lcr" },
|
||||
{ EVENT_THRESH_STATE_LNR_HI, "lnr" },
|
||||
{ EVENT_THRESH_STATE_UNC_HI, "unc" },
|
||||
{ EVENT_THRESH_STATE_UCR_HI, "ucr" },
|
||||
{ EVENT_THRESH_STATE_UNR_HI, "unr" },
|
||||
{ 0, NULL },
|
||||
};
|
||||
|
||||
static int
|
||||
ipmi_send_platform_event_num(struct ipmi_intf * intf, int num)
|
||||
{
|
||||
struct platform_event_msg emsg;
|
||||
|
||||
memset(&emsg, 0, sizeof(struct platform_event_msg));
|
||||
|
||||
/* IPMB/LAN/etc */
|
||||
switch (num) {
|
||||
case 1: /* temperature */
|
||||
printf("Sending SAMPLE event: Temperature - "
|
||||
"Upper Critical - Going High\n");
|
||||
emsg.evm_rev = 0x04;
|
||||
emsg.sensor_type = 0x01;
|
||||
emsg.sensor_num = 0x30;
|
||||
emsg.event_dir = EVENT_DIR_ASSERT;
|
||||
emsg.event_type = 0x01;
|
||||
emsg.event_data[0] = EVENT_THRESH_STATE_UCR_HI;
|
||||
emsg.event_data[1] = 0xff;
|
||||
emsg.event_data[2] = 0xff;
|
||||
break;
|
||||
case 2: /* voltage error */
|
||||
printf("Sending SAMPLE event: Voltage Threshold - "
|
||||
"Lower Critical - Going Low\n");
|
||||
emsg.evm_rev = 0x04;
|
||||
emsg.sensor_type = 0x02;
|
||||
emsg.sensor_num = 0x60;
|
||||
emsg.event_dir = EVENT_DIR_ASSERT;
|
||||
emsg.event_type = 0x01;
|
||||
emsg.event_data[0] = EVENT_THRESH_STATE_LCR_LO;
|
||||
emsg.event_data[1] = 0xff;
|
||||
emsg.event_data[2] = 0xff;
|
||||
break;
|
||||
case 3: /* correctable ECC */
|
||||
printf("Sending SAMPLE event: Memory - Correctable ECC\n");
|
||||
emsg.evm_rev = 0x04;
|
||||
emsg.sensor_type = 0x0c;
|
||||
emsg.sensor_num = 0x53;
|
||||
emsg.event_dir = EVENT_DIR_ASSERT;
|
||||
emsg.event_type = 0x6f;
|
||||
emsg.event_data[0] = 0x00;
|
||||
emsg.event_data[1] = 0xff;
|
||||
emsg.event_data[2] = 0xff;
|
||||
break;
|
||||
default:
|
||||
lprintf(LOG_ERR, "Invalid event number: %d", num);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return ipmi_send_platform_event(intf, &emsg);
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_event_find_offset(uint8_t code,
|
||||
struct ipmi_event_sensor_types * evt,
|
||||
char * desc)
|
||||
{
|
||||
if (desc == NULL || code == 0)
|
||||
return 0x00;
|
||||
|
||||
while (evt->type) {
|
||||
if (evt->code == code && evt->desc != NULL &&
|
||||
strncasecmp(desc, evt->desc, __maxlen(desc, evt->desc)) == 0)
|
||||
return evt->offset;
|
||||
evt++;
|
||||
}
|
||||
|
||||
lprintf(LOG_WARN, "Unable to find matching event offset for '%s'", desc);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void
|
||||
print_sensor_states(uint8_t sensor_type, uint8_t event_type)
|
||||
{
|
||||
ipmi_sdr_print_discrete_state_mini(
|
||||
"Sensor States: \n ", "\n ", sensor_type,
|
||||
event_type, 0xff, 0xff);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
ipmi_event_fromsensor(struct ipmi_intf * intf, char * id, char * state, char * evdir)
|
||||
{
|
||||
struct ipmi_rs * rsp;
|
||||
struct sdr_record_list * sdr;
|
||||
struct platform_event_msg emsg;
|
||||
int off;
|
||||
uint8_t target, lun, channel;
|
||||
|
||||
if (id == NULL) {
|
||||
lprintf(LOG_ERR, "No sensor ID supplied");
|
||||
return -1;
|
||||
}
|
||||
|
||||
memset(&emsg, 0, sizeof(struct platform_event_msg));
|
||||
emsg.evm_rev = 0x04;
|
||||
|
||||
if (evdir == NULL)
|
||||
emsg.event_dir = EVENT_DIR_ASSERT;
|
||||
else if (strncasecmp(evdir, "assert", 6) == 0)
|
||||
emsg.event_dir = EVENT_DIR_ASSERT;
|
||||
else if (strncasecmp(evdir, "deassert", 8) == 0)
|
||||
emsg.event_dir = EVENT_DIR_DEASSERT;
|
||||
else {
|
||||
lprintf(LOG_ERR, "Invalid event direction %s. Must be 'assert' or 'deassert'", evdir);
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("Finding sensor %s... ", id);
|
||||
sdr = ipmi_sdr_find_sdr_byid(intf, id);
|
||||
if (sdr == NULL) {
|
||||
printf("not found!\n");
|
||||
return -1;
|
||||
}
|
||||
printf("ok\n");
|
||||
|
||||
switch (sdr->type)
|
||||
{
|
||||
case SDR_RECORD_TYPE_FULL_SENSOR:
|
||||
case SDR_RECORD_TYPE_COMPACT_SENSOR:
|
||||
|
||||
emsg.sensor_type = sdr->record.common->sensor.type;
|
||||
emsg.sensor_num = sdr->record.common->keys.sensor_num;
|
||||
emsg.event_type = sdr->record.common->event_type;
|
||||
target = sdr->record.common->keys.owner_id;
|
||||
lun = sdr->record.common->keys.lun;
|
||||
channel = sdr->record.common->keys.channel;
|
||||
break;
|
||||
default:
|
||||
lprintf(LOG_ERR, "Unknown sensor type for id '%s'", id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
emsg.event_data[1] = 0xff;
|
||||
emsg.event_data[2] = 0xff;
|
||||
|
||||
switch (emsg.event_type)
|
||||
{
|
||||
/*
|
||||
* Threshold Class
|
||||
*/
|
||||
case 1:
|
||||
{
|
||||
int dir = 0;
|
||||
int hilo = 0;
|
||||
off = 1;
|
||||
|
||||
if (state == NULL || strncasecmp(state, "list", 4) == 0) {
|
||||
printf("Sensor States:\n");
|
||||
printf(" lnr : Lower Non-Recoverable \n");
|
||||
printf(" lcr : Lower Critical\n");
|
||||
printf(" lnc : Lower Non-Critical\n");
|
||||
printf(" unc : Upper Non-Critical\n");
|
||||
printf(" ucr : Upper Critical\n");
|
||||
printf(" unr : Upper Non-Recoverable\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (0 != strncasecmp(state, "lnr", 3) &&
|
||||
0 != strncasecmp(state, "lcr", 3) &&
|
||||
0 != strncasecmp(state, "lnc", 3) &&
|
||||
0 != strncasecmp(state, "unc", 3) &&
|
||||
0 != strncasecmp(state, "ucr", 3) &&
|
||||
0 != strncasecmp(state, "unr", 3))
|
||||
{
|
||||
lprintf(LOG_ERR, "Invalid threshold identifier %s", state);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (state[0] == 'u')
|
||||
hilo = 1;
|
||||
else
|
||||
hilo = 0;
|
||||
|
||||
if (emsg.event_dir == EVENT_DIR_ASSERT)
|
||||
dir = hilo;
|
||||
else
|
||||
dir = !hilo;
|
||||
|
||||
if ((emsg.event_dir == EVENT_DIR_ASSERT && hilo == 1) ||
|
||||
(emsg.event_dir == EVENT_DIR_DEASSERT && hilo == 0))
|
||||
emsg.event_data[0] = (uint8_t)(str2val(state, ipmi_event_thresh_hi) & 0xf);
|
||||
else if ((emsg.event_dir == EVENT_DIR_ASSERT && hilo == 0) ||
|
||||
(emsg.event_dir == EVENT_DIR_DEASSERT && hilo == 1))
|
||||
emsg.event_data[0] = (uint8_t)(str2val(state, ipmi_event_thresh_lo) & 0xf);
|
||||
else {
|
||||
lprintf(LOG_ERR, "Invalid Event");
|
||||
return -1;
|
||||
}
|
||||
|
||||
rsp = ipmi_sdr_get_sensor_thresholds(intf, emsg.sensor_num,
|
||||
target, lun, channel);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR,
|
||||
"Command Get Sensor Thresholds failed: invalid response.");
|
||||
return (-1);
|
||||
} else if (rsp->ccode != 0) {
|
||||
lprintf(LOG_ERR, "Command Get Sensor Thresholds failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* threshold reading */
|
||||
emsg.event_data[2] = rsp->data[(emsg.event_data[0] / 2) + 1];
|
||||
|
||||
rsp = ipmi_sdr_get_sensor_hysteresis(intf, emsg.sensor_num,
|
||||
target, lun, channel);
|
||||
if (rsp != NULL && rsp->ccode == 0)
|
||||
off = dir ? rsp->data[0] : rsp->data[1];
|
||||
if (off <= 0)
|
||||
off = 1;
|
||||
|
||||
/* trigger reading */
|
||||
if (dir) {
|
||||
if ((emsg.event_data[2] + off) > 0xff)
|
||||
emsg.event_data[1] = 0xff;
|
||||
else
|
||||
emsg.event_data[1] = emsg.event_data[2] + off;
|
||||
}
|
||||
else {
|
||||
if ((emsg.event_data[2] - off) < 0)
|
||||
emsg.event_data[1] = 0;
|
||||
else
|
||||
emsg.event_data[1] = emsg.event_data[2] - off;
|
||||
}
|
||||
|
||||
/* trigger in byte 2, threshold in byte 3 */
|
||||
emsg.event_data[0] |= 0x50;
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
* Digital Discrete
|
||||
*/
|
||||
case 3: case 4: case 5: case 6: case 8: case 9:
|
||||
{
|
||||
int x;
|
||||
const char * digi_on[] = { "present", "assert", "limit",
|
||||
"fail", "yes", "on", "up" };
|
||||
const char * digi_off[] = { "absent", "deassert", "nolimit",
|
||||
"nofail", "no", "off", "down" };
|
||||
/*
|
||||
* print list of available states for this sensor
|
||||
*/
|
||||
if (state == NULL || strncasecmp(state, "list", 4) == 0) {
|
||||
print_sensor_states(emsg.sensor_type, emsg.event_type);
|
||||
printf("Sensor State Shortcuts:\n");
|
||||
for (x = 0; x < sizeof(digi_on)/sizeof(*digi_on); x++) {
|
||||
printf(" %-9s %-9s\n", digi_on[x], digi_off[x]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
off = 0;
|
||||
for (x = 0; x < sizeof(digi_on)/sizeof(*digi_on); x++) {
|
||||
if (strncasecmp(state, digi_on[x], strlen(digi_on[x])) == 0) {
|
||||
emsg.event_data[0] = 1;
|
||||
off = 1;
|
||||
break;
|
||||
}
|
||||
else if (strncasecmp(state, digi_off[x], strlen(digi_off[x])) == 0) {
|
||||
emsg.event_data[0] = 0;
|
||||
off = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (off == 0) {
|
||||
off = ipmi_event_find_offset(
|
||||
emsg.event_type, generic_event_types, state);
|
||||
if (off < 0)
|
||||
return -1;
|
||||
emsg.event_data[0] = off;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
* Generic Discrete
|
||||
*/
|
||||
case 2: case 7: case 10: case 11: case 12:
|
||||
{
|
||||
/*
|
||||
* print list of available states for this sensor
|
||||
*/
|
||||
if (state == NULL || strncasecmp(state, "list", 4) == 0) {
|
||||
print_sensor_states(emsg.sensor_type, emsg.event_type);
|
||||
return 0;
|
||||
}
|
||||
off = ipmi_event_find_offset(
|
||||
emsg.event_type, generic_event_types, state);
|
||||
if (off < 0)
|
||||
return -1;
|
||||
emsg.event_data[0] = off;
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
* Sensor-Specific Discrete
|
||||
*/
|
||||
case 0x6f:
|
||||
{
|
||||
/*
|
||||
* print list of available states for this sensor
|
||||
*/
|
||||
if (state == NULL || strncasecmp(state, "list", 4) == 0) {
|
||||
print_sensor_states(emsg.sensor_type, emsg.event_type);
|
||||
return 0;
|
||||
}
|
||||
off = ipmi_event_find_offset(
|
||||
emsg.sensor_type, sensor_specific_types, state);
|
||||
if (off < 0)
|
||||
return -1;
|
||||
emsg.event_data[0] = off;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
return ipmi_send_platform_event(intf, &emsg);
|
||||
}
|
||||
|
||||
static int
|
||||
ipmi_event_fromfile(struct ipmi_intf * intf, char * file)
|
||||
{
|
||||
FILE * fp;
|
||||
struct ipmi_rs * rsp;
|
||||
struct ipmi_rq req;
|
||||
struct sel_event_record sel_event;
|
||||
uint8_t rqdata[8];
|
||||
char buf[1024];
|
||||
char * ptr, * tok;
|
||||
int i, j;
|
||||
uint8_t chmed;
|
||||
int rc = 0;
|
||||
|
||||
if (file == NULL)
|
||||
return -1;
|
||||
|
||||
memset(rqdata, 0, 8);
|
||||
|
||||
/* setup Platform Event Message command */
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.msg.netfn = IPMI_NETFN_SE;
|
||||
req.msg.cmd = 0x02;
|
||||
req.msg.data = rqdata;
|
||||
req.msg.data_len = 7;
|
||||
|
||||
chmed = ipmi_current_channel_medium(intf);
|
||||
if (chmed == IPMI_CHANNEL_MEDIUM_SYSTEM) {
|
||||
/* system interface, need extra generator ID */
|
||||
rqdata[0] = 0x41; // As per Fig. 29-2 and Table 5-4
|
||||
req.msg.data_len = 8;
|
||||
}
|
||||
|
||||
fp = ipmi_open_file_read(file);
|
||||
if (fp == NULL)
|
||||
return -1;
|
||||
|
||||
while (feof(fp) == 0) {
|
||||
if (fgets(buf, 1024, fp) == NULL)
|
||||
continue;
|
||||
|
||||
/* clip off optional comment tail indicated by # */
|
||||
ptr = strchr(buf, '#');
|
||||
if (ptr)
|
||||
*ptr = '\0';
|
||||
else
|
||||
ptr = buf + strlen(buf);
|
||||
|
||||
/* clip off trailing and leading whitespace */
|
||||
ptr--;
|
||||
while (isspace((int)*ptr) && ptr >= buf)
|
||||
*ptr-- = '\0';
|
||||
ptr = buf;
|
||||
while (isspace((int)*ptr))
|
||||
ptr++;
|
||||
if (strlen(ptr) == 0)
|
||||
continue;
|
||||
|
||||
/* parse the event, 7 bytes with optional comment */
|
||||
/* 0x00 0x00 0x00 0x00 0x00 0x00 0x00 # event */
|
||||
i = 0;
|
||||
tok = strtok(ptr, " ");
|
||||
while (tok) {
|
||||
if (i == 7)
|
||||
break;
|
||||
j = i++;
|
||||
if (chmed == IPMI_CHANNEL_MEDIUM_SYSTEM)
|
||||
j++;
|
||||
rqdata[j] = (uint8_t)strtol(tok, NULL, 0);
|
||||
tok = strtok(NULL, " ");
|
||||
}
|
||||
if (i < 7) {
|
||||
lprintf(LOG_ERR, "Invalid Event: %s",
|
||||
buf2str(rqdata, sizeof(rqdata)));
|
||||
continue;
|
||||
}
|
||||
|
||||
memset(&sel_event, 0, sizeof(struct sel_event_record));
|
||||
sel_event.record_id = 0;
|
||||
sel_event.sel_type.standard_type.gen_id = 2;
|
||||
|
||||
j = (chmed == IPMI_CHANNEL_MEDIUM_SYSTEM) ? 1 : 0;
|
||||
sel_event.sel_type.standard_type.evm_rev = rqdata[j++];
|
||||
sel_event.sel_type.standard_type.sensor_type = rqdata[j++];
|
||||
sel_event.sel_type.standard_type.sensor_num = rqdata[j++];
|
||||
sel_event.sel_type.standard_type.event_type = rqdata[j] & 0x7f;
|
||||
sel_event.sel_type.standard_type.event_dir = (rqdata[j++] & 0x80) >> 7;
|
||||
sel_event.sel_type.standard_type.event_data[0] = rqdata[j++];
|
||||
sel_event.sel_type.standard_type.event_data[1] = rqdata[j++];
|
||||
sel_event.sel_type.standard_type.event_data[2] = rqdata[j++];
|
||||
|
||||
ipmi_sel_print_std_entry(intf, &sel_event);
|
||||
|
||||
rsp = intf->sendrecv(intf, &req);
|
||||
if (rsp == NULL) {
|
||||
lprintf(LOG_ERR, "Platform Event Message command failed");
|
||||
rc = -1;
|
||||
}
|
||||
else if (rsp->ccode > 0) {
|
||||
lprintf(LOG_ERR, "Platform Event Message command failed: %s",
|
||||
val2str(rsp->ccode, completion_code_vals));
|
||||
rc = -1;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void
|
||||
ipmi_event_usage(void)
|
||||
{
|
||||
lprintf(LOG_NOTICE, "");
|
||||
lprintf(LOG_NOTICE, "usage: event <num>");
|
||||
lprintf(LOG_NOTICE, " Send generic test events");
|
||||
lprintf(LOG_NOTICE, " 1 : Temperature - Upper Critical - Going High");
|
||||
lprintf(LOG_NOTICE, " 2 : Voltage Threshold - Lower Critical - Going Low");
|
||||
lprintf(LOG_NOTICE, " 3 : Memory - Correctable ECC");
|
||||
lprintf(LOG_NOTICE, "");
|
||||
lprintf(LOG_NOTICE, "usage: event file <filename>");
|
||||
lprintf(LOG_NOTICE, " Read and generate events from file");
|
||||
lprintf(LOG_NOTICE, " Use the 'sel save' command to generate from SEL");
|
||||
lprintf(LOG_NOTICE, "");
|
||||
lprintf(LOG_NOTICE, "usage: event <sensorid> <state> [event_dir]");
|
||||
lprintf(LOG_NOTICE, " sensorid : Sensor ID string to use for event data");
|
||||
lprintf(LOG_NOTICE, " state : Sensor state, use 'list' to see possible states for sensor");
|
||||
lprintf(LOG_NOTICE, " event_dir : assert, deassert [default=assert]");
|
||||
lprintf(LOG_NOTICE, "");
|
||||
}
|
||||
|
||||
int
|
||||
ipmi_event_main(struct ipmi_intf * intf, int argc, char ** argv)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
if (argc == 0 || strncmp(argv[0], "help", 4) == 0) {
|
||||
ipmi_event_usage();
|
||||
return 0;
|
||||
}
|
||||
if (strncmp(argv[0], "file", 4) == 0) {
|
||||
if (argc < 2) {
|
||||
ipmi_event_usage();
|
||||
return 0;
|
||||
}
|
||||
return ipmi_event_fromfile(intf, argv[1]);
|
||||
}
|
||||
if (strlen(argv[0]) == 1) {
|
||||
switch (argv[0][0]) {
|
||||
case '1': return ipmi_send_platform_event_num(intf, 1);
|
||||
case '2': return ipmi_send_platform_event_num(intf, 2);
|
||||
case '3': return ipmi_send_platform_event_num(intf, 3);
|
||||
}
|
||||
}
|
||||
if (argc < 2)
|
||||
rc = ipmi_event_fromsensor(intf, argv[0], NULL, NULL);
|
||||
else if (argc < 3)
|
||||
rc = ipmi_event_fromsensor(intf, argv[0], argv[1], NULL);
|
||||
else
|
||||
rc = ipmi_event_fromsensor(intf, argv[0], argv[1], argv[2]);
|
||||
|
||||
return rc;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,640 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2003 Kontron Canada, 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.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/log.h>
|
||||
#include <ipmitool/ipmi_mc.h>
|
||||
#include <ipmitool/ipmi_sdr.h>
|
||||
#include <ipmitool/ipmi_gendev.h>
|
||||
#include <ipmitool/ipmi_intf.h>
|
||||
#include <ipmitool/ipmi_sel.h>
|
||||
#include <ipmitool/ipmi_entity.h>
|
||||
#include <ipmitool/ipmi_constants.h>
|
||||
#include <ipmitool/ipmi_strings.h>
|
||||
#include <ipmitool/ipmi_raw.h>
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
extern int verbose;
|
||||
|
||||
|
||||
#define GENDEV_RETRY_COUNT 5
|
||||
#define GENDEV_MAX_SIZE 16
|
||||
|
||||
typedef struct gendev_eeprom_info
|
||||
{
|
||||
uint32_t size;
|
||||
uint16_t page_size;
|
||||
uint8_t address_span;
|
||||
uint8_t address_length;
|
||||
}t_gendev_eeprom_info;
|
||||
|
||||
|
||||
static int
|
||||
ipmi_gendev_get_eeprom_size(
|
||||
struct ipmi_intf *intf,
|
||||
struct sdr_record_generic_locator *dev,
|
||||
t_gendev_eeprom_info *info
|
||||
)
|
||||
{
|
||||
int eeprom_size = 0;
|
||||
/*
|
||||
lprintf(LOG_ERR, "Gen Device : %s", dev->id_string);
|
||||
lprintf(LOG_ERR, "Access Addr: %x", dev->dev_access_addr);
|
||||
lprintf(LOG_ERR, "Slave Addr : %x", dev->dev_slave_addr);
|
||||
lprintf(LOG_ERR, "Channel Num: %x", dev->channel_num);
|
||||
lprintf(LOG_ERR, "Lun : %x", dev->lun);
|
||||
lprintf(LOG_ERR, "Bus : %x", dev->bus);
|
||||
lprintf(LOG_ERR, "Addr Span : %x", dev->addr_span);
|
||||
lprintf(LOG_ERR, "DevType : %x", dev->dev_type);
|
||||
lprintf(LOG_ERR, "DevType Mod: %x", dev->dev_type_modifier);
|
||||
*/
|
||||
if( info != NULL)
|
||||
{
|
||||
switch(dev->dev_type)
|
||||
{
|
||||
case 0x08: // 24C01
|
||||
info->size = 128;
|
||||
info->page_size = 8;
|
||||
info->address_span = dev->addr_span;
|
||||
info->address_length = 1;
|
||||
break;
|
||||
case 0x09: // 24C02
|
||||
info->size = 256;
|
||||
info->page_size = 8;
|
||||
info->address_span = dev->addr_span;
|
||||
info->address_length = 1;
|
||||
break;
|
||||
case 0x0A: // 24C04
|
||||
info->size = 512;
|
||||
info->page_size = 8;
|
||||
info->address_span = dev->addr_span;
|
||||
info->address_length = 2;
|
||||
break;
|
||||
case 0x0B: // 24C08
|
||||
info->size = 1024;
|
||||
info->page_size = 8;
|
||||
info->address_span = dev->addr_span;
|
||||
info->address_length = 2;
|
||||
break;
|
||||
case 0x0C: // 24C16
|
||||
info->size = 2048;
|
||||
info->page_size = 256;
|
||||
info->address_span = dev->addr_span;
|
||||
info->address_length = 2;
|
||||
break;
|
||||
case 0x0D: // 24C17
|
||||
info->size = 2048;
|
||||
info->page_size = 256;
|
||||
info->address_span = dev->addr_span;
|
||||
info->address_length = 2;
|
||||
break;
|
||||
case 0x0E: // 24C32
|
||||
info->size = 4096;
|
||||
info->page_size = 8;
|
||||
info->address_span = dev->addr_span;
|
||||
info->address_length = 2;
|
||||
break;
|
||||
case 0x0F: // 24C64
|
||||
info->size = 8192;
|
||||
info->page_size = 32;
|
||||
info->address_span = dev->addr_span;
|
||||
info->address_length = 2;
|
||||
break;
|
||||
case 0xC0: // Proposed OEM Code for 24C128
|
||||
info->size = 16384;
|
||||
info->page_size = 64;
|
||||
info->address_span = dev->addr_span;
|
||||
info->address_length = 2;
|
||||
break;
|
||||
case 0xC1: // Proposed OEM Code for 24C256
|
||||
info->size = 32748;
|
||||
info->page_size = 64;
|
||||
info->address_span = dev->addr_span;
|
||||
info->address_length = 2;
|
||||
break;
|
||||
case 0xC2: // Proposed OEM Code for 24C512
|
||||
info->size = 65536;
|
||||
info->page_size = 128;
|
||||
info->address_span = dev->addr_span;
|
||||
info->address_length = 2;
|
||||
break;
|
||||
case 0xC3: // Proposed OEM Code for 24C1024
|
||||
info->size = 131072;
|
||||
info->page_size = 128;
|
||||
info->address_span = dev->addr_span;
|
||||
info->address_length = 2;
|
||||
break;
|
||||
/* Please reserved up to CFh for future update */
|
||||
default: // Not a eeprom, return size = 0;
|
||||
info->size = 0;
|
||||
info->page_size = 0;
|
||||
info->address_span = 0;
|
||||
info->address_length = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
eeprom_size = info->size;
|
||||
}
|
||||
|
||||
return eeprom_size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
ipmi_gendev_read_file(
|
||||
struct ipmi_intf *intf,
|
||||
struct sdr_record_generic_locator *dev,
|
||||
const char *ofile
|
||||
)
|
||||
{
|
||||
int rc = 0;
|
||||
int eeprom_size;
|
||||
t_gendev_eeprom_info eeprom_info;
|
||||
|
||||
eeprom_size = ipmi_gendev_get_eeprom_size(intf, dev, &eeprom_info);
|
||||
|
||||
if(eeprom_size > 0)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
/* now write to file */
|
||||
fp = ipmi_open_file_write(ofile);
|
||||
|
||||
if(fp)
|
||||
{
|
||||
struct ipmi_rs *rsp;
|
||||
int numWrite;
|
||||
uint32_t counter;
|
||||
uint8_t msize;
|
||||
uint8_t channel = dev->channel_num;
|
||||
uint8_t i2cbus = dev->bus;
|
||||
uint8_t i2caddr = dev->dev_slave_addr;
|
||||
uint8_t privatebus = 1;
|
||||
uint32_t address_span_size;
|
||||
uint8_t percentCompleted = 0;
|
||||
|
||||
|
||||
/* Handle Address Span */
|
||||
if( eeprom_info.address_span != 0)
|
||||
{
|
||||
address_span_size =
|
||||
(eeprom_info.size / (eeprom_info.address_span+1));
|
||||
}
|
||||
else
|
||||
{
|
||||
address_span_size = eeprom_info.size;
|
||||
}
|
||||
|
||||
/* Setup read/write size */
|
||||
if( eeprom_info.page_size < GENDEV_MAX_SIZE)
|
||||
{
|
||||
msize = eeprom_info.page_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
msize = GENDEV_MAX_SIZE;
|
||||
// All eeprom with page higher than 32 is on the
|
||||
// 16 bytes boundary
|
||||
}
|
||||
|
||||
/* Setup i2c bus byte */
|
||||
i2cbus = ((channel & 0xF) << 4) | ((i2cbus & 7) << 1) | privatebus;
|
||||
|
||||
/*
|
||||
lprintf(LOG_ERR, "Generic device: %s", dev->id_string);
|
||||
lprintf(LOG_ERR, "I2C Chnl: %x", channel);
|
||||
lprintf(LOG_ERR, "I2C Bus : %x", i2cbus);
|
||||
lprintf(LOG_ERR, "I2C Addr: %x", i2caddr); */
|
||||
|
||||
for (
|
||||
counter = 0;
|
||||
(counter < (eeprom_info.size)) && (rc == 0);
|
||||
counter+= msize
|
||||
)
|
||||
{
|
||||
uint8_t retryCounter;
|
||||
|
||||
for(
|
||||
retryCounter = 0;
|
||||
retryCounter<GENDEV_RETRY_COUNT;
|
||||
retryCounter ++
|
||||
)
|
||||
{
|
||||
uint8_t wrByte[GENDEV_MAX_SIZE+2];
|
||||
|
||||
wrByte[0] = (uint8_t) (counter>>0);
|
||||
if(eeprom_info.address_length > 1)
|
||||
{
|
||||
wrByte[1] = (uint8_t) (counter>>8);
|
||||
}
|
||||
|
||||
i2caddr+= (((eeprom_info.size) % address_span_size) * 2);
|
||||
|
||||
rsp = ipmi_master_write_read(
|
||||
intf,
|
||||
i2cbus,
|
||||
i2caddr,
|
||||
(uint8_t *) wrByte,
|
||||
eeprom_info.address_length,
|
||||
msize
|
||||
);
|
||||
|
||||
if (rsp != NULL)
|
||||
{
|
||||
retryCounter = GENDEV_RETRY_COUNT;
|
||||
rc = 0;
|
||||
}
|
||||
else if(retryCounter < GENDEV_RETRY_COUNT)
|
||||
{
|
||||
retryCounter ++;
|
||||
lprintf(LOG_ERR, "Retry");
|
||||
sleep(1);
|
||||
rc = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lprintf(LOG_ERR, "Unable to perform I2C Master Write-Read");
|
||||
rc = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if( rc == 0 )
|
||||
{
|
||||
static uint8_t previousCompleted = 101;
|
||||
numWrite = fwrite(rsp->data, 1, msize, fp);
|
||||
if (numWrite != msize)
|
||||
{
|
||||
lprintf(LOG_ERR, "Error writing file %s", ofile);
|
||||
rc = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
percentCompleted = ((counter * 100) / eeprom_info.size );
|
||||
|
||||
if(percentCompleted != previousCompleted)
|
||||
{
|
||||
printf("\r%i percent completed", percentCompleted);
|
||||
previousCompleted = percentCompleted;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
if(counter == (eeprom_info.size))
|
||||
{
|
||||
printf("\r%%100 percent completed\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\rError: %i percent completed, read not completed \n", percentCompleted);
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lprintf(LOG_ERR, "The selected generic device is not an eeprom");
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/* ipmi_gendev_write_file - Read raw SDR from binary file
|
||||
*
|
||||
* used for writing generic locator device Eeprom type
|
||||
*
|
||||
* @intf: ipmi interface
|
||||
* @dev: generic device to read
|
||||
* @ofile: output filename
|
||||
*
|
||||
* returns 0 on success
|
||||
* returns -1 on error
|
||||
*/
|
||||
static int
|
||||
ipmi_gendev_write_file(
|
||||
struct ipmi_intf *intf,
|
||||
struct sdr_record_generic_locator *dev,
|
||||
const char *ofile
|
||||
)
|
||||
{
|
||||
int rc = 0;
|
||||
int eeprom_size;
|
||||
t_gendev_eeprom_info eeprom_info;
|
||||
|
||||
eeprom_size = ipmi_gendev_get_eeprom_size(intf, dev, &eeprom_info);
|
||||
|
||||
if(eeprom_size > 0)
|
||||
{
|
||||
FILE *fp;
|
||||
uint32_t fileLength = 0;
|
||||
|
||||
/* now write to file */
|
||||
fp = ipmi_open_file_read(ofile);
|
||||
|
||||
if(fp)
|
||||
{
|
||||
/* Retreive file length, check if it's fits the Eeprom Size */
|
||||
fseek(fp, 0 ,SEEK_END);
|
||||
fileLength = ftell(fp);
|
||||
|
||||
lprintf(LOG_ERR, "File Size: %i", fileLength);
|
||||
lprintf(LOG_ERR, "Eeprom Size: %i", eeprom_size);
|
||||
if(fileLength != eeprom_size)
|
||||
{
|
||||
lprintf(LOG_ERR, "File size does not fit Eeprom Size");
|
||||
fclose(fp);
|
||||
fp = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
fseek(fp, 0 ,SEEK_SET);
|
||||
}
|
||||
}
|
||||
|
||||
if(fp)
|
||||
{
|
||||
struct ipmi_rs *rsp;
|
||||
int numRead;
|
||||
uint32_t counter;
|
||||
uint8_t msize;
|
||||
uint8_t channel = dev->channel_num;
|
||||
uint8_t i2cbus = dev->bus;
|
||||
uint8_t i2caddr = dev->dev_slave_addr;
|
||||
uint8_t privatebus = 1;
|
||||
uint32_t address_span_size;
|
||||
uint8_t percentCompleted = 0;
|
||||
|
||||
|
||||
/* Handle Address Span */
|
||||
if( eeprom_info.address_span != 0)
|
||||
{
|
||||
address_span_size =
|
||||
(eeprom_info.size / (eeprom_info.address_span+1));
|
||||
}
|
||||
else
|
||||
{
|
||||
address_span_size = eeprom_info.size;
|
||||
}
|
||||
|
||||
/* Setup read/write size */
|
||||
if( eeprom_info.page_size < GENDEV_MAX_SIZE)
|
||||
{
|
||||
msize = eeprom_info.page_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
msize = GENDEV_MAX_SIZE;
|
||||
// All eeprom with page higher than 32 is on the
|
||||
// 16 bytes boundary
|
||||
}
|
||||
|
||||
/* Setup i2c bus byte */
|
||||
i2cbus = ((channel & 0xF) << 4) | ((i2cbus & 7) << 1) | privatebus;
|
||||
|
||||
/*
|
||||
lprintf(LOG_ERR, "Generic device: %s", dev->id_string);
|
||||
lprintf(LOG_ERR, "I2C Chnl: %x", channel);
|
||||
lprintf(LOG_ERR, "I2C Bus : %x", i2cbus);
|
||||
lprintf(LOG_ERR, "I2C Addr: %x", i2caddr); */
|
||||
|
||||
for (
|
||||
counter = 0;
|
||||
(counter < (eeprom_info.size)) && (rc == 0);
|
||||
counter+= msize
|
||||
)
|
||||
{
|
||||
uint8_t retryCounter;
|
||||
uint8_t readByte[GENDEV_MAX_SIZE];
|
||||
|
||||
numRead = fread(readByte, 1, msize, fp);
|
||||
if (numRead != msize)
|
||||
{
|
||||
lprintf(LOG_ERR, "Error reading file %s", ofile);
|
||||
rc = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
for(
|
||||
retryCounter = 0;
|
||||
retryCounter<GENDEV_RETRY_COUNT;
|
||||
retryCounter ++
|
||||
)
|
||||
{
|
||||
uint8_t wrByte[GENDEV_MAX_SIZE+2];
|
||||
wrByte[0] = (uint8_t) (counter>>0);
|
||||
if(eeprom_info.address_length > 1)
|
||||
{
|
||||
wrByte[1] = (uint8_t) (counter>>8);
|
||||
}
|
||||
memcpy(&wrByte[eeprom_info.address_length], readByte, msize);
|
||||
|
||||
i2caddr+= (((eeprom_info.size) % address_span_size) * 2);
|
||||
|
||||
rsp = ipmi_master_write_read(intf, i2cbus, i2caddr, (uint8_t *) wrByte, eeprom_info.address_length+msize, 0);
|
||||
if (rsp != NULL)
|
||||
{
|
||||
retryCounter = GENDEV_RETRY_COUNT;
|
||||
rc = 0;
|
||||
}
|
||||
else if(retryCounter < GENDEV_RETRY_COUNT)
|
||||
{
|
||||
retryCounter ++;
|
||||
lprintf(LOG_ERR, "Retry");
|
||||
sleep(1);
|
||||
rc = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
lprintf(LOG_ERR, "Unable to perform I2C Master Write-Read");
|
||||
rc = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if( rc == 0 )
|
||||
{
|
||||
static uint8_t previousCompleted = 101;
|
||||
percentCompleted = ((counter * 100) / eeprom_info.size );
|
||||
|
||||
if(percentCompleted != previousCompleted)
|
||||
{
|
||||
printf("\r%i percent completed", percentCompleted);
|
||||
previousCompleted = percentCompleted;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if(counter == (eeprom_info.size))
|
||||
{
|
||||
printf("\r%%100 percent completed\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\rError: %i percent completed, read not completed \n", percentCompleted);
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lprintf(LOG_ERR, "The selected generic device is not an eeprom");
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
/* ipmi_gendev_main - top-level handler for generic device
|
||||
*
|
||||
* @intf: ipmi interface
|
||||
* @argc: number of arguments
|
||||
* @argv: argument list
|
||||
*
|
||||
* returns 0 on success
|
||||
* returns -1 on error
|
||||
*/
|
||||
int
|
||||
ipmi_gendev_main(struct ipmi_intf *intf, int argc, char **argv)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
/* initialize random numbers used later */
|
||||
srand(time(NULL));
|
||||
|
||||
lprintf(LOG_ERR, "Rx gendev command: %s", argv[0]);
|
||||
|
||||
if (
|
||||
(argc == 0)
|
||||
||
|
||||
(strncmp(argv[0], "help", 4) == 0)
|
||||
)
|
||||
{
|
||||
lprintf(LOG_ERR,
|
||||
"SDR Commands: list read write");
|
||||
lprintf(LOG_ERR,
|
||||
" list List All Generic Device Locators");
|
||||
lprintf(LOG_ERR,
|
||||
" read <sdr name> <file> Read to file eeprom specify by Generic Device Locators");
|
||||
lprintf(LOG_ERR,
|
||||
" write <sdr name> <file> Write from file eeprom specify by Generic Device Locators");
|
||||
}
|
||||
else if ( strncmp(argv[0], "list", 4) == 0)
|
||||
{
|
||||
rc = ipmi_sdr_print_sdr(intf,
|
||||
SDR_RECORD_TYPE_GENERIC_DEVICE_LOCATOR);
|
||||
}
|
||||
else if (strncmp(argv[0], "read", 4) == 0)
|
||||
{
|
||||
if (argc < 3)
|
||||
lprintf(LOG_ERR, "usage: gendev read <gendev> <filename>");
|
||||
else
|
||||
{
|
||||
struct sdr_record_list *sdr;
|
||||
|
||||
lprintf(LOG_ERR, "Gendev read sdr name : %s", argv[1]);
|
||||
|
||||
printf("Locating sensor record '%s'...\n", argv[1]);
|
||||
|
||||
/* lookup by sensor name */
|
||||
sdr = ipmi_sdr_find_sdr_byid(intf, argv[1]);
|
||||
if (sdr == NULL)
|
||||
{
|
||||
lprintf(LOG_ERR, "Sensor data record not found!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (sdr->type != SDR_RECORD_TYPE_GENERIC_DEVICE_LOCATOR)
|
||||
{
|
||||
lprintf(LOG_ERR, "Target SDR is not a generic device locator");
|
||||
return -1;
|
||||
}
|
||||
|
||||
lprintf(LOG_ERR, "Gendev read file name: %s", argv[2]);
|
||||
ipmi_gendev_read_file(intf, sdr->record.genloc, argv[2]);
|
||||
|
||||
}
|
||||
}
|
||||
else if (strncmp(argv[0], "write", 5) == 0)
|
||||
{
|
||||
if (argc < 3)
|
||||
lprintf(LOG_ERR, "usage: gendev write <gendev> <filename>");
|
||||
else
|
||||
{
|
||||
struct sdr_record_list *sdr;
|
||||
|
||||
lprintf(LOG_ERR, "Gendev write sdr name : %s", argv[1]);
|
||||
|
||||
printf("Locating sensor record '%s'...\n", argv[1]);
|
||||
|
||||
/* lookup by sensor name */
|
||||
sdr = ipmi_sdr_find_sdr_byid(intf, argv[1]);
|
||||
if (sdr == NULL)
|
||||
{
|
||||
lprintf(LOG_ERR, "Sensor data record not found!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (sdr->type != SDR_RECORD_TYPE_GENERIC_DEVICE_LOCATOR)
|
||||
{
|
||||
lprintf(LOG_ERR, "Target SDR is not a generic device locator");
|
||||
return -1;
|
||||
}
|
||||
|
||||
lprintf(LOG_ERR, "Gendev write file name: %s", argv[2]);
|
||||
ipmi_gendev_write_file(intf, sdr->record.genloc, argv[2]);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lprintf(LOG_ERR, "Invalid gendev command: %s", argv[0]);
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -28,19 +28,78 @@
|
||||
* 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_LIPMI_H
|
||||
#define IPMI_LIPMI_H
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ltdl.h>
|
||||
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <config.h>
|
||||
#include <ipmitool/ipmi_intf.h>
|
||||
#include <ipmitool/ipmi.h>
|
||||
|
||||
#define LIPMI_DEV "/dev/lipmi"
|
||||
/* ipmi_intf_init
|
||||
* initialize dynamic plugin interface
|
||||
*/
|
||||
int ipmi_intf_init(void)
|
||||
{
|
||||
if (lt_dlinit() < 0) {
|
||||
printf("ERROR: Unable to initialize ltdl\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct ipmi_rs * ipmi_lipmi_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req);
|
||||
int ipmi_lipmi_open(struct ipmi_intf * intf);
|
||||
void ipmi_lipmi_close(struct ipmi_intf * intf);
|
||||
int lipmi_intf_setup(struct ipmi_intf ** intf);
|
||||
if (lt_dlsetsearchpath(PLUGIN_PATH) < 0) {
|
||||
printf("ERROR: Unable to set ltdl plugin path to %s\n",
|
||||
PLUGIN_PATH);
|
||||
lt_dlexit();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ipmi_intf_exit
|
||||
* close dynamic plugin interface
|
||||
*/
|
||||
void ipmi_intf_exit(void)
|
||||
{
|
||||
if (lt_dlexit() < 0)
|
||||
printf("ERROR: Unable to cleanly exit ltdl\n");
|
||||
}
|
||||
|
||||
/* ipmi_intf_load
|
||||
* name: interface plugin name to load
|
||||
*/
|
||||
struct ipmi_intf * ipmi_intf_load(char * name)
|
||||
{
|
||||
lt_dlhandle handle;
|
||||
struct ipmi_intf * intf;
|
||||
int (*intf_setup)(struct ipmi_intf ** intf);
|
||||
|
||||
handle = lt_dlopenext(name);
|
||||
if (handle == NULL) {
|
||||
printf("ERROR: Unable to find plugin '%s' in '%s'\n",
|
||||
name, PLUGIN_PATH);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
intf_setup = lt_dlsym(handle, "intf_setup");
|
||||
if (!intf_setup) {
|
||||
printf("ERROR: Unable to find interface setup symbol in plugin %s\n", name);
|
||||
lt_dlclose(handle);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (intf_setup(&intf) < 0) {
|
||||
printf("ERROR: Unable to run interface setup for plugin %s\n", name);
|
||||
lt_dlclose(handle);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return intf;
|
||||
}
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user