/*- * Copyright (c) 1999-2000 James E. Housley * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. * * $Id: PROTOCOL,v 1.1.2.7 2000/10/11 01:18:19 housley Exp $ */ Version 1.0 - Origional Command: GET T[1-3] : Get Temperature 1, 2 or 3 GET S[1-3] : Get Fan Speed 1, 2 or 3 GET V[1-7] : Get Voltage 1, 2, 3, 4, 5, 6 or 7 Result: A null terminated ASCII string of the value. Command: GTV T[1-3] : Verbose get Temperature 1, 2 or 3 GTV S[1-3] : Verbose get Fan Speed 1, 2 or 3 GTV V[1-7] : Verbose get Voltage 1, 2, 3, 4, 5, 6 or 7 Result: A null terminated string with 5 values seperated by the '|' character. First is a the value. Second is active, 1=active. Third is the number of out-of-bounds readings. Forth is 1 if a failure has been logged. Fifth is 1 if a warning has been logged. Unknown commands return "ERROR: Unsupported command" Version 2.0 All of Version 1.0 plus the following. Command: END : Close the connectioin. Result: The string "Closing connection" is send and then healthd closes the connection. Command: VER P : Get the protocol Version. Result: A null terminated ASCII string with both major and minor values. Or an error. Command: VER d : Get the healthd Version. Result: A null terminated ASCII string with both major and minor values. Or an error. Command: CFG - Get the values from the configuration file. T[0-2] - for temperature F[0-2] - for fan speed V[0-6] - for voltage ACT - for if active [yes/no] LBL - the text description [string] MIN - minimum value [integer/float] MAX - maximum value [integer/float] DOW - for doWarn [yes/no] DOF - for doFail [yes/no] TWarn - temperature warning command TFail - temperature fail command FWarn - fan warning command FFail - fan fail command VWarn - voltage warning command VFail - voltage fail command Therefore "CFG T1_ACT" returns whether Temp1 is active And "CFG V0_DOF" returns whether Volt0 will act on failures And "CFG FFail" returns the command executed on fan failure Result: Depends upon the command. NOTE: DOW and DOF parameters not enable by default because they provide information that might be exploitable. NOTE: TWarn, TFail, FWarn, FFail, VWarn and VFail parameters are not enabled by default because the provide information that might be exploitable.