Forráskód Böngészése

jimbo sync with lusa

zhangbo 5 éve
szülő
commit
3e6e6181cb
100 módosított fájl, 18305 hozzáadás és 1573 törlés
  1. 1 0
      app/Makefile
  2. 105 15
      app/bmc/Api.c
  3. 2 0
      app/bmc/Api.h
  4. 33 1
      app/bmc/BmcType.h
  5. 536 579
      app/bmc/Session.c
  6. 41 41
      app/bmc/Session.h
  7. 27 0
      app/bmc/SysTimer/TimerTask.c
  8. BIN
      app/bmc/bmc_app
  9. BIN
      app/bmc/bmc_app.gdb
  10. 27 2
      app/bmc/ipmb/IPMBIfc.c
  11. 1 0
      app/bmc/lan/RMCP.c
  12. 3 1
      app/bmc/main.c
  13. 50 11
      app/bmc/main.h
  14. 2 2
      app/bmc/msghndlr/App/App.c
  15. 471 517
      app/bmc/msghndlr/App/AppDevice/AppDevice.c
  16. 9 9
      app/bmc/msghndlr/MsgHndlr.h
  17. 364 299
      app/bmc/msghndlr/MsgHndlrTask.c
  18. 6 6
      app/bmc/msghndlr/PDKCmds.c
  19. 65 65
      app/bmc/msghndlr/PMConfig.h
  20. 4 4
      app/bmc/msghndlr/SensorEvent/SensorMonitor.h
  21. 0 1
      app/bmc/msghndlr/Storage/SDRDevice/SDR.c
  22. 1 0
      app/bmc/msghndlr/Support.h
  23. 6 6
      app/bmc/msghndlr/Transport/Badpasswd.c
  24. 2 2
      app/bmc/msghndlr/Transport/SerialModem.c
  25. 1 1
      app/bmc/msghndlr/cmdselect.c
  26. 14 11
      app/common_include/com_IPMIDefs.h
  27. BIN
      app/goahead-5.1.0/build/linux-arm-static/bin/goahead
  28. BIN
      app/goahead-5.1.0/build/linux-arm-static/bin/goahead-test
  29. BIN
      app/goahead-5.1.0/build/linux-arm-static/bin/gopass
  30. BIN
      app/goahead-5.1.0/build/linux-arm-static/bin/libgo.a
  31. BIN
      app/ipmitool-1.8.18.tar.bz2
  32. 47 0
      app/ipmitool-1.8.18/Makefile
  33. 414 0
      app/ipmitool-1.8.18/README
  34. 41 0
      app/ipmitool-1.8.18/contrib/Makefile.am
  35. 550 0
      app/ipmitool-1.8.18/contrib/Makefile.in
  36. 95 0
      app/ipmitool-1.8.18/contrib/README
  37. 403 0
      app/ipmitool-1.8.18/contrib/bmc-snmp-proxy
  38. 18 0
      app/ipmitool-1.8.18/contrib/bmc-snmp-proxy.service
  39. 48 0
      app/ipmitool-1.8.18/contrib/bmc-snmp-proxy.sysconf
  40. 308 0
      app/ipmitool-1.8.18/contrib/bmclanconf
  41. 29 0
      app/ipmitool-1.8.18/contrib/collect_data.sh
  42. 40 0
      app/ipmitool-1.8.18/contrib/create_rrds.sh
  43. 211 0
      app/ipmitool-1.8.18/contrib/create_webpage.sh
  44. 151 0
      app/ipmitool-1.8.18/contrib/create_webpage_compact.sh
  45. 326 0
      app/ipmitool-1.8.18/contrib/exchange-bmc-os-info.init.redhat
  46. 13 0
      app/ipmitool-1.8.18/contrib/exchange-bmc-os-info.service.redhat
  47. 26 0
      app/ipmitool-1.8.18/contrib/exchange-bmc-os-info.sysconf
  48. 17 0
      app/ipmitool-1.8.18/contrib/ipmi.init.basic
  49. 222 0
      app/ipmitool-1.8.18/contrib/ipmi.init.redhat
  50. 92 0
      app/ipmitool-1.8.18/contrib/ipmievd.init.debian
  51. 87 0
      app/ipmitool-1.8.18/contrib/ipmievd.init.redhat
  52. 212 0
      app/ipmitool-1.8.18/contrib/ipmievd.init.suse
  53. 88 0
      app/ipmitool-1.8.18/contrib/log_bmc.sh
  54. 229 0
      app/ipmitool-1.8.18/contrib/oem_ibm_sel_map
  55. 37 0
      app/ipmitool-1.8.18/control/Makefile.am
  56. 503 0
      app/ipmitool-1.8.18/control/Makefile.in
  57. 404 0
      app/ipmitool-1.8.18/control/ipmitool.spec.in
  58. 10 0
      app/ipmitool-1.8.18/control/pkginfo.in
  59. 12 0
      app/ipmitool-1.8.18/control/prototype.in
  60. 12 0
      app/ipmitool-1.8.18/control/rpmmacros.in
  61. 8 0
      app/ipmitool-1.8.18/control/rpmrc
  62. 36 0
      app/ipmitool-1.8.18/doc/Makefile.am
  63. 611 0
      app/ipmitool-1.8.18/doc/Makefile.in
  64. 231 0
      app/ipmitool-1.8.18/doc/ipmievd.8
  65. 3745 0
      app/ipmitool-1.8.18/doc/ipmitool.1
  66. 34 0
      app/ipmitool-1.8.18/include/Makefile.am
  67. 666 0
      app/ipmitool-1.8.18/include/Makefile.in
  68. 42 0
      app/ipmitool-1.8.18/include/ipmitool/Makefile.am
  69. 564 0
      app/ipmitool-1.8.18/include/ipmitool/Makefile.in
  70. 53 0
      app/ipmitool-1.8.18/include/ipmitool/bswap.h
  71. 131 0
      app/ipmitool-1.8.18/include/ipmitool/helper.h
  72. 91 0
      app/ipmitool-1.8.18/include/ipmitool/hpm2.h
  73. 307 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi.h
  74. 76 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_cc.h
  75. 197 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_cfgp.h
  76. 146 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_channel.h
  77. 55 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_chassis.h
  78. 136 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_constants.h
  79. 270 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_dcmi.h
  80. 370 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_delloem.h
  81. 68 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_ekanalyzer.h
  82. 53 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_entity.h
  83. 66 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_event.h
  84. 106 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_firewall.h
  85. 618 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_fru.h
  86. 243 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_fwum.h
  87. 48 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_gendev.h
  88. 809 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_hpmfwupg.h
  89. 45 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_ime.h
  90. 234 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_intf.h
  91. 57 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_isol.h
  92. 46 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_kontronoem.h
  93. 168 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_lanp.h
  94. 54 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_lanp6.h
  95. 42 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_main.h
  96. 194 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_mc.h
  97. 47 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_oem.h
  98. 967 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_pef.h
  99. 211 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_picmg.h
  100. 44 0
      app/ipmitool-1.8.18/include/ipmitool/ipmi_raw.h

+ 1 - 0
app/Makefile

@@ -11,5 +11,6 @@ all	:
 	make -C ./bmc
 	make -C ./goahead-5.1.0
 	make -C ./test_app
+	#make -C ./ipmitool-1.8.18
 clean	: 
 	rm -rf *.o

+ 105 - 15
app/bmc/Api.c

@@ -8,6 +8,8 @@
 #include "SDRRecord.h"
 #include "SELRecord.h"
 #include "SEL.h"
+#include "MsgHndlr.h"
+
 
 int InitSdrConfig(void)
 {
@@ -43,6 +45,7 @@ int InitSdrConfig(void)
 
 int InitSelConfig(void)
 {
+	printf("InitSelConfig...\n");
 	g_BMCInfo.SELConfig.SelReservationID = 0;;
     g_BMCInfo.SELConfig.LastEvtTS		=	0;
     g_BMCInfo.SELConfig.PartialAddRecordID	=	0;
@@ -65,15 +68,25 @@ int PlatformInit(void)
 {
 	uint8_t PrimaryIPMBBusNum, SecondaryIPMBBusNum;
 	printf("Init Platform...\r\n");
+
+	//hardware init
+	GPIO_InitTypeDef GPIO_InitStruct;
+	GPIO_InitStruct.Pin = GA0_PIN | GA1_PIN | GA2_PIN | GA3_PIN | GA4_PIN | RACKID2_PIN;
+	GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
+	GPIO_InitStruct.Pull = GPIO_NOPULL;
+	GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
+	stm32_gpio_init(GPIOH, &GPIO_InitStruct);
+
+	GPIO_InitStruct.Pin = GAP_PIN | RACKID1_PIN | RACKID3_PIN | RACKID4_PIN | RACKID5_PIN;
+	stm32_gpio_init(GPIOI, &GPIO_InitStruct);
+
+
+
+
 	g_BMCInfo.SelfTestByte 	=	0;
 	g_BMCInfo.SlotID		=	PDK_GetSlotID();
-	g_BMCInfo.chassisID		=	PDK_GetChassisID();
+	g_BMCInfo.ChassisID		=	PDK_GetChassisID();
 
-	// g_BMCInfo.PrimaryIPMBBus		=	PRIMARY_IPMB;
-	// g_BMCInfo.SecondaryIPMBBus		=	SECONDARY_IPMB;
-	// g_BMCInfo.PrimaryIPMBAddr		=	PRIMARY_IPMB_ADDR;
-	// g_BMCInfo.SecondaryIPMBAddr		=	SECONDARY_IPMB_ADDR;
-	// g_BMCInfo.SendMsgSeqNum			=	0;
 	g_BMCInfo.ChassisIdentify		=	FALSE;
 	
 	//init DevGUID
@@ -96,6 +109,7 @@ int PlatformInit(void)
 	
 	g_BMCInfo.FwMajorVer		=	FW_VERSION_MAJOR;
 	g_BMCInfo.FwMinorVer		=	FW_VERSION_MINOR;
+	g_BMCInfo.SendMsgSeqNum				=	0;
 	
 	// g_BMCInfo.OemFlags.BladeWorkMode			=	BLADE_IPMC;
 	// g_BMCInfo.OemFlags.chassisManageFnEnable	=	0;
@@ -115,6 +129,39 @@ int PlatformInit(void)
 	return 0;
 }
 
+int InitTimerTaskTbl(void)
+{
+	printf("InitTimerTaskTbl...\n");
+	g_BMCInfo.TimerTaskTblSize = 9;
+    memcpy(g_BMCInfo.TimerTaskTbl, m_TimerTaskTbl,sizeof(m_TimerTaskTbl));
+}
+
+int Init_SessionTbl(void)
+{
+	printf("Init_SessionTbl...\n");
+	g_BMCInfo.IpmiConfig.MaxSession				= 	10;
+	g_BMCInfo.IpmiConfig.SessionTimeOut			= 	10;	//10s
+	g_BMCInfo.IpmiConfig.SendMsgTimeout			=	10;	//10s
+	/*Allocating Memory to hold session Table informations */
+    g_BMCInfo.SessionTblInfo.SessionTbl = (SessionInfo_T *) malloc(sizeof(SessionInfo_T)*( g_BMCInfo.IpmiConfig.MaxSession + 1));
+    if(g_BMCInfo.SessionTblInfo.SessionTbl == NULL)
+    {
+        printf("Error in allocating memory for SessionTbl \n");
+        return 1;
+    }
+    /*Initialize the Session Table memory */
+    memset(g_BMCInfo.SessionTblInfo.SessionTbl,0,sizeof(SessionInfo_T)*(g_BMCInfo.IpmiConfig.MaxSession + 1));
+
+    /*Allocating Memory to hold UDS session Table informations */
+    g_BMCInfo.UDSSessionTblInfo.UDSSessionTbl = (UDSSessionTbl_T *) malloc(sizeof(UDSSessionTbl_T)*(g_BMCInfo.IpmiConfig.MaxSession + 1));
+    if(g_BMCInfo.UDSSessionTblInfo.UDSSessionTbl == NULL)
+    {
+        printf("Error in allocating memory for SessionTbl \n");
+        return 1;
+    }
+    /*Initialize the UDS Session Table memory */
+    memset(g_BMCInfo.UDSSessionTblInfo.UDSSessionTbl,0,sizeof(UDSSessionTbl_T)*(g_BMCInfo.IpmiConfig.MaxSession + 1));
+}
 
 const char FirstPowerOnStr[] = "First power on the bmc";
 int Init_IPMI_FRU_SDR_SEL(void)
@@ -133,7 +180,7 @@ int Init_IPMI_FRU_SDR_SEL(void)
 		printf("g_BMCInfo.pSDR Malloc failed!\r\n");
 	}
 	g_BMCInfo.pSEL = malloc(selSize);
-	if((g_BMCInfo.pSDR == NULL) && (selSize != 0))
+	if((g_BMCInfo.pSEL == NULL) && (selSize != 0))
 	{
 		printf("g_BMCInfo.pSEL Malloc failed!\r\n");
 	}
@@ -147,12 +194,17 @@ int Init_IPMI_FRU_SDR_SEL(void)
 		/************************** Init IPMI ******************************/
 		memcpy(g_BMCInfo.IpmiConfig.FirstPowerOnStr, FirstPowerOnStr, sizeof(FirstPowerOnStr));
 		
+		g_BMCInfo.IpmiConfig.SerialIfcSupport		=	SERIAL_IFC_SUPPORT;
+		g_BMCInfo.IpmiConfig.SerialTerminalSupport	=	SERIAL_TERMINAL_SUPPORT;
+		g_BMCInfo.IpmiConfig.LANIfcSupport			=	LAN_IFC_SUPPORT;
+		g_BMCInfo.IpmiConfig.SYSIfcSupport			=	SYS_IFC_SUPPORT;
 		g_BMCInfo.IpmiConfig.GrpExtnSupport 		= 	GROUP_EXTERN_SUPPORT;
 		g_BMCInfo.IpmiConfig.ChassisTimerInterval	=	CHASSIS_TIMER_INTERVAL;	
 		g_BMCInfo.IpmiConfig.PowerCycleInterval		=	PWR_CYCLE_INTERVAL;
 		g_BMCInfo.IpmiConfig.FanControlInterval		=	FAN_CONTROL_INTERVAL;		
 		g_BMCInfo.IpmiConfig.RearmSetSensorThreshold	=	REARM_SET_SENSOR_THRESHOLD;
 		g_BMCInfo.IpmiConfig.SELTimeUTCOffset		=	8*60;
+		
 		//IPMB
 		g_BMCInfo.IpmiConfig.PrimaryIPMBSupport		=	PRIMARY_IPMB_SUPPORT;
 		g_BMCInfo.IpmiConfig.SecondaryIPMBSupport	=	SECONDARY_IPMB_SUPPORT;
@@ -273,42 +325,80 @@ int PostEventMessage (uint8_t *EventMsg,uint8_t size)
 
 uint8_t PDK_GetSlotID(void)
 {
-	;
+	uint8_t SlotID = 0;
+	uint8_t check = 0;
+
+	if(stm32_gpio_read(GA0_PORT, GA0_PIN) == GPIO_PIN_RESET)
+		SlotID |= 0x01;
+	if(stm32_gpio_read(GA1_PORT, GA1_PIN) == GPIO_PIN_RESET)
+		SlotID |= 0x02;
+	if(stm32_gpio_read(GA2_PORT, GA2_PIN) == GPIO_PIN_RESET)
+		SlotID |= 0x04;
+	if(stm32_gpio_read(GA3_PORT, GA3_PIN) == GPIO_PIN_RESET)
+		SlotID |= 0x08;
+	if(stm32_gpio_read(GA4_PORT, GA4_PIN) == GPIO_PIN_RESET)
+		SlotID |= 0x10;
+
+	if(stm32_gpio_read(GAP_PORT, GAP_PIN) == GPIO_PIN_RESET)
+		SlotID |= 0x20;
+
+	int i;
+	for(i=0;i<6;i++)
+		check ^= (SlotID>>i)&0x01;
+
+	if(check == 0)
+		printf("Slot ID check error! GAP = %#x, GA[4:0] = %#x.\n", (SlotID>>5), (SlotID&0x1f));
+
+	return SlotID&0x1f;
 }
 
 uint8_t PDK_GetChassisID(void)
 {
-	;
+	uint8_t ChassisID = 0;
+	if(stm32_gpio_read(RACKID0_PORT, RACKID0_PIN) == GPIO_PIN_SET)
+		ChassisID |= 0x01;
+	if(stm32_gpio_read(RACKID1_PORT, RACKID1_PIN) == GPIO_PIN_SET)
+		ChassisID |= 0x02;
+	if(stm32_gpio_read(RACKID2_PORT, RACKID2_PIN) == GPIO_PIN_SET)
+		ChassisID |= 0x04;
+	if(stm32_gpio_read(RACKID3_PORT, RACKID3_PIN) == GPIO_PIN_SET)
+		ChassisID |= 0x08;
+	if(stm32_gpio_read(RACKID4_PORT, RACKID4_PIN) == GPIO_PIN_SET)
+		ChassisID |= 0x10;
+	if(stm32_gpio_read(RACKID5_PORT, RACKID5_PIN) == GPIO_PIN_SET)
+		ChassisID |= 0x20;
+
+	return ChassisID;
 }
 
 int PDK_PowerOffChassis(void)
 {
-	;
+	printf("power off chassis\n");
 }
 
 int PDK_PowerOnChassis(void)
 {
-	;
+	printf("power on chassis\n");
 }
 
 int PDK_SoftOffChassis(void)
 {
-	;
+	printf("soft off chassis\n");;
 }
 
 int PDK_PowerCycleChassis(void)
 {
-	;
+	printf("power cycle chassis\n");;
 }
 
 int PDK_ResetChassis(void)
 {
-	;
+	printf("power reset chassis\n");;
 }
 
 int PDK_DiagInterruptChassis(void)
 {
-	;
+	printf("power diag chassis\n");;
 }
 
 int PDK_FanControl(void)

+ 2 - 0
app/bmc/Api.h

@@ -5,6 +5,8 @@ int PlatformInit(void);
 int InitSelConfig(void);
 int InitSdrConfig(void);
 int Init_IPMI_FRU_SDR_SEL(void);
+int Init_SessionTbl(void);
+int InitTimerTaskTbl(void);
 
 int UpdateFlash(void);
 int SetSysTime(uint32_t *timeSecond);

+ 33 - 1
app/bmc/BmcType.h

@@ -2,15 +2,37 @@
 #define __BMC_TYPE_H__
 
 #include <stdint.h>
+#include <unistd.h>
+#include <pthread.h>
 #include "Session.h"
 #include "com_IPMI_ChassisDevice.h"
 #include "PMConfig.h"
 #include "SensorMonitor.h"
 #include "com_BmcType.h"
+#include "MsgHndlr.h"
 
 #pragma pack(1)
 
 /***************************************** IPMI ******************************************************/
+typedef struct
+{
+    pthread_key_t CurSessionID;
+    pthread_key_t CurPrivLevel;
+    pthread_key_t CurChannel;
+    pthread_key_t CurKCSIfcNum;
+    pthread_key_t CurSessionType;
+    pthread_key_t OwnerLUN;
+}TLS_T;
+
+typedef enum
+{
+  ORIGIN_UNSPECIFIED = 0,
+  ORIGIN_SENDMSG,
+  ORIGIN_CMDFWD,
+  ORIGIN_INT_REQ,
+  ORIGIN_NM,
+}BridgeOrigin;
+
 typedef struct
 {
 	char	FirstPowerOnStr[32];	//first power on the bmc 
@@ -23,6 +45,7 @@ typedef struct
     uint8_t LANIfcSupport ;
     uint8_t SYSIfcSupport;
     uint8_t GrpExtnSupport ;
+
 	uint32_t FanControlInterval;
 
  	//IPMB
@@ -44,6 +67,7 @@ typedef struct
 	uint8_t				RearmSetSensorThreshold;
 	int16_t				SELTimeUTCOffset;
 	
+	uint8_t		MaxSession;
 	uint32_t	LogOutTimeout;
 } IPMIConfig_T;
 
@@ -64,7 +88,7 @@ typedef struct
 	
 	//chassis
     uint8_t             SlotID;
-	uint8_t				chassisID;
+	uint8_t				ChassisID;
 
 	uint8_t				PowerGoodFlag;
 	uint8_t				FirstPowerOn;
@@ -87,14 +111,22 @@ typedef struct
 //	OEM_FLAGS_T			OemFlags;
 	
 	SessionInfo_T		LanSession;
+	SessionTblInfo_T 	SessionTblInfo;
+	UDSSessionTblInfo_T UDSSessionTblInfo;
+	uint8_t			 	TimerTaskTblSize;
+	TimerTaskTbl_T    	TimerTaskTbl[20];
+
 	//bool				loginOk;
 	//uint32_t			logOutCnt;
 	UserInfo_T			UserInfoTbl[MAX_USER_NUM];
 	UserInfo_T			*pUserInfo;
 	uint8_t				CurrentNoUser;
 	
+
+	
 	uint8_t				FwMajorVer;
 	uint8_t				FwMinorVer;
+
 } BMCInfo_t;
 
 

+ 536 - 579
app/bmc/Session.c

@@ -40,6 +40,8 @@
 #include <stdio.h>
 #include "main.h"
 #include <string.h>
+#include <time.h>
+#include "com_IPMI_SensorEvent.h"
 
 //#define TOTAL_INFINITE_CMDS  sizeof(m_InfiniteCmdsTbl)/sizeof(IPMICmdsFilterTbl_T)
 
@@ -83,95 +85,94 @@
 
 //};
 
-///*********************************************************************************************
-//    Name	:	SessionTimeOutTask
-//    Input	:	void
-//    Output	:	void
-//        This program  checks for session timeout
-//*********************************************************************************************/
-//void SessionTimerTask (int BMCInst)
-//{
-//     BMCInfo_t* pBMCInfo = &g_BMCInfo[BMCInst];
-
-//    	SessionTblInfo_T*	pSessionTblInfo = &pBMCInfo->SessionTblInfo;
-//    uint8_t				Index;
-//    char solsessionfile[MAXFILESIZE] = {0};
-//    struct stat fp;
-
-//    for (Index=0; Index < pBMCInfo->IpmiConfig.MaxSession; Index++)
-//    {
-//        if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
-//        {
-//            continue;
-//        }
-
-//        if(pBMCInfo->IpmiConfig.SerialIfcSupport == 1)
-//        {
-//            if (pBMCInfo->SERIALch == pSessionTblInfo->SessionTbl[Index].Channel)
-//            {
-//                continue;
-//                if (!(pBMCInfo->SMConfig.SessionTermination & 0x02)) /* If Session Inactivity timeout disabled */
-//                {
-//                    continue;
-//                }
-//                else if (0 == pBMCInfo->SMConfig.SessionInactivity) /* Never Time Out */
-//                {
-//                    continue;
-//                }
-//            }
-//        }
-//        
-//        if(pBMCInfo->IpmiConfig.SOLIfcSupport == 1)
-//        {
-//            if(pSessionTblInfo->SessionTbl[Index].SessPyldInfo [PAYLOAD_SOL].Type == PAYLOAD_SOL)
-//            {
-//                if (pBMCInfo->IpmiConfig.SOLSessionTimeOut == 0 ) // Never Time Out 
-//                {
-//                    continue;
-//                }
-//                
-//                if(pSessionTblInfo->SessionTbl[Index].TimeOutValue == 0)
-//                {
-//                    sprintf(solsessionfile,"%s%d",SOL_SESSION_FILE,BMCInst);
-//                
-//                    if(stat(solsessionfile,&fp) == 0)
-//                    {
-//                        unlink(solsessionfile);
-//                    }
-//                }
-//            }
-//        }
-
-//        if(GetLinkStatus(pSessionTblInfo->SessionTbl[Index].Channel,BMCInst) !=0)
-//        {
-//            if (pSessionTblInfo->SessionTbl[Index].TimeOutValue > 0)
-//            {
-//                pSessionTblInfo->SessionTbl[Index].TimeOutValue--;
-//                continue;
-//            }
-//        }
-//        else
-//        {
-//            pSessionTblInfo->SessionTbl[Index].Linkstat = TRUE;
-//            continue;
-//        }
-
-//        IPMI_DBG_PRINT ("\nSessionTimerTask: Session Time Out Occured\n");
-//        IPMI_DBG_PRINT_2 ("SessionID = 0x%lX  Num of Sessions = %X\n", pSessionTblInfo->SessionTbl[Index].SessionID,
-//                        pSessionTblInfo->Count);
-
-//        if(pBMCInfo->IpmiConfig.SerialIfcSupport == 1)
-//        {
-//            if (pBMCInfo->SERIALch == pSessionTblInfo->SessionTbl[Index].Channel)
-//            {
-//                BMC_GET_SHARED_MEM (BMCInst)->SerialSessionActive = FALSE;
-//            }
-//        }
-
-//        /* Delete the Session from session table */
-//        DeleteSession (&pSessionTblInfo->SessionTbl[Index],BMCInst);
-//    }
-//}
+/*********************************************************************************************
+   Name	:	SessionTimeOutTask
+   Input	:	void
+   Output	:	void
+       This program  checks for session timeout
+*********************************************************************************************/
+void SessionTimerTask (void)
+{
+   	SessionTblInfo_T*	pSessionTblInfo = &g_BMCInfo.SessionTblInfo;
+   uint8_t				Index;
+//   char solsessionfile[MAXFILESIZE] = {0};
+   struct stat fp;
+
+   printf("-> SessionTimerTask\n");
+   for (Index=0; Index < g_BMCInfo.IpmiConfig.MaxSession; Index++)
+   {
+       if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
+       {
+           continue;
+       }
+
+       // if(g_BMCInfo.IpmiConfig.SerialIfcSupport == 1)
+       // {
+       //     if (g_BMCInfo.SERIALch == pSessionTblInfo->SessionTbl[Index].Channel)
+       //     {
+       //         continue;
+       //         if (!(g_BMCInfo.SMConfig.SessionTermination & 0x02)) /* If Session Inactivity timeout disabled */
+       //         {
+       //             continue;
+       //         }
+       //         else if (0 == g_BMCInfo.SMConfig.SessionInactivity) /* Never Time Out */
+       //         {
+       //             continue;
+       //         }
+       //     }
+       // }
+       
+       // if(pBMCInfo->IpmiConfig.SOLIfcSupport == 1)
+       // {
+       //     if(pSessionTblInfo->SessionTbl[Index].SessPyldInfo [PAYLOAD_SOL].Type == PAYLOAD_SOL)
+       //     {
+       //         if (pBMCInfo->IpmiConfig.SOLSessionTimeOut == 0 ) // Never Time Out 
+       //         {
+       //             continue;
+       //         }
+               
+       //         if(pSessionTblInfo->SessionTbl[Index].TimeOutValue == 0)
+       //         {
+       //             sprintf(solsessionfile,"%s%d",SOL_SESSION_FILE,BMCInst);
+               
+       //             if(stat(solsessionfile,&fp) == 0)
+       //             {
+       //                 unlink(solsessionfile);
+       //             }
+       //         }
+       //     }
+       // }
+
+    //   if(GetLinkStatus(pSessionTblInfo->SessionTbl[Index].Channel,BMCInst) !=0)
+    //   {
+           if (pSessionTblInfo->SessionTbl[Index].TimeOutValue > 0)
+           {
+               pSessionTblInfo->SessionTbl[Index].TimeOutValue--;
+               continue;
+           }
+       // }
+       // else
+       // {
+       //     pSessionTblInfo->SessionTbl[Index].Linkstat = TRUE;
+       //     continue;
+       // }
+
+       printf ("\nSessionTimerTask: Session Time Out Occured\n");
+       printf ("SessionID = 0x%lX  Num of Sessions = %X\n", pSessionTblInfo->SessionTbl[Index].SessionID,
+                       pSessionTblInfo->Count);
+
+       // if(pBMCInfo->IpmiConfig.SerialIfcSupport == 1)
+       // {
+       //     if (pBMCInfo->SERIALch == pSessionTblInfo->SessionTbl[Index].Channel)
+       //     {
+       //         BMC_GET_SHARED_MEM (BMCInst)->SerialSessionActive = FALSE;
+       //     }
+       // }
+
+       /* Delete the Session from session table */
+       DeleteSession (&pSessionTblInfo->SessionTbl[Index]);
+   }
+}
 
 
 ///*********************************************************************************************
@@ -180,7 +181,7 @@
 //    Output	:	channelInformations
 //        This program  returns informations about the channel
 //*********************************************************************************************/
-// ChannelInfo_T* getChannelInfo (uint8_t ch,int BMCInst)
+// ChannelInfo_T* getChannelInfo (uint8_t ch )
 //{
 //    uint8_t Index;
 //    ChcfgInfo_T *pChannelInfo=NULL;
@@ -460,7 +461,7 @@ UserInfo_T*	getUserNameInfo (uint8_t *UserName)
 //This program returns information about the user for the given channel,
 //        & Index of the user in Channel User Array.
 //*********************************************************************************************/
-// ChannelUserInfo_T* getChUserInfo ( char *userName,   uint8_t* chIndex,  ChannelUserInfo_T *pChUserInfo,int BMCInst)
+// ChannelUserInfo_T* getChUserInfo ( char *userName,   uint8_t* chIndex,  ChannelUserInfo_T *pChUserInfo )
 //{
 //     UserInfo_T* pUserTable = (UserInfo_T *) GetNVRUsrCfgAddr (NVRH_USERCONFIG, BMCInst);
 //     BMCInfo_t* pBMCInfo = &g_BMCInfo[BMCInst];
@@ -577,67 +578,67 @@ UserInfo_T*	getUserNameInfo (uint8_t *UserName)
 
 This program  returns the session information.
 *********************************************************************************************/
-//SessionInfo_T* getSessionInfo (uint8_t Arg,  void *Session)
-//{
-//    uint8_t				Index;
-//    uint8_t				ActiveSesIndex = 0;
-//    SessionTblInfo_T*	pSessionTblInfo = &pBMCInfo->SessionTblInfo;
-
-//    for (Index = 0; Index < pBMCInfo->IpmiConfig.MaxSession; Index++)
-//    {
-//        if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
-//        {
-//            continue;
-//        }
-//        if (TRUE == pSessionTblInfo->SessionTbl[Index].Activated)
-//        {
-//            ActiveSesIndex++;
-//        }
-
-//        switch (Arg)
-//        {
-//        case SESSION_ID_INFO:
-//            if(pSessionTblInfo->SessionTbl[Index].SessionID == *((uint32_t *)Session) )
-//            {
-//                return &pSessionTblInfo->SessionTbl[Index];
-//            }
-//            break;
-
-//        case SESSION_REMOTE_INFO:
-//            if(pSessionTblInfo->SessionTbl[Index].RemConSessionID == *((uint32_t *)Session) )
-//            {
-//                return &pSessionTblInfo->SessionTbl[Index];
-//            }
-//            break;
-
-//        case SESSION_HANDLE_INFO:
-//            if (pSessionTblInfo->SessionTbl[Index].SessionHandle == *(( uint8_t*)Session) && pSessionTblInfo->SessionTbl[Index].Activated)
-//            {
-//            	//printf("---> SessionHandle = %#x\n",pSessionTblInfo->SessionTbl[Index].SessionHandle);
-//                return &pSessionTblInfo->SessionTbl[Index];
-//            }
-//            break;
-
-//        case SESSION_INDEX_INFO:
-//            if (ActiveSesIndex == *(( uint8_t*)Session))
-//            {
-//                return &pSessionTblInfo->SessionTbl[Index];
-//            }
-//            break;
-
-//        case SESSION_CHANNEL_INFO:
-//            if (pSessionTblInfo->SessionTbl[Index].Channel == *(( uint8_t*)Session))
-//            {
-//                return &pSessionTblInfo->SessionTbl[Index];
-//            }
-//            break;
-
-//        default:
-//            return NULL;
-//        }
-//    }
-//    return NULL;
-//}
+SessionInfo_T* getSessionInfo (uint8_t Arg,  void *Session)
+{
+   uint8_t				Index;
+   uint8_t				ActiveSesIndex = 0;
+   SessionTblInfo_T*	pSessionTblInfo = &g_BMCInfo.SessionTblInfo;
+
+   for (Index = 0; Index < g_BMCInfo.IpmiConfig.MaxSession; Index++)
+   {
+       if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
+       {
+           continue;
+       }
+       if (TRUE == pSessionTblInfo->SessionTbl[Index].Activated)
+       {
+           ActiveSesIndex++;
+       }
+
+       switch (Arg)
+       {
+       case SESSION_ID_INFO:
+           if(pSessionTblInfo->SessionTbl[Index].SessionID == *((uint32_t *)Session) )
+           {
+               return &pSessionTblInfo->SessionTbl[Index];
+           }
+           break;
+
+       // case SESSION_REMOTE_INFO:
+       //     if(pSessionTblInfo->SessionTbl[Index].RemConSessionID == *((uint32_t *)Session) )
+       //     {
+       //         return &pSessionTblInfo->SessionTbl[Index];
+       //     }
+       //     break;
+
+       case SESSION_HANDLE_INFO:
+           if (pSessionTblInfo->SessionTbl[Index].SessionHandle == *(( uint8_t*)Session) && pSessionTblInfo->SessionTbl[Index].Activated)
+           {
+           	//printf("---> SessionHandle = %#x\n",pSessionTblInfo->SessionTbl[Index].SessionHandle);
+               return &pSessionTblInfo->SessionTbl[Index];
+           }
+           break;
+
+       case SESSION_INDEX_INFO:
+           if (ActiveSesIndex == *(( uint8_t*)Session))
+           {
+               return &pSessionTblInfo->SessionTbl[Index];
+           }
+           break;
+
+       case SESSION_CHANNEL_INFO:
+           if (pSessionTblInfo->SessionTbl[Index].Channel == *(( uint8_t*)Session))
+           {
+               return &pSessionTblInfo->SessionTbl[Index];
+           }
+           break;
+
+       default:
+           return NULL;
+       }
+   }
+   return NULL;
+}
 
 ///*********************************************************************************************
 //    Name	: AddChUser
@@ -664,240 +665,212 @@ This program  returns the session information.
 //}
 
 
-///*---------------------------------------
-// * GetSelTimeStamp
-// *---------------------------------------*/
-//uint32_t
-//GetTimeStamp(void)
-//{
-//    return (htoipmi_u32 (GET_SYSTEM_TIME_STAMP()));
-//}
-
-///*********************************************************************************************
-//    Name	:	GetNumOfActiveSessions
-//    Input	:	Nothing
-//    Output	:	Number of active Sessions
-
-//This program returns the number of active session(s) from the session table
-//*********************************************************************************************/
-//uint8_t GetNumOfActiveSessions (int BMCInst)
-//{
-//    uint8_t				Index, Count = 0;
-//     BMCInfo_t* pBMCInfo = &g_BMCInfo[BMCInst];
-//    	SessionTblInfo_T*	pSessionTblInfo = &pBMCInfo->SessionTblInfo;
-
-//    for (Index = 0; Index < pBMCInfo->IpmiConfig.MaxSession; Index++)
-//    {
-//        if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
-//        {
-//            continue;
-//        }
-//        if (pSessionTblInfo->SessionTbl[Index].Activated)
-//            Count++;
-//    }
-
-//    return Count;
-//}
-
-///*********************************************************************************************
-//    Name	:	GetNumOfUsedSessions
-//    Input	:	Nothing
-//    Output	:	Number of used Sessions
-
-//This program returns the number of used session(s) from the session table
-//*********************************************************************************************/
-//uint8_t GetNumOfUsedSessions (int BMCInst)
-//{
-//    uint8_t				Index, Count = 0;
-//     BMCInfo_t* pBMCInfo = &g_BMCInfo[BMCInst];
-//    	SessionTblInfo_T*	pSessionTblInfo = &pBMCInfo->SessionTblInfo;
-
-//    for (Index = 0; Index < pBMCInfo->IpmiConfig.MaxSession; Index++)
-//    {
-//        if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
-//        {
-//            continue;
-//        }
-//            Count++;
-//    }
-
-//    return Count;
-//}
-
-
-///*********************************************************************************************
-//    Name	:	CleanSession
-//    Input	:	Nothing
-//    Output	:	None
-
-//This program delete the oldest session filled but not activate
-//*********************************************************************************************/
-//uint8_t  CleanSession(int BMCInst)
-//{
-//    uint8_t			Index;
-//    OldSessionInfo_T     OldSession;
-//     BMCInfo_t* pBMCInfo = &g_BMCInfo[BMCInst];	
-//    	SessionTblInfo_T*	pSessionTblInfo = &pBMCInfo->SessionTblInfo;
-
-
-//    OldSession.Time=0xFFFFFFFF;
-//    OldSession.Index= 0xFF;
-
-
-//    for (Index = 0; Index < pBMCInfo->IpmiConfig.MaxSession; Index++)
-//    {
-//        if (TRUE == pSessionTblInfo->SessionTbl[Index].Activated)
-//        {
-//            continue;
-//        }
-
-//        if(pSessionTblInfo->SessionTbl[Index].Time <OldSession.Time )
-//        {
-//            OldSession.Time=pSessionTblInfo->SessionTbl[Index].Time;
-//            OldSession.Index=Index;
-//        }
-//    }
-
-//    if(OldSession.Index !=0xFF)
-//    {
-//        pSessionTblInfo->SessionTbl[OldSession.Index].Used = FALSE;
-//        pSessionTblInfo->Count--;
-//        pSessionTblInfo->SessionTbl[OldSession.Index].Time=0xffffffff;
-//    }else
-//    {
-//        return FALSE;
-//    }
-
-//    return TRUE;
-//}
-
-
-///*********************************************************************************************
-//    Name	:	DeleteSession
-//    Input	:	pSessionInfo - session information
-//    Output	:	Nothing
-
-//This program deletes the session from the session table
-//*********************************************************************************************/
-//void DeleteSession( SessionInfo_T*	pSessionInfo,int BMCInst)
-//{
-//    uint8_t			Index;
-//     BMCInfo_t* pBMCInfo = &g_BMCInfo[BMCInst];			 
-//    	SessionTblInfo_T*	pSessionTblInfo = &pBMCInfo->SessionTblInfo;
-//    	UserInfo_T*		 pUserInfo;
-//       ChannelInfo_T *      pChannelInfo;
-
-
-//    for (Index = 0; Index < pBMCInfo->IpmiConfig.MaxSession; Index++)
-//    {
-//        if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
-//        {
-//            continue;
-//        }
+/*---------------------------------------
+* GetSelTimeStamp
+*---------------------------------------*/
+uint32_t
+GetTimeStamp(void)
+{
+   return (time(NULL));
+}
 
-//        if (0 == _fmemcmp (&pSessionTblInfo->SessionTbl[Index], pSessionInfo , sizeof(SessionInfo_T)))
-//        {
-//            /* We have decrement  the Active session only .If session is activated */
-//            if(TRUE ==pSessionTblInfo->SessionTbl[Index].Activated)
-//            {
-//                if(!pSessionTblInfo->SessionTbl[Index].IsLoopBack)
-//                {
-//                    pChannelInfo= getChannelInfo(pSessionInfo->Channel, BMCInst);
-//                    if(NULL == pChannelInfo)
-//                    {
-//                        TDBG("Failed to get channel info while Deleting Session for Channel: %d\n",pSessionInfo->Channel);
-//                        return;
-//                    }
+/*********************************************************************************************
+   Name	:	GetNumOfActiveSessions
+   Input	:	Nothing
+   Output	:	Number of active Sessions
 
-//                    if(pChannelInfo!=NULL)
-//                    pChannelInfo->ActiveSession--;
-//                    pUserInfo = getUserIdInfo (pSessionInfo->UserId, BMCInst);
-//                    if (pUserInfo != NULL) { pUserInfo->CurrentSession--; }
-//                }
-//                pSessionTblInfo->SessionTbl[Index].Activated=FALSE;
-//                pSessionTblInfo->SessionTbl[Index].EventFlag = 0;
-//            }
+This program returns the number of active session(s) from the session table
+*********************************************************************************************/
+uint8_t GetNumOfActiveSessions (void)
+{
+   uint8_t				Index, Count = 0;
+   SessionTblInfo_T*	pSessionTblInfo = &g_BMCInfo.SessionTblInfo;
+
+   for (Index = 0; Index < g_BMCInfo.IpmiConfig.MaxSession; Index++)
+   {
+       if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
+       {
+           continue;
+       }
+       if (pSessionTblInfo->SessionTbl[Index].Activated)
+           Count++;
+   }
+
+   return Count;
+}
 
-//            pSessionTblInfo->SessionTbl[Index].Used = FALSE;
-//            pSessionTblInfo->Count--;
-//            pSessionTblInfo->SessionTbl[Index].Time=0xFFFFFFFF;
+/*********************************************************************************************
+   Name	:	GetNumOfUsedSessions
+   Input	:	Nothing
+   Output	:	Number of used Sessions
 
-//            IPMI_DBG_PRINT_3("DeleteSession: SessionID = %lX	Num Session %X\t%x\n",
-//            pSessionInfo->SessionID, pSessionTblInfo->Count,Index);
+This program returns the number of used session(s) from the session table
+*********************************************************************************************/
+uint8_t GetNumOfUsedSessions (void)
+{
+   uint8_t				Index, Count = 0;
+   	SessionTblInfo_T*	pSessionTblInfo = &g_BMCInfo.SessionTblInfo;
+
+   for (Index = 0; Index < g_BMCInfo.IpmiConfig.MaxSession; Index++)
+   {
+       if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
+       {
+           continue;
+       }
+           Count++;
+   }
+
+   return Count;
+}
 
-//// Don't create a DEACTIVATE_SOL task again. This is already done in Deactivate Payload
-//// while communicate via freeipmi, it will send the Deactivate packet to the newly created session, so removed.
-//#if 0	
-//            if(pBMCInfo->IpmiConfig.SOLIfcSupport == 1)
-//            {
-//                if(pSessionInfo->SessPyldInfo [PAYLOAD_SOL].Type == PAYLOAD_SOL)
-//                {
-//                    MsgPkt_T	MsgPkt;
 
-//                    MsgPkt.Param = DEACTIVATE_SOL;
-//                    MsgPkt.Size = 0;
-//                    if( 0 != PostMsg (&MsgPkt, SOL_IFC_Q,BMCInst))    
-//                    {
-//                        IPMI_WARNING ("AppDevice+.c : Error posting message to SOLIfc_Q\n");
-//                    }
-//                }
-//            }
-//#endif
+/*********************************************************************************************
+   Name	:	CleanSession
+   Input	:	Nothing
+   Output	:	None
 
-//            return;
-//        }
-//    }
+This program delete the oldest session filled but not activate
+*********************************************************************************************/
+uint8_t  CleanSession(void)
+{
+   uint8_t			Index;
+   OldSessionInfo_T     OldSession;
+   SessionTblInfo_T*	pSessionTblInfo = &g_BMCInfo.SessionTblInfo;
+
+   OldSession.Time=0xFFFFFFFF;
+   OldSession.Index= 0xFF;
+
+   for (Index = 0; Index < g_BMCInfo.IpmiConfig.MaxSession; Index++)
+   {
+       if (TRUE == pSessionTblInfo->SessionTbl[Index].Activated)
+       {
+           continue;
+       }
+
+       if(pSessionTblInfo->SessionTbl[Index].Time <OldSession.Time )
+       {
+           OldSession.Time=pSessionTblInfo->SessionTbl[Index].Time;
+           OldSession.Index=Index;
+       }
+   }
+
+   if(OldSession.Index !=0xFF)
+   {
+       pSessionTblInfo->SessionTbl[OldSession.Index].Used = FALSE;
+       pSessionTblInfo->Count--;
+       pSessionTblInfo->SessionTbl[OldSession.Index].Time=0xffffffff;
+   }else
+   {
+       return FALSE;
+   }
+
+   return TRUE;
+}
 
-//    return;
-//}
 
-///*********************************************************************************************
-//    Name	:	AddSession
-//    Input	:	pSessionInfo - session information
-//    Output	:	Nothing
+/*********************************************************************************************
+   Name	:	DeleteSession
+   Input	:	pSessionInfo - session information
+   Output	:	Nothing
 
-//This program adds the session to the session table
-//*********************************************************************************************/
-//void AddSession ( SessionInfo_T* pSessionInfo, int BMCInst)
-//{
-//    uint8_t Index;
-//     BMCInfo_t* pBMCInfo = &g_BMCInfo[BMCInst];		
-//    	SessionTblInfo_T*	pSessionTblInfo = &pBMCInfo->SessionTblInfo;
+This program deletes the session from the session table
+*********************************************************************************************/
+void DeleteSession( SessionInfo_T*	pSessionInfo)
+{
+   uint8_t			Index;		 
+   	SessionTblInfo_T*	pSessionTblInfo = &g_BMCInfo.SessionTblInfo;
+   	UserInfo_T*		 pUserInfo;
+      ChannelInfo_T *      pChannelInfo;
+
+
+   for (Index = 0; Index < g_BMCInfo.IpmiConfig.MaxSession; Index++)
+   {
+       if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
+       {
+           continue;
+       }
+
+       if (0 == memcmp (&pSessionTblInfo->SessionTbl[Index], pSessionInfo , sizeof(SessionInfo_T)))
+       {
+           /* We have decrement  the Active session only .If session is activated */
+           if(TRUE ==pSessionTblInfo->SessionTbl[Index].Activated)
+           {
+               // if(!pSessionTblInfo->SessionTbl[Index].IsLoopBack)
+               // {
+               //     pChannelInfo= getChannelInfo(pSessionInfo->Channel);
+               //     if(NULL == pChannelInfo)
+               //     {
+               //         TDBG("Failed to get channel info while Deleting Session for Channel: %d\n",pSessionInfo->Channel);
+               //         return;
+               //     }
+
+               //     if(pChannelInfo!=NULL)
+               //     pChannelInfo->ActiveSession--;
+               //     pUserInfo = getUserIdInfo (pSessionInfo->UserId);
+               //     if (pUserInfo != NULL) { pUserInfo->CurrentSession--; }
+               // }
+               pSessionTblInfo->SessionTbl[Index].Activated=FALSE;
+               pSessionTblInfo->SessionTbl[Index].EventFlag = 0;
+           }
+
+           pSessionTblInfo->SessionTbl[Index].Used = FALSE;
+           pSessionTblInfo->Count--;
+           pSessionTblInfo->SessionTbl[Index].Time=0xFFFFFFFF;
+
+           printf("DeleteSession: SessionID = %lX	Num Session %X\t%x\n",
+           pSessionInfo->SessionID, pSessionTblInfo->Count,Index);
+           return;
+       }
+   }
+
+   return;
+}
 
+/*********************************************************************************************
+   Name	:	AddSession
+   Input	:	pSessionInfo - session information
+   Output	:	Nothing
 
-//    for (Index = 0; Index < pBMCInfo->IpmiConfig.MaxSession; Index++)
-//    {
-//        if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
-//        {
-//            _fmemcpy (&pSessionTblInfo->SessionTbl[Index], ( uint8_t*)pSessionInfo, sizeof (SessionInfo_T));
-//            pSessionTblInfo->SessionTbl[Index].Used = TRUE;
-//            pSessionTblInfo->Count++;
-//            pSessionTblInfo->SessionTbl[Index].Time= GetTimeStamp ();
-//            pSessionTblInfo->SessionTbl[Index].TimeOutValue=pBMCInfo->IpmiConfig.SessionTimeOut;
-//            IPMI_DBG_PRINT_3 ("AddSession: SessionID   = %lX  Num Session %X\t%x\n",pSessionInfo->SessionID, pSessionTblInfo->Count,Index);
-//            break;
-//        }
-//    }
+This program adds the session to the session table
+*********************************************************************************************/
+void AddSession ( SessionInfo_T* pSessionInfo)
+{
+   uint8_t Index;
+   	SessionTblInfo_T*	pSessionTblInfo = &g_BMCInfo.SessionTblInfo;
+
+
+   for (Index = 0; Index < g_BMCInfo.IpmiConfig.MaxSession; Index++)
+   {
+       if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
+       {
+           memcpy (&pSessionTblInfo->SessionTbl[Index], ( uint8_t*)pSessionInfo, sizeof (SessionInfo_T));
+           pSessionTblInfo->SessionTbl[Index].Used = TRUE;
+           pSessionTblInfo->Count++;
+           pSessionTblInfo->SessionTbl[Index].Time= GetTimeStamp ();
+           pSessionTblInfo->SessionTbl[Index].TimeOutValue=g_BMCInfo.IpmiConfig.SessionTimeOut;
+           printf ("AddSession: SessionID   = %lX  Num Session %X\t%x\n",pSessionInfo->SessionID, pSessionTblInfo->Count,Index);
+           break;
+       }
+   }
 
-//}
+}
 
-///*********************************************************************************************
+// /*********************************************************************************************
 //    Name	:	getPayloadActiveInst
 //    Input	:	PayloadType
 //    Output	:	Activated Instance information of a given payload type.
 
-//This program returns the information about the activated instances of a given payload type.
-//*********************************************************************************************/
-// uint16_t getPayloadActiveInst (uint8_t PayloadType,int BMCInst)
-//{
+// This program returns the information about the activated instances of a given payload type.
+// *********************************************************************************************/
+// uint16_t getPayloadActiveInst (uint8_t PayloadType)
+// {
 //    uint8_t   PayloadIx;
 //    uint8_t   Index;
 //    uint16_t	ActivatedInst = 0;
-//     BMCInfo_t* pBMCInfo = &g_BMCInfo[BMCInst];
-//    	SessionTblInfo_T*	pSessionTblInfo = &pBMCInfo->SessionTblInfo;
+//    	SessionTblInfo_T*	pSessionTblInfo = &g_BMCInfo.SessionTblInfo;
 
 
-//    for (Index = 0; Index < pBMCInfo->IpmiConfig.MaxSession; Index++)
+//    for (Index = 0; Index < g_BMCInfo.IpmiConfig.MaxSession; Index++)
 //    {
 //        if (FALSE == pSessionTblInfo->SessionTbl[Index].Used)
 //        {
@@ -918,7 +891,7 @@ This program  returns the session information.
 //    }
 
 //    return ActivatedInst;
-//}
+// }
 
 ///*********************************************************************************************
 //    Name	:	getPayloadInstInfo
@@ -960,235 +933,219 @@ This program  returns the session information.
 //    return 0;
 //}
 
+static
+MsgPkt_T m_MsgPkt = {
+   PARAM_IFC,
+   0,                  /* Channel number not needed    */
+   0,                /* Source queue not needed      */
+   CMD_PLATFORM_EVENT, /* Cmd                          */
+   (NETFN_SENSOR << 2),/* Net Function                 */
+   PRIV_LOCAL,         /* Privilage                    */
+   0,                  /* Session ID not needed        */
+//   0,
+   WAIT_INFINITE,
+   0,
+   {0},                /* IP Addr not needed           */
+   0,                  /* UDPPort not needed           */
+   0,                  /* Socket  not needed           */
+   sizeof(SELEventRecord_T) + sizeof (IPMIMsgHdr_T) + 1,
+   {
+       0x20,               /* Generator ID             */
+       IPMI_EVM_REVISION,  /* IPMI Version             */
+       SENSOR_TYPE_SECUIRTY_VIOLATION,/*SensorType     */
+       SECUIRTY_VIOLATION_SENSOR_NUMBER,
+       SENSOR_SPECIFIC_READ_TYPE,
+       PW_VIOLATION_OFFSET,
+       0xff,
+       0xff
+   },
+};
+
+/*--------------------------------------------------------------------------*
+* PasswordViolation														*
+*--------------------------------------------------------------------------*/
+void
+PasswordViolation (void)
+{
+   /* Log the AC fail event to SEL	& send an alert */
+   /* Post to Message Hndlr Queue	*/
+   PostMsg ( gFd_MsgHndlrIfc, &m_MsgPkt);
 
-//static
-//MsgPkt_T	m_MsgPkt = {
-//                                    PARAM_IFC,
-//                                    0,                  /* Channel number not needed    */
-//                                    {0},                /* Source queue not needed      */
-//                                    CMD_PLATFORM_EVENT, /* Cmd                          */
-//                                    (NETFN_SENSOR << 2),/* Net Function                 */
-//                                    PRIV_LOCAL,         /* Privilage                    */
-//                                    0,                  /* Session ID not needed        */
-//                                    0,
-//                                    WAIT_INFINITE,
-//                                    0,
-//                                    {0},                /* IP Addr not needed           */
-//                                    0,                  /* UDPPort not needed           */
-//                                    0,                  /* Socket  not needed           */
-//                                    sizeof(SELEventRecord_T) + sizeof (IPMIMsgHdr_T) + 1,
-//                                    {
-//                                        0x20,               /* Generator ID             */
-//                                        IPMI_EVM_REVISION,  /* IPMI Version             */
-//                                        SENSOR_TYPE_SECUIRTY_VIOLATION,/*SensorType     */
-//                                        SECUIRTY_VIOLATION_SENSOR_NUMBER,
-//                                        SENSOR_SPECIFIC_READ_TYPE,
-//                                        PW_VIOLATION_OFFSET,
-//                                        0xff,
-//                                        0xff
-//                                    },
-//                        };
-
-///*--------------------------------------------------------------------------*
-//* PasswordViolation														*
-//*--------------------------------------------------------------------------*/
-//void
-//PasswordViolation (int BMCInst)
-//{
-//    /* Log the AC fail event to SEL	& send an alert */
-//    /* Post to Message Hndlr Queue	*/
-//    PostMsg (&m_MsgPkt, MSG_HNDLR_Q,BMCInst);
-
-//    return;
-//}
-
-
-
-///*********************************************************************************************
-//    Name	:	UDSSessionTimeOutTask
-//    Input	:	void
-//    Output	:	void
-//        This program  checks for UDS session timeout
-//*********************************************************************************************/
-//void UDSSessionTimerTask (int BMCInst)
-//{
-//    uint8_t Index=0;
-//    BMCInfo_t *pBMCInfo = &g_BMCInfo[BMCInst];
-//    UDSSessionTblInfo_T *pUDSSessionTblInfo = &pBMCInfo->UDSSessionTblInfo;
-
-//    for(Index=0;Index<pBMCInfo->IpmiConfig.MaxSession;Index++)
-//   {
-//        if(FALSE == pUDSSessionTblInfo->UDSSessionTbl[Index].Activated)
-//        {
-//           /* Continue until we find the Next Slot which is being used to reduce the timeout */
-//            continue;
-//        }
-
-//        if((pUDSSessionTblInfo->UDSSessionTbl[Index].SessionTimeoutValue <= pBMCInfo->IpmiConfig.SessionTimeOut) && (pUDSSessionTblInfo->UDSSessionTbl[Index].SessionTimeoutValue != 0))
-//        {
-//           /* Reduce the Session Timeout Value if the session is not used */
-//            pUDSSessionTblInfo->UDSSessionTbl[Index].SessionTimeoutValue--;
-//        }
-//        else if(pUDSSessionTblInfo->UDSSessionTbl[Index].SessionTimeoutValue <= 0)
-//        {
-//            DeleteUDSSession(&pUDSSessionTblInfo->UDSSessionTbl[Index],BMCInst);
-//        }
-//   }
-//}
-
-
-
-///*********************************************************************************************
-//    Name	:	GetUDSSessionInfo
-//    Input	:	Session - session ID
-//    Output	:	Session Information
-
-//This program  returns the session information.
-//*********************************************************************************************/
-// UDSSessionTbl_T* GetUDSSessionInfo (uint8_t Type,void* Data,int BMCInst)
-//{
-//    uint8_t Index;
-//     BMCInfo_t* pBMCInfo = &g_BMCInfo[BMCInst];
-//     UDSSessionTblInfo_T*	pUDSSessionTblInfo = &pBMCInfo->UDSSessionTblInfo;
-
-
-//    for(Index=0;Index<pBMCInfo->IpmiConfig.MaxSession;Index++)
-//    {
-
-//        if(FALSE == pUDSSessionTblInfo->UDSSessionTbl[Index].Activated)
-//        {
-//            continue;
-//        }
-
-//        switch(Type)
-//        {
-//            case UDS_SESSION_ID_INFO:
-//                if(*((uint32_t *)Data) == pUDSSessionTblInfo->UDSSessionTbl[Index].SessionID)
-//                {
-//                     return &pUDSSessionTblInfo->UDSSessionTbl[Index];
-//                }
-//                break;
-//             case UDS_SESSION_HANDLE_INFO:
-//                if(*((uint8_t *)Data) == pUDSSessionTblInfo->UDSSessionTbl[Index].LoggedInSessionHandle)
-//                {
-//                     return &pUDSSessionTblInfo->UDSSessionTbl[Index];
-//                }
-//                break;
-//             case UDS_SESSION_INDEX_INFO:
-//                if((*((uint8_t *)Data) < pBMCInfo->IpmiConfig.MaxSession) && ((Index) == *((uint8_t *)Data )))
-//                {
-//                    return &pUDSSessionTblInfo->UDSSessionTbl[Index];
-//                }
-//                break;
-//             case UDS_SOCKET_ID_INFO:
-//                if(*((int *)Data) == pUDSSessionTblInfo->UDSSessionTbl[Index].UDSSocket)
-//                {
-//                     return &pUDSSessionTblInfo->UDSSessionTbl[Index];
-//                }
-//                break;
-
-//            default:
-//                break;
-//        }
-//    }
-
-//    return NULL;
-//}
-
-///*********************************************************************************************
-//    Name	:	AddUDSSession
-//    Input	:	pUDSSessionInfo - session information
-//    Output	:	return 0 on success ,-1 on failure
-
-//This program adds the session to the UDS session table
-//*********************************************************************************************/
-//int AddUDSSession ( UDSSessionTbl_T* pUDSSessionInfo, int BMCInst)
-//{
-
-//    uint8_t Index;
-//     BMCInfo_t* pBMCInfo = &g_BMCInfo[BMCInst];
-//     UDSSessionTblInfo_T*	pUDSSessionTblInfo = &pBMCInfo->UDSSessionTblInfo;
-
-//    /* Acquire the UDS Session Mutex Lock */
-//    OS_THREAD_MUTEX_ACQUIRE(&pBMCInfo->UDSSessionTblMutex, WAIT_INFINITE);
+   return;
+}
 
-//    for (Index = 0; Index < pBMCInfo->IpmiConfig.MaxSession; Index++)
-//    {
-//            if(TRUE == pUDSSessionTblInfo->UDSSessionTbl[Index].Activated)
-//            {
-//                 /* Continue Inorder to get the next Free Slot in UDS Session Table */
-//                 continue;
-//            }
 
-//            /* Copy the Session Information to Global BMC Info UDS Session Table */
-//            _fmemcpy (&pUDSSessionTblInfo->UDSSessionTbl[Index], ( uint8_t*)pUDSSessionInfo, sizeof (UDSSessionTbl_T));
-//            pUDSSessionTblInfo->SessionCount++;
-//            pUDSSessionTblInfo->UDSSessionTbl[Index].LoggedInTime = GetTimeStamp ();
-//            pUDSSessionTblInfo->UDSSessionTbl[Index].SessionTimeoutValue = pBMCInfo->IpmiConfig.SessionTimeOut;
-//            break;
-//    }
 
-//        /* Release the UDS Session Mutex Lock */
-//    OS_THREAD_MUTEX_RELEASE(&pBMCInfo->UDSSessionTblMutex);
+/*********************************************************************************************
+   Name	:	UDSSessionTimeOutTask
+   Input	:	void
+   Output	:	void
+       This program  checks for UDS session timeout
+*********************************************************************************************/
+void UDSSessionTimerTask (void)
+{
+   uint8_t Index=0;
+   UDSSessionTblInfo_T *pUDSSessionTblInfo = &g_BMCInfo.UDSSessionTblInfo;
+
+   printf("-> UDSSessionTimerTask\n");
+   for(Index=0;Index<g_BMCInfo.IpmiConfig.MaxSession;Index++)
+  {
+       if(FALSE == pUDSSessionTblInfo->UDSSessionTbl[Index].Activated)
+       {
+          /* Continue until we find the Next Slot which is being used to reduce the timeout */
+           continue;
+       }
+
+       if((pUDSSessionTblInfo->UDSSessionTbl[Index].SessionTimeoutValue <= g_BMCInfo.IpmiConfig.SessionTimeOut) && (pUDSSessionTblInfo->UDSSessionTbl[Index].SessionTimeoutValue != 0))
+       {
+          /* Reduce the Session Timeout Value if the session is not used */
+           pUDSSessionTblInfo->UDSSessionTbl[Index].SessionTimeoutValue--;
+       }
+       else if(pUDSSessionTblInfo->UDSSessionTbl[Index].SessionTimeoutValue <= 0)
+       {
+           DeleteUDSSession(&pUDSSessionTblInfo->UDSSessionTbl[Index]);
+       }
+  }
+}
 
-//    if(Index == pBMCInfo->IpmiConfig.MaxSession)
-//    {
-//        IPMI_WARNING("Add Session Failed for UDS\n");
-//        return -1;
-//    }
 
-//    return 0;
-//}
 
-///*********************************************************************************************
-//    Name	:	DeleteUDSSession
-//    Input	:	pUDSSessionInfo - session information
-//    Output	:	return 0 on success,-1 on failure
+/*********************************************************************************************
+   Name	:	GetUDSSessionInfo
+   Input	:	Session - session ID
+   Output	:	Session Information
 
-//This program deletes the session from the UDS session table
-//*********************************************************************************************/
-//int DeleteUDSSession( UDSSessionTbl_T *pUDSSessionInfo,int BMCInst)
-//{
-//    uint8_t Index;
-//     BMCInfo_t* pBMCInfo = &g_BMCInfo[BMCInst];
-//     UDSSessionTblInfo_T*	pUDSSessionTblInfo = &pBMCInfo->UDSSessionTblInfo;
+This program  returns the session information.
+*********************************************************************************************/
+UDSSessionTbl_T* GetUDSSessionInfo (uint8_t Type,void* Data )
+{
+   uint8_t Index;
+    UDSSessionTblInfo_T*	pUDSSessionTblInfo = &g_BMCInfo.UDSSessionTblInfo;
+
+
+   for(Index=0;Index<g_BMCInfo.IpmiConfig.MaxSession;Index++)
+   {
+
+       if(FALSE == pUDSSessionTblInfo->UDSSessionTbl[Index].Activated)
+       {
+           continue;
+       }
+
+       switch(Type)
+       {
+           case UDS_SESSION_ID_INFO:
+               if(*((uint32_t *)Data) == pUDSSessionTblInfo->UDSSessionTbl[Index].SessionID)
+               {
+                    return &pUDSSessionTblInfo->UDSSessionTbl[Index];
+               }
+               break;
+            case UDS_SESSION_HANDLE_INFO:
+               if(*((uint8_t *)Data) == pUDSSessionTblInfo->UDSSessionTbl[Index].LoggedInSessionHandle)
+               {
+                    return &pUDSSessionTblInfo->UDSSessionTbl[Index];
+               }
+               break;
+            case UDS_SESSION_INDEX_INFO:
+               if((*((uint8_t *)Data) < g_BMCInfo.IpmiConfig.MaxSession) && ((Index) == *((uint8_t *)Data )))
+               {
+                   return &pUDSSessionTblInfo->UDSSessionTbl[Index];
+               }
+               break;
+            case UDS_SOCKET_ID_INFO:
+               if(*((int *)Data) == pUDSSessionTblInfo->UDSSessionTbl[Index].UDSSocket)
+               {
+                    return &pUDSSessionTblInfo->UDSSessionTbl[Index];
+               }
+               break;
+
+           default:
+               break;
+       }
+   }
+
+   return NULL;
+}
 
-//    /* Acquire the UDS Session Mutex Lock */
-//    OS_THREAD_MUTEX_ACQUIRE(&pBMCInfo->UDSSessionTblMutex, WAIT_INFINITE);
+/*********************************************************************************************
+   Name	:	AddUDSSession
+   Input	:	pUDSSessionInfo - session information
+   Output	:	return 0 on success ,-1 on failure
 
-//    for(Index=0;Index<pBMCInfo->IpmiConfig.MaxSession;Index++)
-//    {
-//        if(FALSE == pUDSSessionTblInfo->UDSSessionTbl[Index].Activated)
-//        {
-//            /* Continue to get the Next Occupied Session Slot in UDS Session Slot*/
-//            continue;
-//        }
+This program adds the session to the UDS session table
+*********************************************************************************************/
+int AddUDSSession ( UDSSessionTbl_T* pUDSSessionInfo)
+{
 
-//        if (0 == _fmemcmp (&pUDSSessionTblInfo->UDSSessionTbl[Index], pUDSSessionInfo , sizeof(UDSSessionTbl_T)))
-//        {
-//             /* Resetting the UDS Session Table Slot as the session is no longer required */
-//             pUDSSessionTblInfo->UDSSessionTbl[Index].Activated = FALSE;
-//             pUDSSessionTblInfo->UDSSessionTbl[Index].LoggedInTime = 0xFFFFFFFF;
-//             pUDSSessionTblInfo->UDSSessionTbl[Index].SessionTimeoutValue = 0;
-//             pUDSSessionTblInfo->UDSSessionTbl[Index].LoggedInUserID =  0;
-//             pUDSSessionTblInfo->UDSSessionTbl[Index].LoggedInChannel = 0xFF;
-//             pUDSSessionTblInfo->UDSSessionTbl[Index].LoggedInPrivilege = 0xFF;
-//             pUDSSessionTblInfo->SessionCount--;
-//             break;
-//        }
-//    }
+   uint8_t Index;
+    UDSSessionTblInfo_T*	pUDSSessionTblInfo = &g_BMCInfo.UDSSessionTblInfo;
 
-//    /* Release the UDS Session Mutex Lock */
-//    OS_THREAD_MUTEX_RELEASE(&pBMCInfo->UDSSessionTblMutex);
+   for (Index = 0; Index < g_BMCInfo.IpmiConfig.MaxSession; Index++)
+   {
+           if(TRUE == pUDSSessionTblInfo->UDSSessionTbl[Index].Activated)
+           {
+                /* Continue Inorder to get the next Free Slot in UDS Session Table */
+                continue;
+           }
+
+           /* Copy the Session Information to Global BMC Info UDS Session Table */
+           memcpy (&pUDSSessionTblInfo->UDSSessionTbl[Index], ( uint8_t*)pUDSSessionInfo, sizeof (UDSSessionTbl_T));
+           pUDSSessionTblInfo->SessionCount++;
+           pUDSSessionTblInfo->UDSSessionTbl[Index].LoggedInTime = GetTimeStamp ();
+           pUDSSessionTblInfo->UDSSessionTbl[Index].SessionTimeoutValue = g_BMCInfo.IpmiConfig.SessionTimeOut;
+           break;
+   }
+
+   if(Index == g_BMCInfo.IpmiConfig.MaxSession)
+   {
+       printf("Add Session Failed for UDS\n");
+       return -1;
+   }
+
+   return 0;
+}
 
-//    if(Index == pBMCInfo->IpmiConfig.MaxSession)
-//    {
-//        IPMI_WARNING("Delete Session Failed for UDS\n");
-//        return -1;
-//    }
+/*********************************************************************************************
+   Name	:	DeleteUDSSession
+   Input	:	pUDSSessionInfo - session information
+   Output	:	return 0 on success,-1 on failure
 
-//    return 0;
-//}
+This program deletes the session from the UDS session table
+*********************************************************************************************/
+int DeleteUDSSession( UDSSessionTbl_T *pUDSSessionInfo )
+{
+   uint8_t Index;
+    UDSSessionTblInfo_T*	pUDSSessionTblInfo = &g_BMCInfo.UDSSessionTblInfo;
+
+   for(Index=0;Index<g_BMCInfo.IpmiConfig.MaxSession;Index++)
+   {
+       if(FALSE == pUDSSessionTblInfo->UDSSessionTbl[Index].Activated)
+       {
+           /* Continue to get the Next Occupied Session Slot in UDS Session Slot*/
+           continue;
+       }
+
+       if (0 == memcmp (&pUDSSessionTblInfo->UDSSessionTbl[Index], pUDSSessionInfo , sizeof(UDSSessionTbl_T)))
+       {
+            /* Resetting the UDS Session Table Slot as the session is no longer required */
+            pUDSSessionTblInfo->UDSSessionTbl[Index].Activated = FALSE;
+            pUDSSessionTblInfo->UDSSessionTbl[Index].LoggedInTime = 0xFFFFFFFF;
+            pUDSSessionTblInfo->UDSSessionTbl[Index].SessionTimeoutValue = 0;
+            pUDSSessionTblInfo->UDSSessionTbl[Index].LoggedInUserID =  0;
+            pUDSSessionTblInfo->UDSSessionTbl[Index].LoggedInChannel = 0xFF;
+            pUDSSessionTblInfo->UDSSessionTbl[Index].LoggedInPrivilege = 0xFF;
+            pUDSSessionTblInfo->SessionCount--;
+            break;
+       }
+   }
+
+   if(Index == g_BMCInfo.IpmiConfig.MaxSession)
+   {
+       printf("Delete Session Failed for UDS\n");
+       return -1;
+   }
+
+   return 0;
+}
 
 ///*---------------------------------------------------
 // * @fn UpdateGetMsgTime

+ 41 - 41
app/bmc/Session.h

@@ -104,22 +104,22 @@ typedef struct
 {
     uint8_t			Used; /* Flag to indicate the slot used or not */
     uint32_t		SessionID;
-//    uint8_t			Activated;
+    uint8_t			Activated;
     uint8_t			Channel;
     uint8_t			AuthType;
     uint8_t			Privilege;
-//     uint8_t			MaxPrivilege;
-//     uint32_t			InboundSeq;
-//     uint32_t			OutboundSeq;
-//     uint32_t			TimeOutValue;
-//     uint8_t			Password[MAX_PASSWORD_LEN];
-//     uint8_t			UserId;
-//     uint8_t			SessionHandle;
+    uint8_t			MaxPrivilege;
+    uint32_t			InboundSeq;
+    uint32_t			OutboundSeq;
+    uint32_t			TimeOutValue;
+    uint8_t			Password[MAX_PASSWORD_LEN];
+    uint8_t			UserId;
+    uint8_t			SessionHandle;
 //     uint8_t			ChallengeString[CHALLENGE_STR_LEN];
 //     LANRMCPPkt_T	LANRMCPPkt;
 //     int			hSocket;
 //     BOOL			SerialModemMode;
-//     uint32_t 			Time;
+    uint32_t 			Time;
 // #if (IPMI20_SUPPORT == 1)
 //     uint8_t				Lookup;
 //     uint32_t				RemConSessionID;
@@ -135,10 +135,10 @@ typedef struct
 //     uint32_t                   InitialInboundSeq;
 //     uint32_t                   InboundTrac[SIXTEEN_COUNT_WINDOW_LEN];
 //     uint16_t                   InboundRecv;
-//     uint8_t 			IsLoopBack;
-//     uint8_t                    Linkstat;
-//     uint8_t 			EventFlag;
-//    uint8_t                       UserName[MAX_USERNAME_LEN];
+    uint8_t 			IsLoopBack;
+    uint8_t       Linkstat;
+    uint8_t 			EventFlag;
+    uint8_t                       UserName[MAX_USERNAME_LEN];
 } SessionInfo_T;
 
 /* SessionTblInfo_T */
@@ -168,32 +168,32 @@ typedef enum
 // /*--------------------------
 //  * Extern Declarations
 //  *--------------------------*/
-// extern		 void				SessionTimerTask (int BMCInst);
-// extern  ChannelInfo_T*  getChannelInfo (uint8_t ch,int BMCInst);
+extern		 void				SessionTimerTask (void);
+// extern  ChannelInfo_T*  getChannelInfo (uint8_t ch );
 // extern _FAR_ ChannelUserInfo_T* getChUserIdInfo (uint8_t userId, _NEAR_ uint8_t *index, _FAR_ ChannelUserInfo_T* pChUserInfo, int BMCInst);
-// extern _FAR_ SessionInfo_T*		getSessionInfo (uint8_t Arg, _FAR_ void *Session, int BMCInst);
+extern SessionInfo_T*		getSessionInfo (uint8_t Arg, void *Session);
 // extern _FAR_ ChannelUserInfo_T* getChUserPrivInfo (_NEAR_ char *userName, _NEAR_ uint8_t Role, _NEAR_ uint8_t* chIndex, _FAR_ ChannelUserInfo_T *pChUserInfo, int BMCInst);
 // extern _FAR_ ChannelUserInfo_T*	getChUserInfo (_NEAR_ char *userName, _NEAR_ uint8_t* chIndex, _FAR_ ChannelUserInfo_T *pChUserInfo, int BMCInst);
 extern int UpdateUserInfoTable(void);
 extern UserInfo_T*		getUserIdInfo (uint8_t userId);
 extern  UserInfo_T* getUserNameInfo (uint8_t *UserName);
 extern uint8_t	CheckForDuplicateUsers (uint8_t* UserName);
-// extern _FAR_ ChannelUserInfo_T*	AddChUser (_FAR_ ChannelUserInfo_T*	pChUserInfo, _NEAR_ uint8_t*	Index,int BMCInst);
+// extern _FAR_ ChannelUserInfo_T*	AddChUser (_FAR_ ChannelUserInfo_T*	pChUserInfo, _NEAR_ uint8_t*	Index );
 // extern _FAR_ ChannelInfo_T* GetNVRChConfigs(ChannelInfo_T *pChannelInfo, int BMCInst);
-// extern _FAR_ ChannelUserInfo_T* GetNVRChUserConfigs(ChannelInfo_T *pChannelInfo,int BMCInst);
+// extern _FAR_ ChannelUserInfo_T* GetNVRChUserConfigs(ChannelInfo_T *pChannelInfo );
 // extern uint8_t disableUser (uint8_t UserId, int BMCInst);
-// extern uint8_t GetNumOfActiveSessions (int BMCInst);
-// extern uint8_t GetNumOfUsedSessions (int BMCInst);
-// extern void  DeleteSession (_FAR_ SessionInfo_T*	pSessionInfo,int BMCInst);
-// extern void  AddSession (_NEAR_ SessionInfo_T* pSessionInfo,int BMCInst);
-// extern uint8_t CleanSession(int BMCInst);
+extern uint8_t GetNumOfActiveSessions (void);
+extern uint8_t GetNumOfUsedSessions (void);
+extern void  DeleteSession (SessionInfo_T*	pSessionInfo );
+extern void  AddSession (SessionInfo_T* pSessionInfo );
+extern uint8_t CleanSession(void);
 // extern _FAR_ uint16_t	getPayloadActiveInst (uint8_t PayloadType, int BMCInst);
-// extern _FAR_ uint32_t	getPayloadInstInfo (uint8_t PayloadType, uint16_t PayloadInst,int BMCInst);
-// extern void	PasswordViolation (int BMCInst);
-// extern void UDSSessionTimerTask (int BMCInst);
-// extern int AddUDSSession (_NEAR_ UDSSessionTbl_T* pUDSSessionInfo, int BMCInst);
-// extern int DeleteUDSSession(_FAR_ UDSSessionTbl_T*  pUDSSessionInfo,int BMCInst);
-// extern _FAR_ UDSSessionTbl_T* GetUDSSessionInfo (uint8_t Type,void *Data,int BMCInst);
+// extern _FAR_ uint32_t	getPayloadInstInfo (uint8_t PayloadType, uint16_t PayloadInst );
+extern void	PasswordViolation (void);
+extern void UDSSessionTimerTask (void);
+extern int AddUDSSession (UDSSessionTbl_T* pUDSSessionInfo);
+extern int DeleteUDSSession(UDSSessionTbl_T*  pUDSSessionInfo );
+extern UDSSessionTbl_T* GetUDSSessionInfo (uint8_t Type,void *Data );
 // /*---------------------------------------------------
 //  * @fn UpdateGetMsgTime
 //  * @brief Updates the Current Uptime and timeout value
@@ -235,17 +235,17 @@ extern uint8_t	CheckForDuplicateUsers (uint8_t* UserName);
 
 // extern BOOL IsResponseMatch (MsgPkt_T* pReq, MsgPkt_T* pRes);
 
-// /*-------------------------------------------------------
-//  * @fn FillIPMIResFailure
-//  * @brief Frames the Response packet when the time taken 
-//  *        to process an IPMI Command expires
-//  * 
-//  * @param pReq    : Request Message Packet
-//  *        pRes    : Response Message Packet
-//  *        BMCInst : BMC Instance Number
-//  * 
-//  * @return  none
-//  *------------------------------------------------------*/
-// extern void FillIPMIResFailure (_NEAR_ MsgPkt_T* pReq, _NEAR_ MsgPkt_T* pRes, int BMCInst);
+/*-------------------------------------------------------
+ * @fn FillIPMIResFailure
+ * @brief Frames the Response packet when the time taken 
+ *        to process an IPMI Command expires
+ * 
+ * @param pReq    : Request Message Packet
+ *        pRes    : Response Message Packet
+ *        BMCInst : BMC Instance Number
+ * 
+ * @return  none
+ *------------------------------------------------------*/
+extern void FillIPMIResFailure ( MsgPkt_T* pReq, MsgPkt_T* pRes);
 
 #endif	/* SESSION_H */

+ 27 - 0
app/bmc/SysTimer/TimerTask.c

@@ -10,10 +10,13 @@
 #include <stdint.h>
 #include "main.h"
 
+static void ProcessTimerReq (void);
+
 //g_BMCInfo.CurTimerTick increment in port.c/xPortSysTickHandler().
 void *TimerTask( void *pvParameters )
 {	
 	uint32_t preTimerTick = g_BMCInfo.CurTimerTick;
+	printf("TimerTask start...\n");
 	while(1)
 	{
 		preTimerTick = g_BMCInfo.CurTimerTick;
@@ -35,11 +38,35 @@ void *TimerTask( void *pvParameters )
 			g_BMCInfo.TotalBootValidMinutes++;
 		}
 
+		//ProcessTimerReq();
+
 		sleep(1);
 	}
 }
 
 
+/**
+*@fn ProcessTimerReq
+*@brief Executes Timer task function for every one second
+*@return none
+*/
+static void ProcessTimerReq (void)
+{
+	int i;
+	// if(g_corefeatures.delayed_lan_restart_support)
+	// {
+	// 	ElapsedTime++;
+	// }
+	for (i = 0; i < g_BMCInfo.TimerTaskTblSize; i++)
+	{
+		if (0 == (g_BMCInfo.CurTimerTick % g_BMCInfo.TimerTaskTbl [i].NumSecs))
+		{
+			g_BMCInfo.TimerTaskTbl [i].TimerFn ();
+		}
+	}
+	return;
+}
+
 
 
 

BIN
app/bmc/bmc_app


BIN
app/bmc/bmc_app.gdb


+ 27 - 2
app/bmc/ipmb/IPMBIfc.c

@@ -56,6 +56,7 @@ void *IPMBIfcTask(void *Param)
     int 	fd_IpmbDev;
     int 	fd_IpmbIfcQ, fd_IpmbResQ;
     uint8_t ipmbSelect = *(uint8_t*)Param;
+    int RetVal;
     
     //printf("ipmbSelect: %d\n", ipmbSelect);
     //Primary IPMB
@@ -157,8 +158,32 @@ void *IPMBIfcTask(void *Param)
 				ProcessIPMBReq (&RcvMsgPkt);
 				break;
 			case PARAM_BRIDGE:
-				break;
-			default:
+                /* Send the response */
+                if(RcvMsgPkt.Channel == PRIMARY_IPMB_CHANNEL)
+                {
+                    RetVal = stm32_i2c_master_write(gFd_Primary, RcvMsgPkt.Data[0], &RcvMsgPkt.Data[1], RcvMsgPkt.Size);
+                }
+                else if(RcvMsgPkt.Channel == SECONDARY_IPMB_CHANNEL)
+                {
+                    RetVal = stm32_i2c_master_write(gFd_Secondary, RcvMsgPkt.Data[0], &RcvMsgPkt.Data[1], RcvMsgPkt.Size);
+                }
+                else
+                {
+                    printf("IPMBIfc.c: IPMB channel error. %#x\r\n", RcvMsgPkt.Channel);
+                }
+
+                if (RetVal < 0)
+                {
+                    printf ("IPMBIfc.c : Unable to send a IPMI Bridge Message\n");
+                    RespondSendMessage (&RcvMsgPkt, STATUS_FAIL);
+                }
+                else
+                {
+                    RespondSendMessage (&RcvMsgPkt, STATUS_OK);
+                }
+                printf("---> IPMBIfcTask/BRIDGING_REQUEST\n");
+                break;
+            default:
 				printf("Unknow message param %#x\r\n", RcvMsgPkt.Param);
 				break;
 		}

+ 1 - 0
app/bmc/lan/RMCP.c

@@ -410,6 +410,7 @@ ProcessRMCPReq( RMCPHdr_T* pRMCPReq,  RMCPHdr_T* pRMCPRes)
 		Req.NetFnLUN  = pIPMIMsgReq->NetFnLUN;
 		Req.SessionID = SessionID;
 		Req.SessionType = LAN_SESSION_TYPE;
+		Req.Channel 	= LAN_RMCP_CHANNEL;
 		
 		//UpdateGetMsgTime( &pBMCInfo->LANConfig.MsgReq,IfcType, BMCInst);
 		Req.Size = IPMIMsgLen;

+ 3 - 1
app/bmc/main.c

@@ -39,8 +39,10 @@ void main(void)
 	Init_IPMI_FRU_SDR_SEL();
 	InitSdrConfig();
 	InitSelConfig();
+	Init_SessionTbl();
+	InitTimerTaskTbl();
 
-	printf("\tChassisID %#02x, SlotID %#02x\r\n", g_BMCInfo.chassisID, g_BMCInfo.SlotID);
+	printf("\tChassisID %#02x, SlotID %#02x\r\n", g_BMCInfo.ChassisID, g_BMCInfo.SlotID);
 	if(g_BMCInfo.IpmiConfig.PrimaryIPMBSupport)
 	{
 		printf("\tPrimaryIPMBBus: %d, channel %d, Addr %#02x\n", g_BMCInfo.IpmiConfig.PrimaryIPMBBus, 

+ 50 - 11
app/bmc/main.h

@@ -14,29 +14,63 @@
 
 #include "Session.h"
 #include "sensor_tbl.h"
+#include "MsgHndlr.h"
+#include "hal_interface_api.h"
 /* Declare global variable */
 
+/*---------------------------------------------------------------------------*
+ * Interface SUPPORTED
+ *---------------------------------------------------------------------------*/
+#define LAN_IFC_SUPPORT					1
+#define SERIAL_IFC_SUPPORT				0
+#define SERIAL_TERMINAL_SUPPORT			0
+#define SYS_IFC_SUPPORT					0
+#define PRIMARY_IPMB_SUPPORT		1
+#define SECONDARY_IPMB_SUPPORT		1
+#define GROUP_EXTERN_SUPPORT		1
 
 #define SENSOR_NUMBERS				(11)
 #define FW_VERSION_MAJOR			(1)
 #define FW_VERSION_MINOR			(0)
 
-#define GROUP_EXTERN_SUPPORT		1
+
 #define PWR_CYCLE_INTERVAL			(3) 	//unit: 1s
 #define REARM_SET_SENSOR_THRESHOLD	(0)		//whether rearm sensor event when change sensor threshold
 #define CHASSIS_TIMER_INTERVAL		(1)		//1 second
 #define FAN_CONTROL_INTERVAL		(5)		//5	second 
 //IPMB
-#define PRIMARY_IPMB_SUPPORT		1
-#define SECONDARY_IPMB_SUPPORT		1
 #define PRIMARY_IPMB_BUS			2	// /dev/i2c2
 #define SECONDARY_IPMB_BUS			1	// /dev/i2c1
-#define PRIMARY_IPMB_ADDR			0x40
-#define SECONDARY_IPMB_ADDR			0x40
-
-
-
-
+#define PRIMARY_IPMB_ADDR			0x20
+#define SECONDARY_IPMB_ADDR			0x20
+
+//RACK-ID
+#define RACKID0_PORT	GPIOI
+#define RACKID1_PORT	GPIOI
+#define RACKID2_PORT	GPIOH
+#define RACKID3_PORT	GPIOI
+#define RACKID4_PORT	GPIOI
+#define RACKID5_PORT	GPIOI
+#define RACKID0_PIN		GPIO_PIN_6
+#define RACKID1_PIN		GPIO_PIN_7
+#define RACKID2_PIN		GPIO_PIN_15
+#define RACKID3_PIN		GPIO_PIN_9
+#define RACKID4_PIN		GPIO_PIN_10
+#define RACKID5_PIN		GPIO_PIN_11
+
+//SLOT-ID
+#define GA0_PORT	GPIOH
+#define GA1_PORT	GPIOH
+#define GA2_PORT	GPIOH
+#define GA3_PORT	GPIOH
+#define GA4_PORT	GPIOH
+#define GAP_PORT	GPIOI
+#define GA0_PIN		GPIO_PIN_10
+#define GA1_PIN		GPIO_PIN_11
+#define GA2_PIN		GPIO_PIN_12
+#define GA3_PIN		GPIO_PIN_13
+#define GA4_PIN		GPIO_PIN_14
+#define GAP_PIN		GPIO_PIN_5
 
 extern sensor_tbl_t 				sensor_tbl[];
 extern const OemFRUData_T 			Default_FRUData;
@@ -59,8 +93,13 @@ extern int gFd_LanIfcQ, gFd_LanResQ;
 extern int gFdUdsIfc, gFdUdsRes;
 extern int gFd_MsgHndlrIfc;
 extern int gFd_ChassisPwrHndlrQue;
-int gFd_PrimaryIpmbIfcQ, gFd_PrimaryIpmbResQ;
-int gFd_SecondaryIpmbIfcQ, gFd_SecondaryIpmbResQ;
+extern int gFd_PrimaryIpmbIfcQ, gFd_PrimaryIpmbResQ;
+extern int gFd_SecondaryIpmbIfcQ, gFd_SecondaryIpmbResQ;
+extern TLS_T g_tls;
+extern PendingBridgedResTbl_T	m_PendingBridgedResTbl[MAX_PENDING_BRIDGE_TBL][MAX_PENDING_BRIDGE_RES];
+extern PendingSeqNoTbl_T		m_PendingSeqNoTbl[16][MAX_PENDING_SEQ_NO];
+extern KCSBridgeResInfo_T       m_KCSBridgeResInfo;
+extern TimerTaskTbl_T    		m_TimerTaskTbl [20];
 
 extern BMCInfo_t 	g_BMCInfo;
 

+ 2 - 2
app/bmc/msghndlr/App/App.c

@@ -68,8 +68,8 @@ const CmdHndlrMap_T g_App_CmdHndlr [] =	//notice!
 //    { CMD_CLR_MSG_FLAGS,            PRIV_LOCAL,   CLR_MSG_FLAGS,          sizeof (uint8_t),                 0xAAAA ,0xFFFF},
 //    { CMD_GET_MSG_FLAGS,            PRIV_LOCAL,   GET_MSG_FLAGS,          0x00,                           0xAAAA ,0xFFFF},
 //    { CMD_ENBL_MSG_CH_RCV,          PRIV_LOCAL,   ENBL_MSG_CH_RCV,        sizeof (EnblMsgChRcvReq_T),     0xAAAA ,0xFFFF},
-//    { CMD_GET_MSG,                  PRIV_LOCAL,      GET_MSG,                0x00,                           0xAAAA ,0xFFFF},
-//    { CMD_SEND_MSG,                 PRIV_USER,      SEND_MSG,               0xFF,                           0xAAAA ,0xFFFF},
+    { CMD_GET_MSG,                  PRIV_LOCAL,      GET_MSG,                0x00,                           0xAAAA ,0xFFFF},
+    { CMD_SEND_MSG,                 PRIV_USER,      SEND_MSG,               0xFF,                           0xAAAA ,0xFFFF},
 //    { CMD_READ_EVT_MSG_BUFFER,      PRIV_LOCAL,     READ_EVT_MSG_BUFFER,    0x00,                           0xAAAA ,0xFFFF},
 //    { CMD_GET_BTIFC_CAP,            PRIV_USER,      GET_BTIFC_CAP,          0x00,                           0xAAAA ,0xFFFF},
 //    { CMD_GET_SYSTEM_GUID,          PRIV_NONE,      GET_SYSTEM_GUID,        0x00,                           0xAAAA ,0xFFFF},

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 471 - 517
app/bmc/msghndlr/App/AppDevice/AppDevice.c


+ 9 - 9
app/bmc/msghndlr/MsgHndlr.h

@@ -141,7 +141,7 @@ typedef struct
     uint8_t               DstSessionHandle;
     uint8_t               SrcSessionHandle;
     uint32_t              SrcSessionID;
-    uint8_t               DestQ[PIPE_NAME_LEN];
+    int                   DestQ;
     uint8_t               OriginSrc;
     IPMIMsgHdr_T        ReqMsgHdr;
     ResMsgHdr_T         ResMsgHdr;
@@ -186,19 +186,19 @@ typedef struct
 {
     uint8_t    NetFnLUN;
     uint32_t   SessionID;
-    uint8_t    SrcQ [PIPE_NAME_LEN];
+    int    SrcQ ;
 }   KCSBridgeResInfo_T;
 
 #pragma pack( )
 
-// /*------------------ Timer Task Table --------------------------*/
-// typedef void (*pTimerFn_T) ();
-// typedef struct
-// {
-//     uint8_t           NumSecs;
-//     pTimerFn_T      TimerFn;
+/*------------------ Timer Task Table --------------------------*/
+typedef void (*pTimerFn_T) (void);
+typedef struct
+{
+    uint8_t           NumSecs;
+    pTimerFn_T      TimerFn;
 
-// } TimerTaskTbl_T;
+} TimerTaskTbl_T;
 
 /*-----------------------------------------------------------
  * Bridge Status

+ 364 - 299
app/bmc/msghndlr/MsgHndlrTask.c

@@ -35,6 +35,8 @@
 #include "main.h"
 
 static void ProcessIPMIReq (MsgPkt_T* pReq, MsgPkt_T* pRes);
+static void PendingBridgeResTimerTask (void);
+static void PendingSeqNoTimerTask (void);
 
 
 MsgHndlrTbl_T m_MsgHndlrTbl [] =	//notice!
@@ -55,10 +57,37 @@ GroupExtnMsgHndlrTbl_T m_GroupExtnMsgHndlrTbl [] =		//jimbo add
 	{0,		0},
 };
 
-//PendingBridgedResTbl_T	m_PendingBridgedResTbl[MAX_PENDING_BRIDGE_RES];
 
+TimerTaskTbl_T    m_TimerTaskTbl [20] =
+{
+//	{ 1,    PEFTimerTask	},
+//	{ 1,    PETAckTimerTask },
+//	{ 1,    PEFStartDlyTimerTask },
+	{ 1,    SessionTimerTask },
+	{ 1,    PendingBridgeResTimerTask },
+	{ 1,    PendingSeqNoTimerTask },
+//	{ 1,    FlashTimerTask },
+
+//	#if FRB_SUPPORT == 1
+//	{ 1,    FRB3TimerTask   },
+//	#endif /* #if FRB_SUPPORT == 1 */
+//
+//	#if SERIAL_MODEM_CONNECTION_ACTIVITY  != UNIMPLEMENTED
+//	{ 2,    SerialModemPingTask },
+//	#endif /* SERIAL_MODEM_CONNECTION_ACTIVITY */
+//
+//	{ 1,    MonitorPassword },
+	{ 1,    UDSSessionTimerTask },
+
+};
+
+//PendingBridgedResTbl_T	m_PendingBridgedResTbl[MAX_PENDING_BRIDGE_RES];
 
+PendingBridgedResTbl_T	m_PendingBridgedResTbl[MAX_PENDING_BRIDGE_TBL][MAX_PENDING_BRIDGE_RES];
+PendingSeqNoTbl_T	m_PendingSeqNoTbl[16][MAX_PENDING_SEQ_NO];
+KCSBridgeResInfo_T       m_KCSBridgeResInfo;
 int gFd_MsgHndlrIfc;
+TLS_T g_tls;
 /*!
     \brief      Message handler Task. Process all standard and oem ipmi message form interface, and send response back.
     \param[in]  none
@@ -69,7 +98,8 @@ void *MsgHndlrTask( void *pArg )
 {
 	MsgPkt_T reqMsgPkt;
 	MsgPkt_T resMsgPkt;
-	
+	uint8_t channelinit = 0xF;
+
 	printf("MsgHndlrTask start...\r\n");
 
 	prctl(PR_SET_NAME,__FUNCTION__,0,0,0);
@@ -91,14 +121,28 @@ void *MsgHndlrTask( void *pArg )
         return (void*)-1;
     }
 	
+	pthread_key_create(&g_tls.CurSessionID,NULL);
+	pthread_key_create(&g_tls.CurPrivLevel,NULL);
+	pthread_key_create(&g_tls.CurChannel,NULL);
+	pthread_key_create(&g_tls.CurKCSIfcNum,NULL);
+	pthread_key_create(&g_tls.CurSessionType,NULL);
+	pthread_key_create(&g_tls.OwnerLUN,NULL);
+
+	pthread_setspecific(g_tls.CurChannel,&channelinit);
 	while(1)
 	{
 		while(GetMsg(gFd_MsgHndlrIfc, &reqMsgPkt, WAIT_INFINITE) != 0);
-		// printf("MsgHndlrTask get message: \n");
-		// int i;
-		// for(i=0;i<reqMsgPkt.Size;i++)
-		// 	printf("%#x ", reqMsgPkt.Data[i]);
-		// printf("\n");
+		printf("Mrx: ");
+		int i;
+		for(i=0;i<reqMsgPkt.Size;i++)
+			printf("%#x ", reqMsgPkt.Data[i]);
+		printf("\n");
+
+		pthread_setspecific(g_tls.CurChannel,&reqMsgPkt.Channel);
+		pthread_setspecific(g_tls.CurPrivLevel,&reqMsgPkt.Privilege);
+		pthread_setspecific(g_tls.CurSessionID,&reqMsgPkt.SessionID);
+		pthread_setspecific(g_tls.CurSessionType,&reqMsgPkt.SessionType);
+		pthread_setspecific(g_tls.OwnerLUN,&reqMsgPkt.NetFnLUN);
 
 		ProcessIPMIReq(&reqMsgPkt, &resMsgPkt);
 		
@@ -107,10 +151,10 @@ void *MsgHndlrTask( void *pArg )
 		
 		//send response pkt to source queue.
 		PostMsg(resMsgPkt.SrcQ, &resMsgPkt);
-		// printf("MsgHndlrTask post message to socket %d:\n", resMsgPkt.SrcQ);
-		// for(i=0;i<reqMsgPkt.Size;i++)
-		// 	printf("%#x ", reqMsgPkt.Data[i]);
-		// printf("\n");
+		printf("Mtx: ");
+		for(i=0;i<reqMsgPkt.Size;i++)
+			printf("%#x ", reqMsgPkt.Data[i]);
+		printf("\n");
 	}
 }
 
@@ -128,7 +172,7 @@ ProcessIPMIReq (MsgPkt_T* pReq, MsgPkt_T* pRes)
 	uint32_t            HdrOffset = 0;
 	uint8_t				CmdOverride = 1;
 	int8_t 				MsgHndlrMapGot=0;
-	BMCInfo_t*			pBMCInfo = &g_BMCInfo;
+	uint8_t              PBTbl = PRIMARY_PB_TBL;
 	
 //	msgHndlr_dbg_printf ("Processing IPMI Packet.\r\n");
 
@@ -159,8 +203,7 @@ ProcessIPMIReq (MsgPkt_T* pReq, MsgPkt_T* pRes)
 	if(MsgHndlrMapGot == 0)
 	{
 		CmdOverride = GetCmdHndlr(pReq,pRes,pCmdHndlrMap,HdrOffset,CmdOverride,&pCmdHndlrMap);
-	}
-	
+	}	
 	//get standard ipmi command map
 	if((CmdOverride == 0 || MsgHndlrMapGot == -1) )	//OEM commands have no command map.
     {
@@ -208,49 +251,50 @@ ProcessIPMIReq (MsgPkt_T* pReq, MsgPkt_T* pRes)
 	
 	pRes->Size 	= 	pCmdHndlrMap->CmdHndlr (&pReq->Data [HdrOffset], pReq->Size, &pRes->Data [HdrOffset]) + HdrOffset + 1;
 	
-	//Patch for sensor Owner ID not equal IPMB address bug.
-	if((NET_FN(pReq->NetFnLUN) == NETFN_STORAGE) && (pReq->Cmd == CMD_GET_SDR) 
-		&& (((GetSDRReq_T*)&pReq->Data[6])->Offset == 5) && (pRes->Data [HdrOffset] == CC_NORMAL))
+	// //Patch for sensor Owner ID not equal IPMB address bug.
+	// if((NET_FN(pReq->NetFnLUN) == NETFN_STORAGE) && (pReq->Cmd == CMD_GET_SDR) 
+	// 	&& (((GetSDRReq_T*)&pReq->Data[6])->Offset == 5) && (pRes->Data [HdrOffset] == CC_NORMAL))
+	// {
+	// 	pRes->Data [HdrOffset+3] = ((IPMIMsgHdr_T*)(pReq->Data))->ResAddr;	//modify sensor owner id
+	// }
+	
+	//send message command
+	if( (CMD_SEND_MSG == pReq->Cmd) && (NETFN_APP == pReq->NetFnLUN >> 2))
 	{
-		pRes->Data [HdrOffset+3] = ((IPMIMsgHdr_T*)(pReq->Data))->ResAddr;	//modify sensor owner id
+		int Offset = 0;
+		uint8_t SeqNum = g_BMCInfo.SendMsgSeqNum;
+		if ((0 == pRes->Size) &&
+			((g_BMCInfo.IpmiConfig.PrimaryIPMBSupport == 0x01  && PRIMARY_IPMB_CHANNEL == pRes->Channel) || 
+			 (g_BMCInfo.IpmiConfig.SecondaryIPMBSupport == 0x01 && SECONDARY_IPMB_CHANNEL == pRes->Channel)) )
+		{
+			pRes->Param = PARAM_NO_RESPONSE;
+			Offset = HdrOffset + 2;
+		}
+		else if (HdrOffset == pRes->Size)
+		{
+			Offset = HdrOffset + 1;
+		}
+
+	    PBTbl = ( ((pReq->Data[sizeof (IPMIMsgHdr_T)] & 0x0F) == SECONDARY_IPMB_CHANNEL) ? SECONDARY_PB_TBL : PRIMARY_PB_TBL );
+		while(TRUE)
+		{ 
+			if ( (TRUE == m_PendingBridgedResTbl[PBTbl][SeqNum].Used) &&
+				(0 == memcmp (&m_PendingBridgedResTbl[PBTbl][SeqNum].ReqMsgHdr, &pReq->Data[Offset], sizeof (IPMIMsgHdr_T))) )
+			{
+				 memcpy (&m_PendingBridgedResTbl[PBTbl][SeqNum].ResMsgHdr, pRes->Data, sizeof (IPMIMsgHdr_T));
+				 break;    
+			}
+			else
+			{
+				SeqNum = (SeqNum - 1) & 0x3F;
+				if(SeqNum == g_BMCInfo.SendMsgSeqNum)
+				{
+					break; 
+				}
+			}
+		}
 	}
 	
-//	//send message command
-//	if( (CMD_SEND_MSG == pReq->Cmd) && (NETFN_APP == pReq->NetFnLUN >> 2))
-//	{
-//		int Offset = 0;
-//		uint8_t SeqNum = pBMCInfo->SendMsgSeqNum;
-//		if ((0 == pRes->Size) &&
-//			((pBMCInfo->IpmiConfig.PrimaryIPMBSupport == 0x01  && pBMCInfo->PrimaryIPMBCh == pRes->Channel) || 
-//			 (pBMCInfo->IpmiConfig.SecondaryIPMBSupport == 0x01 && pBMCInfo->SecondaryIPMBCh == pRes->Channel)) )
-//		{
-//			pRes->Param = PARAM_NO_RESPONSE;
-//			Offset = HdrOffset + 2;
-//		}
-//		else if (HdrOffset == pRes->Size)
-//		{
-//			Offset = HdrOffset + 1;
-//		}
-//	   
-//		while(TRUE)
-//		{ 
-//			if ( (TRUE == m_PendingBridgedResTbl[SeqNum].Used) &&
-//				(0 == memcmp (&m_PendingBridgedResTbl[SeqNum].ReqMsgHdr, &pReq->Data[Offset], sizeof (IPMIMsgHdr_T))) )
-//			{
-//				 memcpy (&m_PendingBridgedResTbl[SeqNum].ResMsgHdr, pRes->Data, sizeof (IPMIMsgHdr_T));
-//				 break;    
-//			}
-//			else
-//			{
-//				SeqNum = (SeqNum - 1) & 0x3F;
-//				if(SeqNum == pBMCInfo->SendMsgSeqNum)
-//				{
-//					break; 
-//				}
-//			}
-//		}
-//	}
-	
 	return;
 }
 
@@ -398,254 +442,275 @@ GroupExtnGetMsgHndlrMap (uint8_t NetFn, uint8_t GroupExtnCode, CmdHndlrMap_T **
  *-----------------------------------------------------------------*/
 void RespondSendMessage ( MsgPkt_T* pReq, uint8_t Status)
 {
-//	uint8_t PBTbl = PRIMARY_PB_TBL;
-//	BMCInfo_t* pBMCInfo = &g_BMCInfo;
-
-//	MsgPkt_T   ResPkt;
-//	IPMIMsgHdr_T*  pIPMIResHdr = (_NEAR_ IPMIMsgHdr_T*)ResPkt.Data;
-//	IPMIMsgHdr_T*  pIPMIReqHdr = (_NEAR_ IPMIMsgHdr_T*)pReq->Data;
-//	uint8_t SeqNum = NET_FN(pIPMIReqHdr->RqSeqLUN);
-//	
-//   /* Check for pending responses */
-
-//	if ( (TRUE == m_PendingBridgedResTbl[SeqNum].Used) &&
-//		 (NET_FN(pIPMIReqHdr->RqSeqLUN)  == SeqNum) &&
-//		 (NET_FN(pIPMIReqHdr->NetFnLUN)  == NET_FN(m_PendingBridgedResTbl[SeqNum].ReqMsgHdr.NetFnLUN )) &&
-//		 (pIPMIReqHdr->Cmd               == m_PendingBridgedResTbl[SeqNum].ReqMsgHdr.Cmd) &&
-//		 (pIPMIReqHdr->ResAddr           == m_PendingBridgedResTbl[SeqNum].ReqMsgHdr.ResAddr)  )
-//	{
-//		
-//		memcpy (pIPMIResHdr, &m_PendingBridgedResTbl[SeqNum].ResMsgHdr.IPMIMsgHdr, sizeof (IPMIMsgHdr_T));
-//		 
-//			
-//		 if (STATUS_OK == Status)
-//		 {
-//			if ( (0 == strcmp ((char *)m_PendingBridgedResTbl[SeqNum].DestQ, PrimaryIPMBQueueName)) ||
-//				 (0 == strcmp ((char *)m_PendingBridgedResTbl[SeqNum].DestQ, SecondaryIPMBQueueName)) ||
-//				 (ORIGIN_SENDMSG != m_PendingBridgedResTbl[SeqNum].OriginSrc) )
-//			{    
-//				 return;
-//			}
-//				
-//			ResPkt.Data [sizeof(IPMIMsgHdr_T)] = CC_NORMAL;
-//		 }
-//		 else if (STATUS_FAIL == Status)
-//		 {
-//			ResPkt.Data [sizeof(IPMIMsgHdr_T)] = CC_NO_ACK_FROM_SLAVE;
-//		 }
-//		 else
-//		 {
-//			ResPkt.Data [sizeof(IPMIMsgHdr_T)] = CC_UNSPECIFIED_ERR;
-//		 }
-
-//		 ResPkt.Size = sizeof (IPMIMsgHdr_T) + 1 + 1; // IPMI Header + Completion Code + Second Checksum
-//		 ResPkt.Cmd = pIPMIResHdr->Cmd;
-//		 ResPkt.NetFnLUN = pIPMIReqHdr->NetFnLUN;
-//		 ResPkt.Channel = pReq->Channel;
-
-//		 /* Calculate the Second CheckSum */
-//		 ResPkt.Data[ResPkt.Size - 1] = CalculateCheckSum2 (ResPkt.Data, ResPkt.Size-1);
-
-//		 ResPkt.Param = BRIDGING_REQUEST;
-
-//		 if (0 == strcmp ((char *)m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ, LANQueueName))
-//		 {
-//			 strcpy (QueueName, LAN_RES_Q);
-//		 }
-//		 else if (0 == strcmp ((char *)m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ, SerialQueueName))
-//		 {
-//			 //ResPkt.SessionID = m_PendingBridgedResTbl[i].ResMsgHdr.RqSeqLUN;
-//			 strcpy (QueueName, SERIAL_RES_Q);
-//		 }
-//		 else if ( (0 == strcmp ((char *)m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ, PrimaryIPMBQueueName)) ||
-//				   (0 == strcmp ((char *)m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ, SecondaryIPMBQueueName)) )
-//		 {
-//			 strcpy (QueueName, (char *)m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ);
-//		 }
-//		 else
-//		 {
-//			 /* PDK Hook to format Pending Bridge Response Packet for other destinations */
-//			 if(g_PDKHandle[PDK_FORMATBRIDGERESPKT] != NULL)
-//			 {
-//				  SwapIPMIMsgHdr ( pIPMIReqHdr, pIPMIResHdr);
-//				  
-//				  ( (void (*)(MsgPkt_T *, int) ) g_PDKHandle[PDK_FORMATBRIDGERESPKT]) ( &ResPkt, BMCInst);
-//			 }     
-//		   
-//			 strcpy (QueueName, (char *)m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ);
-//		 }
-
-//		 if (STATUS_OK != Status)
-//		 {
-//			 m_PendingBridgedResTbl[PBTbl][SeqNum].Used = FALSE;
-//		 }
-//		 
-//		 /* Post the data to Destination Interface queue */
-//		 PostMsg (&ResPkt, QueueName, BMCInst);
-
-//	}
+	uint8_t PBTbl = PRIMARY_PB_TBL;
+
+	MsgPkt_T   ResPkt;
+	IPMIMsgHdr_T*  pIPMIResHdr = ( IPMIMsgHdr_T*)ResPkt.Data;
+	IPMIMsgHdr_T*  pIPMIReqHdr = ( IPMIMsgHdr_T*)pReq->Data;
+	uint8_t SeqNum = NET_FN(pIPMIReqHdr->RqSeqLUN);
+	int QueueFd;
+	
+  /* Check for pending responses */
+	PBTbl = ( (pReq->Channel == SECONDARY_IPMB_CHANNEL) ? SECONDARY_PB_TBL : PRIMARY_PB_TBL );
+	if ( (TRUE == m_PendingBridgedResTbl[PBTbl][SeqNum].Used) &&
+		 (NET_FN(pIPMIReqHdr->RqSeqLUN)  == SeqNum) &&
+		 (NET_FN(pIPMIReqHdr->NetFnLUN)  == NET_FN(m_PendingBridgedResTbl[PBTbl][SeqNum].ReqMsgHdr.NetFnLUN )) &&
+		 (pIPMIReqHdr->Cmd               == m_PendingBridgedResTbl[PBTbl][SeqNum].ReqMsgHdr.Cmd) &&
+		 (pIPMIReqHdr->ResAddr           == m_PendingBridgedResTbl[PBTbl][SeqNum].ReqMsgHdr.ResAddr)  )
+	{
+		
+		memcpy (pIPMIResHdr, &m_PendingBridgedResTbl[PBTbl][SeqNum].ResMsgHdr.IPMIMsgHdr, sizeof (IPMIMsgHdr_T));
+		 
+			
+		 if (STATUS_OK == Status)
+		 {
+			if ( ( m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ == gFd_PrimaryIpmbIfcQ) ||
+				 (m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ == gFd_SecondaryIpmbIfcQ) ||
+				 (ORIGIN_SENDMSG != m_PendingBridgedResTbl[PBTbl][SeqNum].OriginSrc) )
+			{    
+				 return;
+			}
+				
+			ResPkt.Data [sizeof(IPMIMsgHdr_T)] = CC_NORMAL;
+		 }
+		 else if (STATUS_FAIL == Status)
+		 {
+			ResPkt.Data [sizeof(IPMIMsgHdr_T)] = CC_NO_ACK_FROM_SLAVE;
+		 }
+		 else
+		 {
+			ResPkt.Data [sizeof(IPMIMsgHdr_T)] = CC_UNSPECIFIED_ERR;
+		 }
+
+		 ResPkt.Size = sizeof (IPMIMsgHdr_T) + 1 + 1; // IPMI Header + Completion Code + Second Checksum
+		 ResPkt.Cmd = pIPMIResHdr->Cmd;
+		 ResPkt.NetFnLUN = pIPMIReqHdr->NetFnLUN;
+		 ResPkt.Channel = pReq->Channel;
+
+		 /* Calculate the Second CheckSum */
+		 ResPkt.Data[ResPkt.Size - 1] = CalculateCheckSum2 (ResPkt.Data, ResPkt.Size-1);
+
+		 ResPkt.Param = BRIDGING_REQUEST;
+
+		 if (m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ == gFd_LanIfcQ)
+		 {
+			 QueueFd = gFd_LanResQ;
+		 }
+		 // else if (0 == strcmp ((char *)m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ, SerialQueueName))
+		 // {
+			//  //ResPkt.SessionID = m_PendingBridgedResTbl[i].ResMsgHdr.RqSeqLUN;
+			//  strcpy (QueueName, SERIAL_RES_Q);
+		 // }
+		 else if ( (m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ == gFd_PrimaryIpmbIfcQ) ||
+				   (m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ == gFd_SecondaryIpmbIfcQ) )
+		 {
+		 	QueueFd = m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ;
+		 }
+		 else
+		 {
+			 /* PDK Hook to format Pending Bridge Response Packet for other destinations */
+			// if(g_PDKHandle[PDK_FORMATBRIDGERESPKT] != NULL)
+			 {
+				  SwapIPMIMsgHdr ( pIPMIReqHdr, pIPMIResHdr);
+				  
+			//	  ( (void (*)(MsgPkt_T *, int) ) g_PDKHandle[PDK_FORMATBRIDGERESPKT]) ( &ResPkt, BMCInst);
+			 }     
+		   
+		   	QueueFd = m_PendingBridgedResTbl[PBTbl][SeqNum].DestQ;
+		 }
+
+		 if (STATUS_OK != Status)
+		 {
+			 m_PendingBridgedResTbl[PBTbl][SeqNum].Used = FALSE;
+		 }
+		 
+		 /* Post the data to Destination Interface queue */
+		 PostMsg (QueueFd, &ResPkt);
+
+	}
+}
+
+
+/**
+*@fn PendingBridgeResTimerTask
+*@brief Sends the timeout message to response queue
+*          if the message does not turn out within send message timeout
+*@return none
+*/
+static void
+PendingBridgeResTimerTask (void)
+{
+	uint8_t		i;
+	uint8_t     PBTbl = PRIMARY_PB_TBL;
+	int 		QueueFd = 0;
+	printf("-> PendingBridgeResTimerTask\n");
+	/* Check for any pending responses */
+	for( PBTbl=0; PBTbl < MAX_PENDING_BRIDGE_TBL; PBTbl++)
+	{
+		for (i = 0; i < sizeof (m_PendingBridgedResTbl[0])/sizeof (m_PendingBridgedResTbl[0][0]); i++)
+		{
+			if (TRUE == m_PendingBridgedResTbl[PBTbl][i].Used)
+			{
+				m_PendingBridgedResTbl[PBTbl][i].TimeOut--;
+				if (0 == m_PendingBridgedResTbl[PBTbl][i].TimeOut)
+				{
+				   MsgPkt_T		Timeout;
+				   IPMIMsgHdr_T*   pIPMIMsgHdr  = (IPMIMsgHdr_T*) Timeout.Data;
+
+				   /* Fill the response packet */
+				   SwapIPMIMsgHdr (&m_PendingBridgedResTbl[PBTbl][i].ReqMsgHdr, pIPMIMsgHdr);
+
+				   // slog(LANQueueName,"%s%d",LAN_IFC_Q,BMCInst);
+				   // sprintf(PrimaryIPMBQueueName,"%s%d",IPMB_PRIMARY_IFC_Q,BMCInst);
+				   // sprintf(SecondaryIPMBQueueName,"%s%d",IPMB_SECONDARY_IFC_Q,BMCInst);
+				   // sprintf(SerialQueueName,"%s%d",SERIAL_IFC_Q,BMCInst);
+
+				   if(PBTbl == PRIMARY_PB_TBL)
+				   {
+					   pIPMIMsgHdr->ReqAddr = g_BMCInfo.IpmiConfig.PrimaryIPMBAddr;
+				   }
+				   else if(PBTbl == SECONDARY_PB_TBL)
+				   {
+					   pIPMIMsgHdr->ReqAddr = g_BMCInfo.IpmiConfig.SecondaryIPMBAddr;
+				   }
+				   else
+				   {
+					   printf("Invalid PBTbl\n");;//pIPMIMsgHdr->ReqAddr = pBMCInfo->IpmiConfig.BMCSlaveAddr;
+				   }
+
+				   Timeout.Data [sizeof(IPMIMsgHdr_T)] = CC_TIMEOUT;
+
+				   Timeout.Size = sizeof (IPMIMsgHdr_T) + 1 + 1; // IPMI Header + Completion Code + Second Checksum
+
+				   /* Calculate the Second CheckSum */
+				   Timeout.Data[Timeout.Size - 1] = CalculateCheckSum2 (Timeout.Data, Timeout.Size-1);
+
+				   Timeout.Param = BRIDGING_REQUEST;
+
+				   if (m_PendingBridgedResTbl[PBTbl][i].DestQ == gFd_LanIfcQ)
+				   {
+					   int j;
+					   for (j = Timeout.Size - 1; j >= 0; --j)
+					   {
+						   Timeout.Data [j+1] = Timeout.Data [j];
+					   }
+
+					   Timeout.Data[0] = m_PendingBridgedResTbl[PBTbl][i].SrcSessionHandle;
+					   Timeout.Size++;
+					   Timeout.Cmd = PAYLOAD_IPMI_MSG;
+					   QueueFd = gFd_LanIfcQ;
+					}
+				   // else if (0 == strcmp ((char *)m_PendingBridgedResTbl[PBTbl][i].DestQ, SerialQueueName))
+				   // {
+					  //  int j;
+					  //  for (j = Timeout.Size - 1; j >= 0; --j)
+					  //  {
+						 //   Timeout.Data [j+1] = Timeout.Data [j];
+					  //  }
+
+					  //  Timeout.Data[0] = m_PendingBridgedResTbl[PBTbl][i].SrcSessionHandle;
+					  //  Timeout.Size++;
+					  //  Timeout.Cmd = PAYLOAD_IPMI_MSG;
+					  //  strcpy(QueueName, SERIAL_IFC_Q);
+				   // }
+				   else if (g_BMCInfo.IpmiConfig.PrimaryIPMBSupport == 1 && m_PendingBridgedResTbl[PBTbl][i].DestQ == gFd_PrimaryIpmbIfcQ)
+					{
+					   int j;
+					   for (j = Timeout.Size - 1; j >= 0; --j)
+					   {
+						   Timeout.Data [j + sizeof (IPMIMsgHdr_T) + 1] = Timeout.Data [j];
+					   }
+					   memcpy (Timeout.Data, &m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr, sizeof (IPMIMsgHdr_T));
+					   Timeout.Data[sizeof (IPMIMsgHdr_T)] = CC_NORMAL;
+					   Timeout.Size++;
+					   QueueFd = gFd_PrimaryIpmbIfcQ;
+
+					 }
+					 else if (g_BMCInfo.IpmiConfig.SecondaryIPMBSupport == 1 && m_PendingBridgedResTbl[PBTbl][i].DestQ == gFd_SecondaryIpmbIfcQ)
+					 {
+						int j;
+						for (j = Timeout.Size - 1; j >= 0; --j)
+						{
+							Timeout.Data [j + sizeof (IPMIMsgHdr_T) + 1] = Timeout.Data [j];
+						}
+						memcpy (Timeout.Data, &m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.IPMIMsgHdr, sizeof (IPMIMsgHdr_T));
+						Timeout.Data[sizeof (IPMIMsgHdr_T)] = CC_NORMAL;
+						Timeout.Size++;
+						QueueFd = gFd_SecondaryIpmbIfcQ;
+					 }
+					 else if (m_PendingBridgedResTbl[PBTbl][i].DestQ = gFdUdsIfc)
+					 {
+						 int j;
+						 UDSSessionTbl_T *pUDSSessionInfo = NULL;
+						 for (j = sizeof (IPMIMsgHdr_T); j < Timeout.Size ;j++)
+						 {
+							Timeout.Data [j + sizeof (IPMIUDSMsg_T)-sizeof (IPMIMsgHdr_T)] = Timeout.Data [j];
+						 }
+						 Timeout.Size = Timeout.Size + sizeof (IPMIUDSMsg_T)- sizeof (IPMIMsgHdr_T);
+						 
+						 m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.UDSMsgHdr.IPMIMsgLen = Timeout.Size;
+						 memcpy (Timeout.Data, &m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.UDSMsgHdr, sizeof (IPMIUDSMsg_T));
+						 Timeout.NetFnLUN = m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.UDSMsgHdr.NetFnLUN;
+						 Timeout.SessionID = m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.UDSMsgHdr.SessionID;
+						 Timeout.Cmd = m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.UDSMsgHdr.Cmd;
+						 
+						 pUDSSessionInfo = GetUDSSessionInfo (UDS_SESSION_ID_INFO,&Timeout.SessionID);
+						 if(pUDSSessionInfo != NULL)
+						 {
+							 Timeout.Socket = pUDSSessionInfo->UDSSocket;
+						 }
+						 QueueFd = m_PendingBridgedResTbl[PBTbl][i].DestQ;
+					 }
+					 else 
+					 {
+						int j;
+						for (j = Timeout.Size - 1; j >= 0; --j)
+						{
+						   Timeout.Data [j + sizeof (IPMIMsgHdr_T) + 1] = Timeout.Data [j];
+						}
+						memcpy (Timeout.Data, &m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.IPMIMsgHdr, sizeof (IPMIMsgHdr_T));
+						Timeout.Data[sizeof (IPMIMsgHdr_T)] = CC_TIMEOUT;
+						QueueFd = m_PendingBridgedResTbl[PBTbl][i].DestQ;
+					 }
+
+					  /* Post the data to Destination Interface queue */
+					  PostMsg (QueueFd, &Timeout);
+
+					  m_PendingBridgedResTbl[PBTbl][i].Used = FALSE;
+					  printf( "MsgHndlr: clean pending index = %d.\n", i );
+				}
+		   }
+		}
+	}
 }
 
 
-///**
-//*@fn PendingBridgeResTimerTask
-//*@brief Sends the timeout message to response queue
-//*          if the message does not turn out within send message timeout
-//*@return none
-//*/
-//static void
-//PendingBridgeResTimerTask (int BMCInst)
-//{
-//	uint8_t	i;
-//	BMCInfo_t* pBMCInfo = &g_BMCInfo;
-//	char IPMBQueueName[MAX_STR_LENGTH];
-//	//LANQueueName[MAX_STR_LENGTH],PrimarySecondaryIPMBQueueName[MAX_STR_LENGTH],QueueName[MAX_STR_LENGTH];
-//	//,SerialQueueName[MAX_STR_LENGTH];
-//	
-//	//memset(LANQueueName,0,sizeof(LANQueueName));
-//	//memset(PrimaryIPMBQueueName,0,sizeof(PrimaryIPMBQueueName));
-//	//memset(SecondaryIPMBQueueName,0,sizeof(SecondaryIPMBQueueName));
-//	//memset(SerialQueueName,0,sizeof(SerialQueueName));
-//	memset(QueueName,0,sizeof(QueueName));
-//	
-//	/* Check for any pending responses */
-//	for( PBTbl=0; PBTbl < MAX_PENDING_BRIDGE_TBL; PBTbl++)
-//	{
-//		for (i = 0; i < sizeof (m_PendingBridgedResTbl[0])/sizeof (m_PendingBridgedResTbl[0][0]); i++)
-//		{
-//			if (TRUE == m_PendingBridgedResTbl[PBTbl][i].Used)
-//			{
-//				m_PendingBridgedResTbl[PBTbl][i].TimeOut--;
-//				if (0 == m_PendingBridgedResTbl[PBTbl][i].TimeOut)
-//				{
-//				   MsgPkt_T		Timeout;
-//				   IPMIMsgHdr_T*   pIPMIMsgHdr  = (_NEAR_ IPMIMsgHdr_T*) Timeout.Data;
-
-//				   /* Fill the response packet */
-//				   SwapIPMIMsgHdr (&m_PendingBridgedResTbl[PBTbl][i].ReqMsgHdr, pIPMIMsgHdr);
-
-//				   slog(LANQueueName,"%s%d",LAN_IFC_Q,BMCInst);
-//				   sprintf(PrimaryIPMBQueueName,"%s%d",IPMB_PRIMARY_IFC_Q,BMCInst);
-//				   sprintf(SecondaryIPMBQueueName,"%s%d",IPMB_SECONDARY_IFC_Q,BMCInst);
-//				   sprintf(SerialQueueName,"%s%d",SERIAL_IFC_Q,BMCInst);
-
-//				   if(PBTbl == PRIMARY_PB_TBL)
-//				   {
-//					   pIPMIMsgHdr->ReqAddr = pBMCInfo->IpmiConfig.PrimaryIPMBAddr;
-//				   }
-//				   else if(PBTbl == SECONDARY_PB_TBL)
-//				   {
-//					   pIPMIMsgHdr->ReqAddr = pBMCInfo->IpmiConfig.SecondaryIPMBAddr;
-//				   }
-//				   else
-//				   {
-//					   pIPMIMsgHdr->ReqAddr = pBMCInfo->IpmiConfig.BMCSlaveAddr;
-//				   }
-
-//				   Timeout.Data [sizeof(IPMIMsgHdr_T)] = CC_TIMEOUT;
-
-//				   Timeout.Size = sizeof (IPMIMsgHdr_T) + 1 + 1; // IPMI Header + Completion Code + Second Checksum
-
-//				   /* Calculate the Second CheckSum */
-//				   Timeout.Data[Timeout.Size - 1] = CalculateCheckSum2 (Timeout.Data, Timeout.Size-1);
-
-//				   Timeout.Param = BRIDGING_REQUEST;
-
-//				   if (0 == strcmp ((char *)m_PendingBridgedResTbl[PBTbl][i].DestQ, LANQueueName))
-//				   {
-//					   int j;
-//					   for (j = Timeout.Size - 1; j >= 0; --j)
-//					   {
-//						   Timeout.Data [j+1] = Timeout.Data [j];
-//					   }
-
-//					   Timeout.Data[0] = m_PendingBridgedResTbl[PBTbl][i].SrcSessionHandle;
-//					   Timeout.Size++;
-//					   Timeout.Cmd = PAYLOAD_IPMI_MSG;
-//					   strcpy(QueueName, LAN_IFC_Q);
-//					}
-//				   else if (0 == strcmp ((char *)m_PendingBridgedResTbl[PBTbl][i].DestQ, SerialQueueName))
-//				   {
-//					   int j;
-//					   for (j = Timeout.Size - 1; j >= 0; --j)
-//					   {
-//						   Timeout.Data [j+1] = Timeout.Data [j];
-//					   }
-
-//					   Timeout.Data[0] = m_PendingBridgedResTbl[PBTbl][i].SrcSessionHandle;
-//					   Timeout.Size++;
-//					   Timeout.Cmd = PAYLOAD_IPMI_MSG;
-//					   strcpy(QueueName, SERIAL_IFC_Q);
-//				   }
-//				   else if (pBMCInfo->IpmiConfig.PrimaryIPMBSupport == 1 && 0 == strcmp ((char *)m_PendingBridgedResTbl[PBTbl][i].DestQ, PrimaryIPMBQueueName))
-//					{
-//					   int j;
-//					   for (j = Timeout.Size - 1; j >= 0; --j)
-//					   {
-//						   Timeout.Data [j + sizeof (IPMIMsgHdr_T) + 1] = Timeout.Data [j];
-//					   }
-//					   _fmemcpy (Timeout.Data, &m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr, sizeof (IPMIMsgHdr_T));
-//					   Timeout.Data[sizeof (IPMIMsgHdr_T)] = CC_NORMAL;
-//					   Timeout.Size++;
-//					   strcpy(QueueName, IPMB_PRIMARY_IFC_Q);
-//					 }
-//					 else if (pBMCInfo->IpmiConfig.SecondaryIPMBSupport == 1 && 0 == strcmp ((char *)m_PendingBridgedResTbl[PBTbl][i].DestQ, SecondaryIPMBQueueName))
-//					 {
-//						int j;
-//						for (j = Timeout.Size - 1; j >= 0; --j)
-//						{
-//							Timeout.Data [j + sizeof (IPMIMsgHdr_T) + 1] = Timeout.Data [j];
-//						}
-//						_fmemcpy (Timeout.Data, &m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.IPMIMsgHdr, sizeof (IPMIMsgHdr_T));
-//						Timeout.Data[sizeof (IPMIMsgHdr_T)] = CC_NORMAL;
-//						Timeout.Size++;
-//						strcpy(QueueName, IPMB_SECONDARY_IFC_Q);
-//					 }
-//					 else if (0 == strncmp ((char *)m_PendingBridgedResTbl[PBTbl][i].DestQ, UDS_RES_Q,strlen(UDS_RES_Q)))
-//					 {
-//						 int j;
-//						 UDSSessionTbl_T *pUDSSessionInfo = NULL;
-//						 for (j = sizeof (IPMIMsgHdr_T); j < Timeout.Size ;j++)
-//						 {
-//							Timeout.Data [j + sizeof (IPMIUDSMsg_T)-sizeof (IPMIMsgHdr_T)] = Timeout.Data [j];
-//						 }
-//						 Timeout.Size = Timeout.Size + sizeof (IPMIUDSMsg_T)- sizeof (IPMIMsgHdr_T);
-//						 
-//						 m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.UDSMsgHdr.IPMIMsgLen = Timeout.Size;
-//						 _fmemcpy (Timeout.Data, &m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.UDSMsgHdr, sizeof (IPMIUDSMsg_T));
-//						 Timeout.NetFnLUN = m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.UDSMsgHdr.NetFnLUN;
-//						 Timeout.SessionID = m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.UDSMsgHdr.SessionID;
-//						 Timeout.Cmd = m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.UDSMsgHdr.Cmd;
-//						 
-//						 pUDSSessionInfo = GetUDSSessionInfo (UDS_SESSION_ID_INFO,&Timeout.SessionID, BMCInst);
-//						 if(pUDSSessionInfo != NULL)
-//						 {
-//							 Timeout.Socket = pUDSSessionInfo->UDSSocket;
-//						 }
-//						 sprintf (QueueName,"%s",m_PendingBridgedResTbl[PBTbl][i].DestQ);
-//					 }
-//					 else 
-//					 {
-//						int j;
-//						for (j = Timeout.Size - 1; j >= 0; --j)
-//						{
-//						   Timeout.Data [j + sizeof (IPMIMsgHdr_T) + 1] = Timeout.Data [j];
-//						}
-//						_fmemcpy (Timeout.Data, &m_PendingBridgedResTbl[PBTbl][i].ResMsgHdr.IPMIMsgHdr, sizeof (IPMIMsgHdr_T));
-//						Timeout.Data[sizeof (IPMIMsgHdr_T)] = CC_TIMEOUT;
-//						sprintf (QueueName,"%s",m_PendingBridgedResTbl[PBTbl][i].DestQ);
-//					 }
-
-//					  /* Post the data to Destination Interface queue */
-//					  PostMsg (&Timeout,QueueName,BMCInst);
-
-//					  m_PendingBridgedResTbl[PBTbl][i].Used = FALSE;
-//					  IPMI_DBG_PRINT_1( "MsgHndlr: clean pending index = %d.\n", i );
-//				}
-//		   }
-//		}
-//	}
-//}
+/**
+*@fn PendingSeqNoTimerTask
+*@brief Timertask which helpful in IPMB sequence number validation
+*@return none
+*/
+static void
+PendingSeqNoTimerTask (void)
+{
+	uint8_t	i,j;
+	printf("-> PendingSeqNoTimerTask\n");
+	/* Check for any Sequence Number expiraied */
+	for (i = 0; i < sizeof (m_PendingSeqNoTbl)/sizeof (m_PendingSeqNoTbl[0]); i++)
+	{
+		for (j = 0; j < sizeof (m_PendingSeqNoTbl[0])/sizeof (m_PendingSeqNoTbl[0][0]); j++)
+		{
+			if (TRUE == m_PendingSeqNoTbl[i][j].Used)
+			{
+				m_PendingSeqNoTbl[i][j].TimeOut--;
+				if (0 == m_PendingSeqNoTbl[i][j].TimeOut)
+				{
+					m_PendingSeqNoTbl[i][j].Used = FALSE;
+				}
+			}
+		}
+	}
+}
 
 
 /**

+ 6 - 6
app/bmc/msghndlr/PDKCmds.c

@@ -337,12 +337,12 @@ const CmdHndlrMap_T	g_Oem_CmdHndlr [] =	//jimbo add
   added here*/
 const MsgHndlrTbl_T oem_MsgHndlrTbl [] =	
 {
-    { NETFN_APP,                     g_Oem_App_CmdHndlr             },
-    { NETFN_CHASSIS,                 g_Oem_Chassis_CmdHndlr         },
-    { NETFN_BRIDGE,                  g_Oem_Bridge_CmdHndlr          },
-    { NETFN_SENSOR,                  g_Oem_SensorEvent_CmdHndlr     },
-    { NETFN_STORAGE,                 g_Oem_Storage_CmdHndlr         },
-    { NETFN_TRANSPORT,               g_Oem_Config_CmdHndlr          },
+    // { NETFN_APP,                     g_Oem_App_CmdHndlr             },
+    // { NETFN_CHASSIS,                 g_Oem_Chassis_CmdHndlr         },
+    // { NETFN_BRIDGE,                  g_Oem_Bridge_CmdHndlr          },
+    // { NETFN_SENSOR,                  g_Oem_SensorEvent_CmdHndlr     },
+    // { NETFN_STORAGE,                 g_Oem_Storage_CmdHndlr         },
+    // { NETFN_TRANSPORT,               g_Oem_Config_CmdHndlr          },
     { NETFN_OEM,               		 g_Oem_CmdHndlr      		     },
 };
 

+ 65 - 65
app/bmc/msghndlr/PMConfig.h

@@ -127,32 +127,32 @@ typedef struct
 
 //}   PEFRecordDetailsConfig_T;
 
-///**
-// * @struct ChannelUserInfo_T
-// * Structure for user information per channel.
-//**/
-//typedef struct
-//{
-//    uint32_t  ID;
-//    uint8_t   UserId;
-//    uint32_t    AccessLimit:4;
-//    uint32_t    LinkAuth:1;
-//    uint32_t    UserAccessCallback:1;
-//    uint32_t    UserAccessCBCPCallback:1;
-//    uint8_t   UserCallbackCapabilities;
-//    uint8_t   CBCPNegOptions;
-//    uint8_t   CallBack1;
-//    uint8_t   CallBack2;
-//    uint8_t   CallBack3;
-//    uint8_t   FailureAttempts;
-//    uint8_t   Lock;
-//    uint32_t LockedTime;
-//    uint8_t  PayloadEnables [MAX_PLD_ENABLES_TYPES];
-
-//    uint8_t  IPMIMessaging;
-//    uint8_t  ActivatingSOL;
-
-//}   ChannelUserInfo_T;
+/**
+* @struct ChannelUserInfo_T
+* Structure for user information per channel.
+**/
+typedef struct
+{
+   uint32_t  ID;
+   uint8_t   UserId;
+   uint32_t    AccessLimit:4;
+   uint32_t    LinkAuth:1;
+   uint32_t    UserAccessCallback:1;
+   uint32_t    UserAccessCBCPCallback:1;
+   uint8_t   UserCallbackCapabilities;
+   uint8_t   CBCPNegOptions;
+   uint8_t   CallBack1;
+   uint8_t   CallBack2;
+   uint8_t   CallBack3;
+   uint8_t   FailureAttempts;
+   uint8_t   Lock;
+   uint32_t LockedTime;
+   uint8_t  PayloadEnables [MAX_PLD_ENABLES_TYPES];
+
+   uint8_t  IPMIMessaging;
+   uint8_t  ActivatingSOL;
+
+}   ChannelUserInfo_T;
 
 
 /**
@@ -179,45 +179,45 @@ typedef struct
 }   UserInfo_T;
 
 
-///**
-// * @struct DefaultChCfg_T
-// * Structure of channel Information.
-//**/
-//typedef struct
-//{
-//    uint32_t          ID;
-//    uint32_t            ChannelIndex;
-//    uint32_t            ChannelNumber:4;
-//    uint32_t            ChannelType:7;     /* Channel Type */
-//    uint32_t            ChannelMedium:7;
-//    uint32_t            ChannelProtocol:5;
-//    uint32_t            SessionSupport:2;               /**< session support. */
-//    uint32_t            ActiveSession:6;                /**< No of active session in this channel. */
-//    uint8_t           AuthType [MAX_PRIVILEGE_TYPES]; /**< Authentication according to privilege. */
-//    uint8_t           ProtocolVendorId [3];
-//    uint8_t           AuxiliaryInfo [2];
-//    uint32_t            ReceiveMsgQ:1;            /**< enable/disable  message to Receive Message Queue. */
-//    uint32_t            AccessMode:4;             /**< channel access mode - disabled/perboot/always/shared. */
-//    uint32_t            AccessModeSupported:4;    /**< access mode supported by this channel. */
-//    uint32_t            Alerting:1;               /**< enable/disable alerting through this channel. */
-//    uint32_t            PerMessageAuth:1;         /**< enable/disable per message Auth through this channel. */
-//    uint32_t            UserLevelAuth:1;          /**< enable/disable userlevel Auth through this channel. */
-//    uint32_t            MaxPrivilege:4;           /**< max privilage level allowed by this channel. */
-//    uint32_t            reserved:1;
-//    uint32_t            SetUserAccess:1;          /**< set user access command not allowed. */
-//    uint32_t            SetChPrivilege:2;
-//    uint32_t            SessionLimit:6;
-//    uint32_t            LoginStatusNUP:1;
-//    uint32_t            LoginStatusNUNP:1;
-//    uint32_t            LoginStatusNNU:1;
-//    uint32_t            MaxUser:6;
-//    uint32_t            NoCurrentUser:6;
-//    uint32_t            NoFixedUser:6;
-//    uint32_t            ChannelIndexRam:4;
-//    uint32_t            ChannelIndexNvRam:4;
-//  ChannelUserInfo_T ChannelUserInfo [MAX_NUM_CH_USERS_MDS];
-
-//}   ChannelInfo_T;
+/**
+* @struct DefaultChCfg_T
+* Structure of channel Information.
+**/
+typedef struct
+{
+   uint32_t          ID;
+   uint32_t            ChannelIndex;
+   uint32_t            ChannelNumber:4;
+   uint32_t            ChannelType:7;     /* Channel Type */
+   uint32_t            ChannelMedium:7;
+   uint32_t            ChannelProtocol:5;
+   uint32_t            SessionSupport:2;               /**< session support. */
+   uint32_t            ActiveSession:6;                /**< No of active session in this channel. */
+   uint8_t           AuthType [MAX_PRIVILEGE_TYPES]; /**< Authentication according to privilege. */
+   uint8_t           ProtocolVendorId [3];
+   uint8_t           AuxiliaryInfo [2];
+   uint32_t            ReceiveMsgQ:1;            /**< enable/disable  message to Receive Message Queue. */
+   uint32_t            AccessMode:4;             /**< channel access mode - disabled/perboot/always/shared. */
+   uint32_t            AccessModeSupported:4;    /**< access mode supported by this channel. */
+   uint32_t            Alerting:1;               /**< enable/disable alerting through this channel. */
+   uint32_t            PerMessageAuth:1;         /**< enable/disable per message Auth through this channel. */
+   uint32_t            UserLevelAuth:1;          /**< enable/disable userlevel Auth through this channel. */
+   uint32_t            MaxPrivilege:4;           /**< max privilage level allowed by this channel. */
+   uint32_t            reserved:1;
+   uint32_t            SetUserAccess:1;          /**< set user access command not allowed. */
+   uint32_t            SetChPrivilege:2;
+   uint32_t            SessionLimit:6;
+   uint32_t            LoginStatusNUP:1;
+   uint32_t            LoginStatusNUNP:1;
+   uint32_t            LoginStatusNNU:1;
+   uint32_t            MaxUser:6;
+   uint32_t            NoCurrentUser:6;
+   uint32_t            NoFixedUser:6;
+   uint32_t            ChannelIndexRam:4;
+   uint32_t            ChannelIndexNvRam:4;
+ ChannelUserInfo_T ChannelUserInfo [MAX_NUM_CH_USERS_MDS];
+
+}   ChannelInfo_T;
 
 
 ///**

+ 4 - 4
app/bmc/msghndlr/SensorEvent/SensorMonitor.h

@@ -78,10 +78,10 @@
 #define PARAM_SENSOR_SCAN           0x04
 
 
-//typedef int (*pPDK_MonitorHook_T) (void* pSensorInfo,uint8_t *pReadFlags,int BMCInst);
-//typedef int (*pPDK_SensorInitHook_T) (void *pSensorInfo,int BMCInst);
-//typedef int (*pPDK_MonitorExtHook_T) (void *pSensorInfo, uint8_t* pReadFlags,int BMCInst);
-//typedef int (*pPDK_PreEventLogHook_T) (void *pSensorInfo, uint8_t* pEventData, uint8_t* pReadFlags,int BMCInst);
+//typedef int (*pPDK_MonitorHook_T) (void* pSensorInfo,uint8_t *pReadFlags );
+//typedef int (*pPDK_SensorInitHook_T) (void *pSensorInfo );
+//typedef int (*pPDK_MonitorExtHook_T) (void *pSensorInfo, uint8_t* pReadFlags );
+//typedef int (*pPDK_PreEventLogHook_T) (void *pSensorInfo, uint8_t* pEventData, uint8_t* pReadFlags );
 
 
 ///* Hook Type supported */

+ 0 - 1
app/bmc/msghndlr/Storage/SDRDevice/SDR.c

@@ -726,7 +726,6 @@ SDR_GetNextSDRId (uint16_t RecID)
     if (0 == pSDRRec)
     {
         /* return last record ID (0xFFFF) */
-        printf (" No Records\n");
         return 0xFFFF;
     }
     else

+ 1 - 0
app/bmc/msghndlr/Support.h

@@ -38,6 +38,7 @@
 #include "Storage.h"
 #include "SDRRecord.h"
 
+
 /*---------------------------------------------------------------------------*
  * DEVICES SUPPORTED
  *---------------------------------------------------------------------------*/

+ 6 - 6
app/bmc/msghndlr/Transport/Badpasswd.c

@@ -39,7 +39,7 @@
 // *@param Ch - Channel Number 
 // *@return Returns 0
 // */
-// int CheckPasswordViolation(INT8U SerialorLAN,INT8U Ch,int BMCInst)
+// int CheckPasswordViolation(INT8U SerialorLAN,INT8U Ch )
 // {
 //     int j,EthIndex=0;
 //     INT8U Index=0,ThresholdVal=0;
@@ -144,7 +144,7 @@
 // *@return Returns 0 success
 // *        Returns -1 on failure
 // */
-// int FindUserLockStatus(INT8U Userid,INT8U Channel,int BMCInst)
+// int FindUserLockStatus(INT8U Userid,INT8U Channel )
 // {
 //     INT8U Index=0;
 //     ChannelInfo_T*pChannelInfo = getChannelInfo(Channel,BMCInst);
@@ -189,7 +189,7 @@
 // * @param Channel - Channel Number
 // * @return Returns 0 on success
 // */
-// int LockUser(INT8U Userid,INT8U Channel,int BMCInst)
+// int LockUser(INT8U Userid,INT8U Channel )
 // {
 //     INT8U Index=0,EthIndex=0;
 //     ChannelInfo_T*pChannelInfo = getChannelInfo(Channel,BMCInst);
@@ -240,7 +240,7 @@
 // *@param Channel - Channel Number
 // *@return Returns 0 on success
 // */
-// int UnlockUser(INT8U Userid,INT8U Channel,int BMCInst)
+// int UnlockUser(INT8U Userid,INT8U Channel )
 // {
 //     INT8U Index=0,EthIndex=0;
 //     ChannelInfo_T*pChannelInfo = getChannelInfo(Channel,BMCInst);
@@ -287,7 +287,7 @@
 // /*
 // *@fn ClearUserLockAttempts
 // */
-// int ClearUserLockAttempts(INT8U SerialorLAN,int BMCInst)
+// int ClearUserLockAttempts(INT8U SerialorLAN )
 // {
 //     int i=0,j=0;
 //     INT8U Index=0;//,EthIndex=0;
@@ -327,7 +327,7 @@
 // *@param Event -Denotes whether event has to be generated
 // *@return Returns 0
 // */
-// int GenerateLockEvent(INT8U Channel,INT8U UserID,int BMCInst)
+// int GenerateLockEvent(INT8U Channel,INT8U UserID )
 // {
 //     INT8U EventMsg[9],EthIndex=0,GenEvent=0;
 //     _FAR_ BMCInfo_t* pBMCInfo = &g_BMCInfo[BMCInst]; 

+ 2 - 2
app/bmc/msghndlr/Transport/SerialModem.c

@@ -257,7 +257,7 @@
 //                                                  INT8U            SetSelector,
 //                                                  INT8U            BlockSelector,
 //                                                  int			  BMCInst);
-// static _FAR_ ChannelUserInfo_T* GetCBChUserInfo (INT8U UserID, INT8U Channel,int BMCInst);
+// static _FAR_ ChannelUserInfo_T* GetCBChUserInfo (INT8U UserID, INT8U Channel );
 // static  int     SetSerialPort (int BMCInst);
 
 
@@ -945,7 +945,7 @@
 //  * GetCBChUserInfo
 //  *---------------------------------------*/
 // static _FAR_ ChannelUserInfo_T*
-// GetCBChUserInfo (INT8U UserID, INT8U Channel,int BMCInst)
+// GetCBChUserInfo (INT8U UserID, INT8U Channel )
 // {
 //     _FAR_   ChannelInfo_T* pChannelInfo;
 //     INT8U          Index;

+ 1 - 1
app/bmc/msghndlr/cmdselect.c

@@ -529,7 +529,7 @@ const NetFnCmds_T g_Storage [] =
 //	{ 0,                                        0}
 //};
 
-const NetFnCmds_T g_oem [] =			//jimbo add
+const NetFnCmds_T g_oem[] =			//jimbo add
 {
 	{ CMD_EXAMPLE_0h   ,  ENABLED},
     { CMD_EXAMPLE_1h   ,  ENABLED},

+ 14 - 11
app/common_include/com_IPMIDefs.h

@@ -53,17 +53,17 @@
 
 #define AUTH_FILE_PATH		"/etc/goahead/auth.txt"
 
-/*------------------------
- * Privilege Levels
- *------------------------*/
-#define PRIV_NONE		0x00
-#define PRIV_CALLBACK	0x01
-#define PRIV_USER		0x02
-#define PRIV_OPERATOR	0x03
-#define PRIV_ADMIN		0x04
-#define PRIV_OEM		0x05
-#define PRIV_LOCAL		0x81
-#define PRIV_SYS_IFC	0x82
+// /*------------------------
+//  * Privilege Levels
+//  *------------------------*/
+// #define PRIV_NONE		0x00
+// #define PRIV_CALLBACK	0x01
+// #define PRIV_USER		0x02
+// #define PRIV_OPERATOR	0x03
+// #define PRIV_ADMIN		0x04
+// #define PRIV_OEM		0x05
+// #define PRIV_LOCAL		0x81
+// #define PRIV_SYS_IFC	0x82
 
 /*----------------------------------------------
  * UDS
@@ -118,7 +118,9 @@
 #define PRIMARY_IPMB_CHANNEL		(0)
 #define LAN_RMCP_CHANNEL        	(1)
 #define SECONDARY_IPMB_CHANNEL		(6)
+#define USB_CHANNEL					(0x0B)
 #define UDS_CHANNEL             	(0x0D)
+#define SYS_IFC_CHANNEL				(0x0F)
 
 /*----------------------------------------------
  * Parameters
@@ -149,6 +151,7 @@
 
 #define BLADE_CHMC              0
 #define BLADE_IPMC              1
+#define   CH_NOT_USED   0xFF
 
 /*----------------------------------------------
  * Bit fields

BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/goahead-test


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/gopass


BIN
app/goahead-5.1.0/build/linux-arm-static/bin/libgo.a


BIN
app/ipmitool-1.8.18.tar.bz2


+ 47 - 0
app/ipmitool-1.8.18/Makefile

@@ -0,0 +1,47 @@
+EXEC		= ipmitool
+
+CFLAGS		:= -Os -mcpu=cortex-m3 -mthumb
+LDFLAGS		:= -mcpu=cortex-m3 -mthumb -L$(INSTALL_ROOT)/A2F/root/usr/lib
+
+
+
+CC	= $(CROSS_COMPILE_APPS)gcc
+
+#source
+SRC	= src/ipmitool.c
+SRC += src/plugins/ipmi_intf.c
+SRC += lib/log.c
+SRC += lib/helper.c
+SRC += lib/ipmi_string.c
+SRC += lib/ipmi_main.c
+SRC += lib/ipmi_raw.c
+
+#SRC += lib/ipmi_delloem.c
+#SRC += lib/ipmi_oem.c
+#SRC += lib/ipmi_sdr.c
+#SRC += lib/ipmi_sel.c
+
+
+
+
+
+#SRC += $(wildcard ./lib/*.c) 
+
+#incldue
+CFLAGS	+= -I$(INSTALL_ROOT)/A2F/root/usr/include
+CFLAGS	+= -I ./include
+
+
+
+#object
+OBJS	= $(SRC:%.o=%.c)
+
+$(EXEC): $(OBJS)
+	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LIBS) -lpthread
+	rm -f *.o
+
+clean:
+	OBJS	= $(SRC:%.o=%.c)
+	rm -rf $(EXEC) $(OBJS)
+
+

+ 414 - 0
app/ipmitool-1.8.18/README

@@ -0,0 +1,414 @@
+
+                              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 included 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
+
+IPMItool commit archive
+https://lists.sourceforge.net/lists/listinfo/ipmitool-cvs

+ 41 - 0
app/ipmitool-1.8.18/contrib/Makefile.am

@@ -0,0 +1,41 @@
+# 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
+
+dist_pkgdata_DATA = oem_ibm_sel_map
+
+EXTRA_DIST = README \
+	bmclanconf ipmi.init.basic ipmi.init.redhat \
+	exchange-bmc-os-info.init.redhat exchange-bmc-os-info.service.redhat \
+	exchange-bmc-os-info.sysconf log_bmc.sh\
+	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

+ 550 - 0
app/ipmitool-1.8.18/contrib/Makefile.in

@@ -0,0 +1,550 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# 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.
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = contrib
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(dist_pkgdata_DATA) README
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+am__installdirs = "$(DESTDIR)$(pkgdatadir)"
+DATA = $(dist_pkgdata_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+ARCH = @ARCH@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASEDIR = @BASEDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTRO = @DISTRO@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTF_BMC = @INTF_BMC@
+INTF_BMC_LIB = @INTF_BMC_LIB@
+INTF_DUMMY = @INTF_DUMMY@
+INTF_DUMMY_LIB = @INTF_DUMMY_LIB@
+INTF_FREE = @INTF_FREE@
+INTF_FREE_LIB = @INTF_FREE_LIB@
+INTF_IMB = @INTF_IMB@
+INTF_IMB_LIB = @INTF_IMB_LIB@
+INTF_LAN = @INTF_LAN@
+INTF_LANPLUS = @INTF_LANPLUS@
+INTF_LANPLUS_LIB = @INTF_LANPLUS_LIB@
+INTF_LAN_LIB = @INTF_LAN_LIB@
+INTF_LIPMI = @INTF_LIPMI@
+INTF_LIPMI_LIB = @INTF_LIPMI_LIB@
+INTF_OPEN = @INTF_OPEN@
+INTF_OPEN_LIB = @INTF_OPEN_LIB@
+INTF_SERIAL = @INTF_SERIAL@
+INTF_SERIAL_LIB = @INTF_SERIAL_LIB@
+INTF_USB = @INTF_USB@
+INTF_USB_LIB = @INTF_USB_LIB@
+IPMITOOL_INTF_LIB = @IPMITOOL_INTF_LIB@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OS = @OS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POW_LIB = @POW_LIB@
+PSTAMP = @PSTAMP@
+RANLIB = @RANLIB@
+RPMBUILD = @RPMBUILD@
+RPM_RELEASE = @RPM_RELEASE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_configure_args = @ac_configure_args@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in
+dist_pkgdata_DATA = oem_ibm_sel_map
+EXTRA_DIST = README \
+	bmclanconf ipmi.init.basic ipmi.init.redhat \
+	exchange-bmc-os-info.init.redhat exchange-bmc-os-info.service.redhat \
+	exchange-bmc-os-info.sysconf log_bmc.sh\
+	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
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign contrib/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
+	done
+
+uninstall-dist_pkgdataDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+	for dir in "$(DESTDIR)$(pkgdatadir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_pkgdataDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_pkgdataDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am \
+	install-dist_pkgdataDATA install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+	uninstall-am uninstall-dist_pkgdataDATA
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

+ 95 - 0
app/ipmitool-1.8.18/contrib/README

@@ -0,0 +1,95 @@
+
+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!
+
+

+ 403 - 0
app/ipmitool-1.8.18/contrib/bmc-snmp-proxy

@@ -0,0 +1,403 @@
+#!/bin/sh
+#############################################################################
+#
+# bmc-snmp-proxy:	Set SNMP proxy to BMC (Baseboard Management Controller)
+#
+# version:	0.62
+#
+# 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_BMC_CONF_DIR="/etc/snmp/bmc"
+SNMPD_BMC_CONF="${SNMPD_BMC_CONF_DIR}/snmpd.local.conf"
+TRAPD_BMC_CONF="${SNMPD_BMC_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 "proxy -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_BMC_CONF_DIR} ]; then
+			write_snmp_conf > ${SNMPD_BMC_CONF} || RETVAL=4
+		fi
+	else
+		RETVAL=3
+	fi
+}
+
+set_snmpd_conf_path()
+{
+	if [ ! -d ${SNMPD_BMC_CONF_DIR} ]; then
+		mkdir ${SNMPD_BMC_CONF_DIR} || RETVAL=7
+	fi
+
+	# We need SNMPCONFPATH set for both snmpd and snmptrapd
+	for sysconf in ${SYSCONF_DIR}/snmp*d;
+	do
+		if ! grep -q "^SNMPCONFPATH.*${SNMPD_BMC_CONF_DIR}" \
+			"${sysconf}" > /dev/null 2>&1; then
+			printf "SNMPCONFPATH=/etc/snmp:%s\n" \
+				"${SNMPD_BMC_CONF_DIR}" >> ${sysconf} || \
+				RETVAL=7
+		fi
+	done
+
+	return $RETVAL
+}
+
+disable_snmp_proxy()
+{
+	if [ -f ${SNMPD_BMC_CONF} ]; then
+		rm -f ${SNMPD_BMC_CONF} || RETVAL=5
+	fi
+}
+#############################################################################
+# Trap Forwarding
+#############################################################################
+
+pick_alert_dest()
+{
+	test_ip="$1"
+	# We have 4 IPv4 and 4 IPv6 alert dest. We will set IPv4 for now.
+	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 || RETVAL=8
+}
+
+config_bmc_alert_dest()
+{
+	# call with enable|disable
+	# Pick the first active LAN channel
+        for CHANNEL in `seq 1 14`
+        do
+                [ $(${IPMITOOL} -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
+		# disable: reset it if we are called with disable
+		[ "${1}" = "disable" ] && \
+			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}" = "disable" ] && \
+			return $RETVAL
+		# set: the TRAPD_IP
+		set_alert_dest_ip "${TRAPD_IP}"
+	else
+		# No free alert destinations
+		RETVAL=9
+	fi
+
+	return $RETVAL
+}
+
+set_ipmi_pef()
+{
+	# Needs ipmitool-1.8.13 + patches
+	${IPMITOOL} pef policy set ${ALERT_DEST} "${1}" >/dev/null 2>&1 || \
+		RETVAL=10
+}
+
+get_host_ip()
+{
+	# Get host's IP that the BMC can reach. This is at best a hack.
+	IFACE=$(/usr/sbin/ip -o -f inet address |awk '!/: lo/ {print $2}')
+
+	for dev in ${IFACE}
+	do
+		temp_ping=$(ping -c 1 -I ${dev} ${BMC_IPv4})
+		[ $? -ne 0 ] && continue
+
+		printf -- "%s" "$temp_ping"| awk 'NR==1{print $5}' && break
+	done
+}
+
+config_bmc_alert()
+{
+	# Do two things
+	# Set/Reset TRAP IP in BMC
+	# Enable/Disable PEF alerting in BMC for TRAP
+
+	# 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} && config_bmc_alert_dest "${ACTION}"
+
+	# Enable/Disable alerting on the LAN channel
+	[ $RETVAL -eq 0 ] && set_ipmi_pef "${ACTION}"
+
+	return $RETVAL
+}
+
+write_trapd_conf()
+{
+	printf "###############################################\n"
+	printf "# Automatically created by %s #\n" "${SCRIPT_NAME}"
+	printf "forward default %s\n" "${FORWARD_HOST}"
+	printf "###############################################\n"
+}
+
+config_trapd()
+{
+	# Proceed only if snmptrapd is available on the system
+	if [ -f ${TRAPD_CONF} ]; then
+		write_trapd_conf > ${TRAPD_BMC_CONF} || RETVAL=11
+	else
+		RETVAL=11
+	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} # enable or disable
+
+	if [ "${ACTION}" = "enable" ]; then
+		# Get trapd config,
+		if trap_sink_exists; then
+			config_bmc_alert && config_trapd
+		else
+			# exit silently if there is no sink
+			NO_TRAP=1
+		fi
+	else
+		if [ -f ${TRAPD_BMC_CONF} ]; then
+			rm -f ${TRAPD_BMC_CONF} >/dev/null 2>&1
+			config_bmc_alert
+		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
+}
+
+#############################################################################
+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 "enable"
+			[ $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 "disable"
+			[ $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_BMC_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_BMC_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 set snmpd config." 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
+#############################################################################

+ 18 - 0
app/ipmitool-1.8.18/contrib/bmc-snmp-proxy.service

@@ -0,0 +1,18 @@
+[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

+ 48 - 0
app/ipmitool-1.8.18/contrib/bmc-snmp-proxy.sysconf

@@ -0,0 +1,48 @@
+# 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"

+ 308 - 0
app/ipmitool-1.8.18/contrib/bmclanconf

@@ -0,0 +1,308 @@
+#!/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

+ 29 - 0
app/ipmitool-1.8.18/contrib/collect_data.sh

@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+#  Copyright (c) 2003 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"
+
+# No need to edit below this point.
+
+IFS="
+"
+
+for line in `eval $ipmi_cmd -c sdr list full` ; do
+
+	IFS=,
+
+	split=($line)
+
+	file="$rrd_dir/$hostname-${split[0]}.rrd"
+
+	rrdupdate "$file" "N:${split[1]}"
+done

+ 40 - 0
app/ipmitool-1.8.18/contrib/create_rrds.sh

@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+#  Copyright (c) 2003 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"
+
+# No need to edit below this point.
+
+IFS="
+"
+
+for line in `eval $ipmi_cmd -c -v sdr list full` ; do
+
+	IFS=,
+
+	split=($line)
+
+	file="$rrd_dir/$hostname-${split[0]}.rrd"
+
+	if [ -e "$file" ] ; then
+		echo "Skipping existing file $file"
+		continue
+	fi
+
+	echo "Creating file $file"
+
+	rrdtool create "$file" \
+		--step 300 DS:var:GAUGE:900:${split[16]}:${split[17]} \
+		RRA:AVERAGE:0.5:1:288 \
+		RRA:AVERAGE:0.5:6:336 \
+		RRA:AVERAGE:0.5:12:720
+done

+ 211 - 0
app/ipmitool-1.8.18/contrib/create_webpage.sh

@@ -0,0 +1,211 @@
+#!/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]} ${split[*]:10:6}" | 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]}"
+
+		group_title=${group}_title
+		declare $group_title="${split[5]} / ${split[6]}"
+
+		group_thres=${group}_thres
+		declare $group_thres="${split[10]},${split[11]},${split[12]},${split[13]},${split[14]},${split[15]}"
+	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
+	group_title=${group}_title
+	group_thres=${group}_thres
+
+	IFS=,
+
+	split=(${!group_thres})
+
+	thres=
+
+	if [ -n "${split[0]}" ] ; then
+		if [ -n "${split[3]}" ] ; then
+			thres="
+  HRULE:${split[0]}#000000
+  HRULE:${split[3]}#000000:\"Upper & lower non-recoverable thresholds\""
+		else
+			thres="
+  HRULE:${split[0]}#000000:\"Upper non-recoverable threshold\""
+		fi
+	else
+		if [ -n "${split[3]}" ] ; then
+			thres="
+  HRULE:${split[3]}#000000:\"Lower non-recoverable threshold\""
+		fi
+	fi
+
+	if [ -n "${split[1]}" ] ; then
+		if [ -n "${split[4]}" ] ; then
+			thres="$thres
+  HRULE:${split[1]}#FF0000
+  HRULE:${split[4]}#FF0000:\"Upper & lower critical thresholds\""
+		else
+			thres="$thres
+  HRULE:${split[1]}#FF0000:\"Upper critical threshold\""
+		fi
+	else
+		if [ -n "${split[4]}" ] ; then
+			thres="$thres
+  HRULE:${split[4]}#FF0000:\"Lower critical threshold\""
+		fi
+	fi
+
+	if [ -n "${split[2]}" ] ; then
+		if [ -n "${split[5]}" ] ; then
+			thres="$thres
+  HRULE:${split[2]}#FFCC00
+  HRULE:${split[5]}#FFCC00:\"Upper & lower warning thresholds\""
+		else
+			thres="$thres
+  HRULE:${split[2]}#FFCC00:\"Upper warning threshold\""
+		fi
+	else
+		if [ -n "${split[5]}" ] ; then
+			thres="$thres
+  HRULE:${split[5]}#FFCC00:\"Lower warning threshold\""
+		fi
+	fi
+
+	echo "<h3>${!group_title}</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} $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
+  --vertical-label "${!group_unit}"
+  --title "Weelky graph"
+  --height $graph_height
+  --width $graph_width ${!group} $thres
+>
+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} $thres
+>
+EOF
+	fi
+done
+
+cat << EOF
+</body>
+</html>
+EOF

+ 151 - 0
app/ipmitool-1.8.18/contrib/create_webpage_compact.sh

@@ -0,0 +1,151 @@
+#!/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

+ 326 - 0
app/ipmitool-1.8.18/contrib/exchange-bmc-os-info.init.redhat

@@ -0,0 +1,326 @@
+#!/bin/sh
+#############################################################################
+#
+# exchange-bmc-os-info: Set OS and BMC (Baseboard Management Controller)
+#			 parameters during system startup.
+#
+# version:	0.72
+#
+# Authors:	Charles Rose <charles_rose@dell.com>
+#		Jordan Hargrave <jordan_hargrave@dell.com>
+#
+# Description:  Script to set OS information in the BMC; fetch BMC IP/URL
+#		and set in the OS for use by other scripts/user.
+#
+#		BMC IP and URL are made available in /var/run/bmc-info
+#
+#		Example to launch BMC web-interface:
+#		# . /var/run/bmc-info
+#		# xdg-open $BMC_URL
+#
+#		See here for details:
+#		https://fedoraproject.org/wiki/Features/AgentFreeManagement
+#
+# OEM Specific: OEM specific ipmi commands go in:
+#		'oem_set_os_version' and 'oem_get_bmc_url'
+#############################################################################
+#
+# chkconfig: 345 99 00
+# description: Set OS name, hostname in BMC; make BMC IP/URL available in OS
+# processname: exchange-bmc-os-info
+# config:      /etc/sysconfig/exchange-bmc-os-info
+#
+### BEGIN INIT INFO
+# Provides:          exchange-bmc-os-info
+# Required-Start:    ipmi
+# Default-Start:     3 4 5
+# Default-Stop:      0 1 2 6
+
+
+#############################################################################
+# GLOBALS
+#############################################################################
+CONFIGFILE=/etc/sysconfig/exchange-bmc-os-info
+IPMI_TOOL=/usr/bin/ipmitool
+BMC_INFO=/var/run/bmc-info
+
+# BMC Manufacturer ID used in 'oem_set_os_version' and 'oem_get_bmc_url'
+DELL="674"
+#OTHER_OEM="123"
+
+# Defaults for ${CONFIGFILE}
+SET_OS_INFO="yes"
+RESET_OS_INFO="no"
+SET_BMC_INFO="yes"
+
+# getsysinfo and setsysinfo commands
+IPMI_SET_SYSINFO="${IPMI_TOOL} mc setsysinfo"
+IPMI_GET_SYSINFO="${IPMI_TOOL} mc getsysinfo"
+#############################################################################
+SCRIPT_NAME=$(basename $0)
+
+# source config
+[ -r ${CONFIGFILE} ] && . ${CONFIGFILE}
+
+RETVAL=0
+
+if [ -f /bin/gettext.sh ]; then
+	GETTEXT=1
+	. /bin/gettext.sh
+	OUTPUT="eval_gettext"
+else
+	GETTEXT=0
+	OUTPUT="echo"
+fi
+
+#############################################################################
+# Get Vendor ID of BMC for use in 'oem_set_os_version' and 'oem_get_bmc_url'
+#
+get_bmc_vendor_id()
+{
+	BMC_VENDOR=$(${IPMI_TOOL} mc info 2>/dev/null | \
+		sed -n "s#^Manufacturer ID.*: ##p")
+	[ -z "${BMC_VENDOR}" ] && RETVAL=4
+}
+
+check_ipmitool()
+{
+	if [ -x ${IPMI_TOOL} ]; then
+	# v1.8.12 plus patches are required for set/getsysinfo support
+	# http://sourceforge.net/mailarchive/message.php?msg_id=29647222
+		[ ! ${IPMI_GET_SYSINFO} >/dev/null 2>&1 ] && \
+			RETVAL=3
+	else
+		RETVAL=2
+	fi
+}
+
+bmc_exists()
+{
+	check_ipmitool
+	[ $RETVAL -eq 0 ] && get_bmc_vendor_id
+	return $RETVAL
+}
+#############################################################################
+
+get_os_info()
+{
+	OS_HOSTNAME=$(hostname)
+	KERNEL_VERSION=$(uname -r -m)
+
+	if  [ -e /etc/lsb-release ] ; then
+		. /etc/lsb-release
+		NAME=${DISTRIB_ID}
+		VERSION="${DISTRIB_RELEASE} ${DISTRIB_CODENAME}"
+	fi
+
+	# we prefer systemd's /etc/os-release over other sources
+	[ -e /etc/os-release ] && . /etc/os-release
+
+	OS_NAME=${NAME}
+	OS_VERSION="${VERSION} kernel ${KERNEL_VERSION}"
+}
+
+oem_set_os_version()
+{
+	# OS Version setting is not standard yet
+	# we need per vendor oem commands
+	case "${BMC_VENDOR}" in
+		$DELL) ${IPMI_SET_SYSINFO} delloem_os_version \
+				"${OS_VERSION}" > /dev/null 2>&1
+			return $?
+			;;
+# Add OEM specific commands.
+# Example:
+#		$OTHER_OEM) ${IPMI_SET_SYSINFO} otheroem_os_version \
+#				"${OS_VERSION}" > /dev/null 2>&1
+#			return $?
+#			;;
+		*) 	return 0
+			;;
+	esac
+}
+
+set_os_info()
+{
+	# Set and reset OS info in the BMC
+	if [ "$1" = "reset" ]; then
+		OS_NAME=""
+		OS_HOSTNAME=""
+		OS_VERSION=""
+	fi
+
+	${IPMI_SET_SYSINFO} os_name "${OS_NAME}" >/dev/null 2>&1 \
+		|| RETVAL=6
+	${IPMI_SET_SYSINFO} primary_os_name "${OS_NAME}" >/dev/null 2>&1 \
+		|| RETVAL=6
+	${IPMI_SET_SYSINFO} system_name "${OS_HOSTNAME}" >/dev/null 2>&1 \
+		|| RETVAL=6
+	oem_set_os_version || RETVAL=6
+}
+
+#############################################################################
+valid_url()
+{
+	url="(https?|http)://[a-z0-9-]+(\.[a-z0-9-]+)+([/?].*)?"
+	printf -- "%s" "${TMP_URL}"| grep -Eq "^${url}"
+	return $?
+}
+
+oem_get_bmc_url()
+{
+	# BMC URL is not standard yet
+	# we need per vendor oem commands
+	case "$BMC_VENDOR" in
+		$DELL)	TMP_URL=$(${IPMI_GET_SYSINFO} delloem_url 2> /dev/null)
+				;;
+# Add OEM specific commands
+# Example:
+#		$OTHER_OEM)
+#			TMP_URL=$(${IPMI_GET_SYSINFO} otheroem_url 2> /dev/null)
+#				;;
+		*)  TMP_URL=""	;;
+	esac
+
+	valid_url && BMC_URL=${TMP_URL} || BMC_URL=""
+}
+
+valid_ip()
+{
+	#Thanks to mkyong.com
+	octet="([01]?[[:digit:]][[:digit:]]?|2[0-4][[:digit:]]|25[0-5])"
+
+	printf -- "%s" "${TMP_IPv4}"| grep -Eq "^${octet}\\.${octet}\\.${octet}\\.${octet}$"
+	return $?
+}
+
+get_bmc_ip()
+{
+	#Thanks to http://ingvar.blog.redpill-linpro.com
+	for CHANNEL in `seq 1 14`
+	do
+		[ $(${IPMI_TOOL} lan print ${CHANNEL} 2>/dev/null \
+			| grep -q "^Set") ] || break
+	done
+
+	# Get BMC_IPv4 and BMC_URL from BMC
+	TMP_IPv4=$(${IPMI_TOOL} lan print ${CHANNEL} 2>/dev/null \
+			| sed -n "s#^IP Address  .*: ##p")
+
+	valid_ip && BMC_IPv4=${TMP_IPv4} || BMC_IPv4=""
+}
+
+get_bmc_info()
+{
+	get_bmc_ip
+	if [ -z "${BMC_IPv4}" ] || [ "${BMC_IPv4}" = "0.0.0.0" ]; then
+		BMC_IPv4=""
+		RETVAL=5
+	else
+		# URL makes sense only if there is an IP
+		oem_get_bmc_url
+	fi
+}
+
+set_bmc_info()
+{
+	if [ ! $(touch "${BMC_INFO}" && chmod 600 "${BMC_INFO}") ]; then
+		printf "BMC_IPv4=%s\n" "${BMC_IPv4}" > "${BMC_INFO}"
+		[ -n "${BMC_URL}" ] && \
+			printf "BMC_URL=%s\n" "${BMC_URL}" >> "${BMC_INFO}"
+	else
+		RETVAL=5
+	fi
+}
+
+unset_bmc_info()
+{
+	[ -f ${BMC_INFO} ] && rm -f ${BMC_INFO} > /dev/null 2>&1
+}
+
+#############################################################################
+start()
+{
+	if bmc_exists; then
+		[ "${SET_OS_INFO}" = "yes" ] && \
+			get_os_info && set_os_info
+
+		if [ "${SET_BMC_INFO}" = "yes" ]; then
+			get_bmc_info
+			if [ ${RETVAL} -eq 0 ]; then
+				set_bmc_info
+			fi
+		fi
+	fi
+}
+
+#############################################################################
+stop()
+{
+	if bmc_exists; then
+		# reset OS info while system reboots
+		# aids with debugging OS boot-up issues
+		if [ "${RESET_OS_INFO}" = "yes" ]; then
+			set_os_info reset
+		fi
+		unset_bmc_info
+	fi
+}
+
+#############################################################################
+restart()
+{
+	stop
+	[ $RETVAL -eq 0 ] && start
+}
+
+#############################################################################
+status()
+{
+	[ -r ${BMC_INFO} ] && \
+		grep -q "BMC_IPv4" "${BMC_INFO}" >/dev/null 1>&2 && \
+			BMC_STATUS="ok" || BMC_STATUS="inactive"
+	${OUTPUT} "${SCRIPT_NAME}: ${BMC_STATUS}" 1>&2
+	[ ${GETTEXT} -eq 1 ] && echo
+}
+
+#############################################################################
+usage()
+{
+	${OUTPUT} "Usage: ${SCRIPT_NAME} {start|stop|restart|status}" 1>&2
+	[ ${GETTEXT} -eq 1 ] && echo
+	RETVAL=1
+}
+
+#############################################################################
+# MAIN
+#############################################################################
+case "$1" in
+	start) start ;;
+	stop)  stop ;;
+	restart) restart ;;
+	status)	status ;;
+	*) usage ;;
+esac
+
+case "$RETVAL" in
+	0|1) ;;
+	2) ${OUTPUT} "${SCRIPT_NAME}: ipmitool(1) not found." 1>&2 ;;
+	3) ${OUTPUT} "${SCRIPT_NAME}: this version of ipmitool does not support getsysinfo." 1>&2 ;;
+	4) ${OUTPUT} "${SCRIPT_NAME}: failed to communicate with BMC." 1>&2 ;;
+	5) ${OUTPUT} "${SCRIPT_NAME}: failed to set OS information in BMC." 1>&2 ;;
+	6) ${OUTPUT} "${SCRIPT_NAME}: failed to get BMC information." 1>&2 ;;
+	*) ${OUTPUT} "${SCRIPT_NAME}: unexpected error." 1>&2 ;;
+esac
+
+if [ ${RETVAL} -gt 1 ]; then
+	${OUTPUT} " Return code: ${RETVAL}" 1>&2
+	[ ${GETTEXT} -eq 1 ] && echo
+fi
+
+
+exit ${RETVAL}
+
+#############################################################################
+# end of file
+#############################################################################

+ 13 - 0
app/ipmitool-1.8.18/contrib/exchange-bmc-os-info.service.redhat

@@ -0,0 +1,13 @@
+[Unit]
+Description=Exchange Information between BMC and OS
+After=ipmi.service network.target
+Requires=ipmi.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/libexec/exchange-bmc-os-info start
+ExecStop=/usr/libexec/exchange-bmc-os-info stop
+
+[Install]
+WantedBy=multi-user.target

+ 26 - 0
app/ipmitool-1.8.18/contrib/exchange-bmc-os-info.sysconf

@@ -0,0 +1,26 @@
+# exchange-bmc-os-info
+#
+# Config file to control Exchange of information between
+# the OS and Service Processor/Baseboard Management Controller (BMC)
+#
+# See here for details
+#    https://fedoraproject.org/wiki/Features/AgentFreeManagement
+
+### Set OS Info in BMC/Service Processor ###
+# Name: SET_OS_INFO
+# Description: Set OS Name, Version and Hostname in the Service Processor (BMC)
+# Default: yes
+SET_OS_INFO="yes"
+
+### Reset OS Info in BMC/Service Processor ###
+# Name: RESET_OS_INFO
+# Description: Reset OS Name, Version and Hostname in the Service Processor (BMC).
+# 		Useful when the OS Name/Hostname should be empty on reboot
+# Default: no
+RESET_OS_INFO="no"
+
+### Set BMC/Service Processor Info in OS ###
+# Name; SET_BMC_INFO
+# Description: Set IP Address and URL of Service Processor/BMC in /run/bmc-info
+# Default: yes
+SET_BMC_INFO="yes"

+ 17 - 0
app/ipmitool-1.8.18/contrib/ipmi.init.basic

@@ -0,0 +1,17 @@
+#!/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
+

+ 222 - 0
app/ipmitool-1.8.18/contrib/ipmi.init.redhat

@@ -0,0 +1,222 @@
+#!/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

+ 92 - 0
app/ipmitool-1.8.18/contrib/ipmievd.init.debian

@@ -0,0 +1,92 @@
+#! /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

+ 87 - 0
app/ipmitool-1.8.18/contrib/ipmievd.init.redhat

@@ -0,0 +1,87 @@
+#!/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 $?

+ 212 - 0
app/ipmitool-1.8.18/contrib/ipmievd.init.suse

@@ -0,0 +1,212 @@
+#!/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

+ 88 - 0
app/ipmitool-1.8.18/contrib/log_bmc.sh

@@ -0,0 +1,88 @@
+#!/bin/sh
+#############################################################################
+#
+# log_bmc.sh: Add SEL entries to indicate OS Boot/Install status.
+#
+# version:      0.1
+#
+# Authors:      Charles Rose <charles_rose@dell.com>
+#               Jordan Hargrave <jordan_hargrave@dell.com>
+#
+# Description:  Script to log OS boot/install status to the BMC. Primarily
+#		meant for use in automated installs and start up scripts.
+#		Will provide administrators with OS boot/install status in
+#		BMC and aid with debugging.
+#
+#               Example usage:
+#               # ./log_bmc.sh inst_start
+#               # ipmitool sel list
+#		b | 05/07/2014 | 12:07:32 | OS Boot | Installation started
+#
+#               See here for details:
+#               https://fedoraproject.org/wiki/Features/AgentFreeManagement
+#
+#############################################################################
+IPMI_CMD="/usr/bin/ipmitool"
+
+#############################################################################
+# SEL Event types from ipmi_sel.h
+OS_STOP="0x20"
+OS_BOOT="0x1f"
+# SEL Event data from ipmi_sel.h
+GRACEFUL_SHUTDOWN="0x03" # OS Stop/Shutdown: Installation started
+BOOT_COMPLETED="0x01" # OS Boot: Installation started
+INSTALL_STARTED="0x07" # OS Boot: Installation started
+INSTALL_COMPLETED="0x08" # OS Boot: Installation completed
+INSTALL_ABORTED="0x09" # OS Boot: Installation aborted
+INSTALL_FAILED="0x0a" # OS Boot: Installation failed
+
+##########################################################################
+
+# check for ipmi functionality.
+check_ipmi()
+{
+	# ensures presence of ipmitool and /dev/ipmi*
+	${IPMI_CMD} mc info > /dev/null 2>&1
+	[ $? -ne 0 ] && RETVAL=2
+}
+
+# Write out the events to SEL
+ipmi_sel_add()
+{
+	# Refer ipmitool(1) event for details on format.
+	printf "0x04 %s 0x00 0x6f %s 0x00 0x00" ${type} ${status} > \
+		${tmpfile} && \
+		${IPMI_CMD} sel add ${tmpfile} > /dev/null 2>&1
+	[ $? -ne 0 ] && RETVAL=3
+}
+
+### Main
+# Most of the status is for this event type
+tmpfile=$(/usr/bin/mktemp)
+RETVAL=0
+type=${OS_BOOT}
+
+case ${1} in
+	os_shutdown)   type=${OS_STOP}; status=${GRACEFUL_SHUTDOWN} ;;
+	os_boot)       status=${BOOT_COMPLETED} ;;
+	inst_start)    status=${INSTALL_STARTED} ;;
+	inst_complete) status=${INSTALL_COMPLETED} ;;
+	inst_abort)    status=${INSTALL_ABORTED} ;;
+	inst_fail)     status=${INSTALL_FAILED} ;;
+	*)             RETVAL=1 ;;
+esac
+
+[ ${RETVAL} -eq 0 ] && check_ipmi
+[ ${RETVAL} -eq 0 ] && ipmi_sel_add ${status}
+
+case ${RETVAL} in
+	0) ;;
+	1) printf -- %s\\n "Usage: $0 <os_boot|os_shutdown|inst_start|inst_complete|inst_abort|inst_fail>" ;;
+	2) printf -- %s\\n "failed to communicate with BMC." ;;
+	3) printf -- %s\\n "error adding ipmi sel entry." ;;
+esac
+
+[ -f ${tmpfile} ] && rm -f ${tmpfile} > /dev/null 2>&1
+
+exit ${RETVAL}
+### End

+ 229 - 0
app/ipmitool-1.8.18/contrib/oem_ibm_sel_map

@@ -0,0 +1,229 @@
+"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"

+ 37 - 0
app/ipmitool-1.8.18/control/Makefile.am

@@ -0,0 +1,37 @@
+# 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
+

+ 503 - 0
app/ipmitool-1.8.18/control/Makefile.in

@@ -0,0 +1,503 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# 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.
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = control
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(srcdir)/pkginfo.in $(srcdir)/prototype.in \
+	$(srcdir)/rpmmacros.in $(srcdir)/ipmitool.spec.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = pkginfo prototype rpmmacros ipmitool.spec
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+ARCH = @ARCH@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASEDIR = @BASEDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTRO = @DISTRO@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTF_BMC = @INTF_BMC@
+INTF_BMC_LIB = @INTF_BMC_LIB@
+INTF_DUMMY = @INTF_DUMMY@
+INTF_DUMMY_LIB = @INTF_DUMMY_LIB@
+INTF_FREE = @INTF_FREE@
+INTF_FREE_LIB = @INTF_FREE_LIB@
+INTF_IMB = @INTF_IMB@
+INTF_IMB_LIB = @INTF_IMB_LIB@
+INTF_LAN = @INTF_LAN@
+INTF_LANPLUS = @INTF_LANPLUS@
+INTF_LANPLUS_LIB = @INTF_LANPLUS_LIB@
+INTF_LAN_LIB = @INTF_LAN_LIB@
+INTF_LIPMI = @INTF_LIPMI@
+INTF_LIPMI_LIB = @INTF_LIPMI_LIB@
+INTF_OPEN = @INTF_OPEN@
+INTF_OPEN_LIB = @INTF_OPEN_LIB@
+INTF_SERIAL = @INTF_SERIAL@
+INTF_SERIAL_LIB = @INTF_SERIAL_LIB@
+INTF_USB = @INTF_USB@
+INTF_USB_LIB = @INTF_USB_LIB@
+IPMITOOL_INTF_LIB = @IPMITOOL_INTF_LIB@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OS = @OS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POW_LIB = @POW_LIB@
+PSTAMP = @PSTAMP@
+RANLIB = @RANLIB@
+RPMBUILD = @RPMBUILD@
+RPM_RELEASE = @RPM_RELEASE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_configure_args = @ac_configure_args@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in
+EXTRA_DIST = pkginfo.in prototype.in \
+			  ipmitool.spec.in rpmmacros.in rpmrc
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign control/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign control/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+pkginfo: $(top_builddir)/config.status $(srcdir)/pkginfo.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+prototype: $(top_builddir)/config.status $(srcdir)/prototype.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+rpmmacros: $(top_builddir)/config.status $(srcdir)/rpmmacros.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+ipmitool.spec: $(top_builddir)/config.status $(srcdir)/ipmitool.spec.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-hook
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	cscopelist-am ctags-am dist-hook distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags-am uninstall uninstall-am
+
+
+dist-hook: pkginfo prototype rpmmacros
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

+ 404 - 0
app/ipmitool-1.8.18/control/ipmitool.spec.in

@@ -0,0 +1,404 @@
+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 Ö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.
+

+ 10 - 0
app/ipmitool-1.8.18/control/pkginfo.in

@@ -0,0 +1,10 @@
+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"

+ 12 - 0
app/ipmitool-1.8.18/control/prototype.in

@@ -0,0 +1,12 @@
+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
+

+ 12 - 0
app/ipmitool-1.8.18/control/rpmmacros.in

@@ -0,0 +1,12 @@
+%_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

+ 8 - 0
app/ipmitool-1.8.18/control/rpmrc

@@ -0,0 +1,8 @@
+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
+

+ 36 - 0
app/ipmitool-1.8.18/doc/Makefile.am

@@ -0,0 +1,36 @@
+# 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
+
+man_MANS		= ipmitool.1 ipmievd.8
+
+EXTRA_DIST		= $(man_MANS)
+

+ 611 - 0
app/ipmitool-1.8.18/doc/Makefile.in

@@ -0,0 +1,611 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# 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.
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = doc
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(man_MANS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+ARCH = @ARCH@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASEDIR = @BASEDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTRO = @DISTRO@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTF_BMC = @INTF_BMC@
+INTF_BMC_LIB = @INTF_BMC_LIB@
+INTF_DUMMY = @INTF_DUMMY@
+INTF_DUMMY_LIB = @INTF_DUMMY_LIB@
+INTF_FREE = @INTF_FREE@
+INTF_FREE_LIB = @INTF_FREE_LIB@
+INTF_IMB = @INTF_IMB@
+INTF_IMB_LIB = @INTF_IMB_LIB@
+INTF_LAN = @INTF_LAN@
+INTF_LANPLUS = @INTF_LANPLUS@
+INTF_LANPLUS_LIB = @INTF_LANPLUS_LIB@
+INTF_LAN_LIB = @INTF_LAN_LIB@
+INTF_LIPMI = @INTF_LIPMI@
+INTF_LIPMI_LIB = @INTF_LIPMI_LIB@
+INTF_OPEN = @INTF_OPEN@
+INTF_OPEN_LIB = @INTF_OPEN_LIB@
+INTF_SERIAL = @INTF_SERIAL@
+INTF_SERIAL_LIB = @INTF_SERIAL_LIB@
+INTF_USB = @INTF_USB@
+INTF_USB_LIB = @INTF_USB_LIB@
+IPMITOOL_INTF_LIB = @IPMITOOL_INTF_LIB@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OS = @OS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POW_LIB = @POW_LIB@
+PSTAMP = @PSTAMP@
+RANLIB = @RANLIB@
+RPMBUILD = @RPMBUILD@
+RPM_RELEASE = @RPM_RELEASE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_configure_args = @ac_configure_args@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in
+man_MANS = ipmitool.1 ipmievd.8
+EXTRA_DIST = $(man_MANS)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-man1: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man1dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.1[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man1dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.1[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+install-man8: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(man_MANS)'; \
+	test -n "$(man8dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.8[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man8:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man8dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.8[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
+tags TAGS:
+
+ctags CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(MANS)
+installdirs:
+	for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man1 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-man
+
+uninstall-man: uninstall-man1 uninstall-man8
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	cscopelist-am ctags-am distclean distclean-generic \
+	distclean-libtool distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-man1 install-man8 install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+	uninstall-am uninstall-man uninstall-man1 uninstall-man8
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

+ 231 - 0
app/ipmitool-1.8.18/doc/ipmievd.8

@@ -0,0 +1,231 @@
+.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

+ 3745 - 0
app/ipmitool-1.8.18/doc/ipmitool.1

@@ -0,0 +1,3745 @@
+.TH "ipmitool" "1" "" "Duncan Laurie" ""
+.SH "NAME"
+ipmitool \- utility for controlling IPMI\-enabled devices
+.SH "SYNOPSIS"
+
+ipmitool [ <options> ] <command> [ <sub-commands and sub-options> ]
+
+<options>           := [ <general-options> | <conditional-opts> ]
+.br
+Any recognized option is accepted. Conditional options may be ignored or it's usage postponed until shell or exec processes relevant command.
+.br
+
+<general\-options>   := [ \-h | \-V | \-v | \-I <interface> | \-H <address> |
+                         \-d <N> | \-p <port> | \-c | \-U <username> |
+                         \-L <privlvl> | \-l <lun> | \-m <local_address> |
+                         \-N <sec> | \-R <count> | <password\-option> |
+                         <oem-option> | <bridge-options> ]
+
+<conditional\-opts>  := [ <lan\-options> | <lanplus\-options> |
+                         <command\-options> ]
+.br
+Bridging:
+.br
+<bridge\-options>    := \-t <target_address> [ \-b <channel> |
+                       [ \-T <address> | \-B <channel> ] ]
+.br
+
+Options used with \-I lan:
+.br
+<lan\-options>       := [ \-A <authtype> ]
+.br
+
+Options used with \-I lanplus:
+.br
+<lanplus\-options>   := [ \-C <ciphersuite> | <key\-option> ]
+.br
+
+Option groups setting same value:
+.br
+<key\-option>        := [ \-k <key> | \-K | \-y <hex_key> | \-Y ]
+.br
+<password\-option>   := [ \-f <password_file> | \-a | \-P <password> | \-E ]
+.br
+<oem\-option>        := [ \-o <oemtype> | \-g | \-s ]
+.br
+
+Options used with specific command <command-options>:
+.br
+<options\-sdr>       := [ \-S <sdr_cache_file> ]
+.br
+<options\-sel>       := [ \-O <sel_oem> ]
+.br
+<options\-sol>       := [ \-e <sol_escape_char> ]
+
+
+.SH "DESCRIPTION"
+This program lets you manage Intelligent Platform Management Interface 
+(IPMI) functions of either the local system, via a kernel device driver,
+or a remote system, using IPMI v1.5 and IPMI v2.0. These functions include
+printing FRU information, LAN configuration, sensor readings, and remote
+chassis power control.
+
+IPMI management of a local system interface requires a compatible IPMI
+kernel driver to be installed and configured.  On Linux this driver is
+called \fIOpenIPMI\fP and it is included in standard distributions.
+On Solaris this driver is called \fIBMC\fP and is included in Solaris 10.
+Management of a remote station requires the IPMI\-over\-LAN interface to be
+enabled and configured.  Depending on the particular requirements of each
+system it may be possible to enable the LAN interface using ipmitool over
+the system interface.
+.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\-b\fR <\fIchannel\fP>
+Set destination channel for bridged request.
+.TP
+\fB\-B\fR <\fIchannel\fP>
+Set transit channel for bridged request (dual bridge).
+.TP 
+\fB\-b\fR <\fIchannel\fP>
+Set destination channel for bridged request.
+.TP 
+\fB\-B\fR <\fIchannel\fP>
+Set transit channel for bridged request. (dual bridge)
+.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.0 \fIlanplus\fP connections.  See table 22\-19 in the
+IPMIv2.0 specification.  The default is 3 which specifies RAKP\-HMAC\-SHA1 
+authentication, HMAC\-SHA1\-96 integrity, and AES\-CBC\-128 encryption algorithms.
+.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\-e\fR <\fIsol_escape_char\fP>
+Use supplied character for SOL session escape character.  The default
+is to use \fI~\fP but this can conflict with ssh sessions.
+.TP 
+\fB\-E\fR
+The remote server password is specified by the environment
+variable \fIIPMI_PASSWORD\fP or \fIIPMITOOL_PASSWORD\fP. The \fIIPMITOOL_PASSWORD\fP takes precedence.
+.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\-g\fR
+Deprecated. Use: \-o intelplus
+.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\-k\fR <\fIkey\fP>
+Use supplied Kg key for IPMIv2.0 authentication.  The default is not to
+use any Kg key.
+.TP 
+\fB\-K\fR
+Read Kg key from IPMI_KGKEY environment variable.
+.TP 
+\fB\-l\fR <\fIlun\fP>
+Set destination lun for raw commands.
+.TP 
+\fB\-L\fR <\fIprivlvl\fP>
+Force session privilege level.  Can be CALLBACK, USER,
+OPERATOR, ADMINISTRATOR. Default is ADMINISTRATOR.
+This value is ignored and always set to ADMINISTRATOR when
+combined with \fI-t target address\fP.
+.TP 
+\fB\-m\fR <\fIlocal_address\fP>
+Set the local IPMB address.  The local address defaults to 0x20
+or is auto discovered on PICMG platforms when \-m is not specified.
+There should be no need to change the local address for normal operation.
+.TP 
+\fB\-N\fR <\fIsec\fP>
+Specify nr. of seconds between retransmissions of lan/lanplus messages.
+Defaults are 2 seconds for lan and 1 second for lanplus interfaces.
+Command \fIraw\fP uses fixed value of 15 seconds.
+Command \fIsol\fP uses fixed value of 1 second.
+.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\-R\fR <\fIcount\fP>
+Set the number of retries for lan/lanplus interface (default=4).
+Command \fIraw\fP uses fixed value of one try (no retries).
+Command \fIhpm\fP uses fixed value of 10 retries.
+.TP 
+\fB\-s\fR
+Deprecated. Use: \-o supermicro
+.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.  Local
+SDR cache from a remote system can be created with the
+\fIsdr dump\fP command.
+.TP 
+\fB\-t\fR <\fItarget_address\fP>
+Bridge IPMI requests to the remote target address. Default is 32.
+The \fI-L privlvl\fP option is always ignored and value set to ADMINISTRATOR.
+.TP
+\fB\-T\fR <\fIaddress\fP>
+Set transit address for bridge request (dual bridge).
+.TP 
+\fB\-T\fR <\fItransmit_address\fP>
+Set transit address for bridge request. (dual bridge)
+.TP 
+\fB\-U\fR <\fIusername\fP>
+Remote server username, default is NULL user.
+.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. Using it five times provides details
+on request and expected reply procesing. The \fIhpm\fP commands
+\fItargetcap\fP \fIcompprop\fP \fIabort\fP \fIupgstatus\fP
+\fIrollback\fP \fIrollbackstatus\fP \fIselftestresult\fP increases
+the verbosity level
+.TP 
+\fB\-V\fR
+Display version information.
+.TP 
+\fB\-y\fR <\fIhex key\fP>
+Use supplied Kg key for IPMIv2.0 authentication. The key is expected in
+hexadecimal format and can be used to specify keys with non-printable
+characters. E.g. '\-k PASSWORD' and '\-y 50415353574F5244' are
+equivalent.
+The default is not to use any Kg key.
+.TP 
+\fB\-Y\fR
+Prompt for the Kg key for IPMIv2.0 authentication.
+.TP
+\fB\-z\fR <\fIsize\fP>
+Change Size of Communication Channel. (OEM)
+
+.LP 
+If no password method is specified then ipmitool will prompt the
+user for a password. If no password is entered at the prompt,
+the remote server password will default to NULL.
+.SH "SECURITY"
+There are several security issues be be considered before enabling the
+IPMI LAN interface. A remote station has the ability to control a system's power 
+state as well as being able to gather certain platform information. To reduce 
+vulnerability it is strongly advised that the IPMI LAN interface only be 
+enabled in 'trusted' environments where system security is not an issue or 
+where there is a dedicated secure 'management network'.
+
+Further it is strongly advised that you should not enable IPMI for
+remote access without setting a password, and that that password should
+not be the same as any other password on that system.
+
+When an IPMI password is changed on a remote machine with the IPMIv1.5
+\fIlan\fP interface the new password is sent across the network
+as clear text.  This could be observed and then used to attack the remote
+system.  It is thus recommended that IPMI password management only be done
+over IPMIv2.0 \fIlanplus\fP interface or the system interface on the
+local station.
+
+For IPMI v1.5, the maximum password length is 16 characters.
+Passwords longer than 16 characters will be truncated.
+
+For IPMI v2.0, the maximum password length is 20 characters;
+longer passwords are truncated.
+.SH "COMMANDS"
+.TP 
+\fIhelp\fP
+This can be used to get command\-line help  on  ipmitool
+commands.  It may also be placed at the end of commands
+to get option usage help.
+
+ipmitool help
+.br 
+Commands:
+        bmc          Deprecated. Use mc
+        channel      Configure Management Controller channels
+        chassis      Get chassis status and set power state
+        dcmi         Data Center Management Interface
+        delloem      Manage Dell OEM Extensions.
+        echo         Used to echo lines to stdout in scripts
+        ekanalyzer   run FRU-Ekeying analyzer using FRU files
+        event        Send events to MC
+        exec         Run list of commands from file
+        firewall     Configure Firmware Firewall
+        fru          Print built\-in FRU and scan for FRU locators
+        fwum         Update IPMC using Kontron OEM Firmware Update Manager
+        gendev       Read/Write Device associated with Generic Device locators sdr
+        hpm          Update HPM components using PICMG HPM.1 file
+        i2c          Send an I2C Master Write-Read command and print response
+        ime          Upgrade/Query Intel ME firmware
+        isol         Configure and connect Intel IPMIv1.5 Serial\-over\-LAN
+        kontronoem   Manage Kontron OEM Extensions
+        lan          Configure LAN Channels
+        mc           Management Controller status and global enables
+        nm           Node Manager
+        pef          Configure Platform Event Filtering (PEF)
+        picmg        Run a PICMG/ATA extended command
+        power        Shortcut to chassis power commands
+        raw          Send a RAW IPMI request and print response
+        sdr          Print Sensor Data Repository entries and readings
+        sel          Print System Event Log (SEL)
+        sensor       Print detailed sensor information
+        session      Print session information
+        set          Set runtime variable for shell and exec
+        shell        Launch interactive IPMI shell
+        sol          Configure and connect IPMIv2.0 Serial\-over\-LAN
+        spd          Print SPD info from remote I2C device
+        sunoem       Manage Sun OEM Extensions
+        tsol         Configure and connect Tyan IPMIv1.5 Serial\-over\-LAN
+        user         Configure Management Controller users
+
+.TP 
+\fIchannel\fP
+.RS
+.TP 
+\fIauthcap\fP <\fBchannel number\fR> <\fBmax priv\fR>
+
+Displays information about the authentication capabilities of
+the selected channel at the specified privilege level.
+.RS
+.TP 
+Possible privilege levels are:
+.br 
+\fI1\fP   Callback level
+.br 
+\fI2\fP   User level
+.br 
+\fI3\fP   Operator level
+.br 
+\fI4\fP   Administrator level
+.br 
+\fI5\fP   OEM Proprietary level
+.br 
+\fI15\fP   No access
+.RE
+.TP 
+\fIinfo\fP [\fBchannel number\fR]
+
+Displays  information  about  the selected  channel.  If no channel 
+is given it will display information about the currently used channel.
+.RS
+.PP 
+> ipmitool channel info
+.br 
+Channel 0xf info:
+.br 
+  Channel Medium Type   : System Interface
+.br 
+  Channel Protocol Type : KCS
+.br 
+  Session Support       : session\-less
+.br 
+  Active Session Count  : 0
+.br 
+  Protocol Vendor ID    : 7154
+.RE
+.TP 
+\fIgetaccess\fP <\fBchannel number\fR> [<\fBuserid\fR>]
+.RS
+
+Configure the given userid as the default on the given channel number.  
+When the given channel is subsequently used, the user is identified 
+implicitly by the given userid.
+.TP 
+\fIsetaccess\fP <\fBchannel number\fR> <\fBuserid\fR> [<\fIcallin\fP=\fBon\fR|\fBoff\fR>]
+[<\fIipmi\fP=\fBon\fR|\fBoff\fR>] [<\fIlink\fP=\fBon\fR|\fBoff\fR>] [<\fIprivilege\fP=\fBlevel\fR>]
+.br 
+
+Configure user access information on the given channel for the given userid.
+.TP 
+\fIgetciphers\fP <\fIipmi\fP|\fIsol\fP> [<\fBchannel\fR>]
+.br 
+
+Displays the list of cipher suites supported for the given
+application (ipmi or sol) on the given channel.
+.RE
+.RE
+.TP 
+\fIchassis\fP
+.RS
+.TP 
+\fIstatus\fP
+
+Status information related to power, buttons, cooling, drives and faults.
+.RS
+.RE
+.TP 
+\fIpower\fP
+.RS
+.TP 
+\fIstatus\fP
+.RS
+.RE
+.TP
+\fIon\fP
+.RS
+.RE
+.TP
+\fIoff\fP
+.RS
+.RE
+.TP
+\fIcycle\fP
+.RS
+.RE
+.TP
+\fIreset\fP
+.RS
+.RE
+.TP
+\fIdiag\fP
+.RS
+.RE
+.TP
+\fIsoft\fP
+.RS
+.RE
+.RE
+.TP 
+\fIidentify\fP [<seconds>|force]
+
+Identify interval.
+.br
+Default is 15 seconds.
+.br
+0 - Off
+.br
+force - To turn on indefinitely
+.RS
+.RE
+.TP 
+\fIpolicy\fP
+
+What to do when power is restored.
+.RS
+.TP 
+\fIlist\fP
+
+Show available options.
+.RS
+.RE
+.TP 
+\fIalways-on\fP
+.RS
+.RE
+.TP 
+\fIprevious\fP
+.RS
+.RE
+.TP 
+\fIalways-off\fP
+.RS
+.RE
+.RE
+
+.TP 
+\fIrestart_cause\fP
+
+Last restart cause.
+.RS
+.RE
+.TP 
+\fIpoh\fP
+
+Get power on hours.
+.RS
+.RE
+.TP 
+\fIbootdev\fP
+.RS
+.TP 
+\fInone\fP
+
+Do not change boot device order.
+.RS
+.RE
+.TP 
+\fIpxe\fP
+
+Force PXE boot.
+.RS
+.RE
+.TP 
+\fIdisk\fP
+
+Force boot from default Hard-drive.
+.RS
+.RE
+.TP 
+\fIsafe\fP
+
+Force boot from default Hard-drive, request Safe Mode.
+.RS
+.RE
+.TP 
+\fIdiag\fP
+
+Force boot from Diagnostic Partition.
+.RS
+.RE
+.TP 
+\fIcdrom\fP
+
+Force boot from CD/DVD.
+.RS
+.RE
+.TP 
+\fIbios\fP
+
+Force boot into BIOS Setup.
+.RS
+.RE
+.TP 
+\fIfloppy\fP
+
+Force boot from Floppy/primary removable media.
+.RS
+.RE
+.RE
+.TP 
+\fIbootparam\fP
+.RS
+.TP 
+\fIforce_pxe\fP
+
+Force PXE boot
+.RS
+.RE
+.TP 
+\fIforce_disk\fP
+
+Force boot from default Hard-drive
+.RS
+.RE
+.TP 
+\fIforce_safe\fP
+
+Force boot from default Hard-drive, request Safe Mode
+.RS
+.RE
+.TP 
+\fIforce_diag\fP
+
+Force boot from Diagnostic Partition
+.RS
+.RE
+.TP 
+\fIforce_cdrom\fP
+
+Force boot from CD/DVD
+.RS
+.RE
+.TP 
+\fIforce_bios\fP
+
+Force boot into BIOS Setup
+.RS
+.RE
+.RE
+.TP 
+\fIselftest\fP
+.RS
+.RE
+.RE
+.TP 
+\fIdcmi\fP
+.RS
+.TP 
+\fIdiscover\fP
+.br 
+
+This command is used to discover supported capabilities in DCMI.
+
+.TP 
+\fIpower\fP <\fBcommand\fR>
+.br 
+
+Platform power limit command options are:
+
+.RS
+.TP 
+\fIreading\fP
+.br 
+
+Get power related readings from the system.
+.TP 
+\fIget_limit\fP
+.br 
+
+Get the configured power limits.
+.TP 
+\fIset_limit\fP  <\fBparameter\fR> <\fBvalue\fR>
+.br 
+
+Set a power limit option.
+.br
+
+.RS
+.TP
+Possible parameters/values are:
+
+.TP
+\fIaction\fP <\fBNo Action | Hard Power Off & Log Event to SEL | Log Event to SEL\fR>
+.br
+
+Exception Actions are taken as "No Action", "Hard Power Off system and log events to SEL", or "Log event to SEL only".
+.TP
+\fIlimit\fP <\fBnumber in Watts\fR>
+.br
+
+Power Limit Requested in Watts.
+.TP
+\fIcorrection\fP <\fBnumber in milliseconds\fR>
+.br
+
+Correction Time Limit in milliseconds.
+.TP
+\fIsample\fP <\fBnumber in seconds\fR>
+.br
+
+Statistics Sampling period in seconds.
+
+.RE
+.TP 
+\fIactivate\fP
+.br 
+
+Activate the set power limit.
+.TP 
+\fIdeactivate\fP
+.br 
+
+Deactivate the set power limit.
+.RE
+.TP 
+\fIsensors\fP
+.br 
+
+Prints the available DCMI sensors.
+.TP 
+\fIasset_tag\fP
+.br 
+
+Prints the platforms asset tag.
+.TP 
+\fIset_asset_tag\fP  <\fBstring\fR>
+.br 
+
+Sets the platforms asset tag
+.TP 
+\fIget_mc_id_string\fP
+.br 
+
+Get management controller identifier string.
+.TP 
+\fIset_mc_id_string\fP  <\fBstring\fR>
+.br 
+
+Set management controller identifier string.  The maximum length is 64 bytes including a null terminator.
+.TP 
+\fIthermalpolicy\fP  [<\fBget\fR | \fBset\fR>]
+.br
+
+Thermal Limit policy get/set.  
+.br
+
+.RS
+.TP
+The commands are:
+
+.TP
+\fIGet\fP  <\fBentityID\fR> <\fBinstanceID\fR>
+.br 
+
+Get Thermal Limit values.
+
+\fBentityID\fR is the physical entity that a sensor or device is associated with.   
+\fBinstanceID\fR is a particular instance of an entity.  Entity Instance can be in one of two ranges, system-relative or device-relative.  For example, a system with four processors could use an Entity Instance value of "0" to identify the first processor.  
+.TP
+\fISet\fP  <\fBentityID\fR> <\fBinstanceID\fR>
+.br 
+
+Set Thermal Limit values.  
+
+\fBentityID\fR is the physical entity that a sensor or device is associated with.   
+\fBinstanceID\fR is a particular instance of an entity.  Entity Instance can be in one of two ranges, system-relative or device-relative.  For example, a system with four processors could use an Entity Instance value of "0" to identify the first processor.  
+.RE
+.TP 
+\fIget_temp_reading\fP
+.br 
+
+Get Temperature Sensor Readings.
+.TP 
+\fIget_conf_param\fP
+.br 
+
+Get DCMI Configuration Parameters.
+.TP 
+\fIset_conf_param\fP <\fBparameters\fR>
+.br 
+
+Set DCMI Configuration Parameters.  
+.RS
+.TP
+The Configuration Parameters are:
+.TP 
+\fIactivate_dhcp\fP
+.br 
+
+Activate/restart DHCP
+.TP 
+\fIdhcp_config\fP
+.br 
+
+Discover DHCP Configuration.
+.TP 
+\fIinit\fP 
+.br 
+
+Set DHCP Initial timeout interval, in seconds.  The recommended default is four seconds.
+.TP 
+\fItimeout\fP
+.br 
+
+Set DHCP Server contact timeout interval, in seconds.  The recommended default timeout is two minutes.
+.TP 
+\fIretry\fP
+.br 
+
+Set DHCP Server contact retry interval, in seconds.  The recommended default timeout is sixty-four seconds.
+.RE
+.TP
+\fIoob_discover\fP
+.br 
+
+Ping/Pong Message for DCMI Discovery.
+
+.RE
+.RE
+.RE
+.TP
+\fIdelloem\fP
+.RS
+.br
+
+The delloem commands provide information on Dell-specific features.
+.TP
+\fIsetled {b:d.f} {state..}\fP
+.RS
+.br
+
+Sets the drive backplane LEDs for a device.
+.br
+{b:d.f} = PCI Address of device (eg. 06:00.0)
+.br
+{state} = one or more of the following:
+.RS
+\fIonline | present | hotspare | identify | rebuilding | fault | predict | critical | failed\fP
+.br
+.RE
+.RE
+
+.TP
+\fIlcd\fP 
+.RS
+.br
+\fIset {mode}\fP|\fI{lcdqualifier}\fP|\fI{errordisplay}\fP
+.RS
+.br
+
+Allows you to set the LCD mode and user-defined string.
+.RE
+.TP
+\fIlcd set mode\fP
+.RS
+.br
+\fI{none}\fP|\fI{modelname}\fP|\fI{ipv4address}\fP|\fI{macaddress}\fP|
+.br
+\fI{systemname}\fP|\fI{servicetag}\fP|\fI{ipv6address}\fP|
+.br
+\fI{ambienttemp}\fP|\fI{systemwatt}\fP|\fI{assettag}\fP|
+.br
+\fI{userdefined}<text>\fP
+.br
+
+Allows you to set the LCD display mode to any of the preceding parameters.
+
+.RE
+.TP
+\fIlcd set lcdqualifier\fP
+.RS
+.br
+\fI{watt}\fP|\fI{btuphr}\fP|
+.br
+\fI{celsius}\fP|\fI{fahrenheit}\fP
+.br
+
+Allows you to set the unit for the system ambient temperature mode.
+
+.RE
+.TP
+\fIlcd set errordisplay\fP
+.RS
+.br
+\fI{sel}\fP|\fI{simple}\fP
+.br
+
+Allows you to set the error display.
+.RE
+.TP
+\fIlcd info\fP
+.RS
+.br
+
+Displays the LCD screen information.
+.RE
+.TP
+\fIlcd set vkvm\fP
+.RS
+\fI{active}\fP|\fI{inactive}\fP
+.br
+
+Allows you to set the vKVM status to active or inactive. When it is active and session is in progress, a message appears on LCD.
+.RE
+.TP
+\fIlcd status\fP
+.RS
+.br
+
+Displays the LCD status for vKVM display active or inactive and Front Panel access mode (viewandmodify, view-only or disabled).
+.RE
+.RE
+.TP
+\fImac\fP
+.RS
+.br
+
+Displays the information about the system NICs.
+.TP
+\fImac list\fP
+.br
+
+Displays the NIC MAC address and status of all NICs. It also displays the DRAC/iDRAC MAC address.
+
+.TP
+\fImac get\fP
+.RS
+\fI<NIC number>\fP
+.br
+
+Displays the selected NICs MAC address and status.
+.RE
+.RE
+.TP
+\fIlan\fP
+.RS
+.br 
+Displays the information of Lan.
+
+.TP
+\fIlan set\fP
+.RS
+\fI<Mode>\fP
+.br
+
+Sets the NIC selection mode (dedicated, shared with lom1, shared with lom2,shared with lom3,shared with lom4,shared with failover lom1,shared with failover lom2,shared with failover lom3,shared with failover lom4,shared with Failover all loms, shared with Failover None).
+.RE
+.TP
+\fIlan get\fP
+.br
+
+Returns the current NIC selection mode (dedicated, shared with lom1, shared with lom2, shared with lom3, shared with lom4,shared with failover lom1, shared with failover lom2,shared with failover lom3,shared with failover lom4,shared with Failover all loms,shared with Failover None).
+
+.TP
+\fIlan get active\fP
+.br
+
+Returns the current active NIC (dedicated, LOM1, LOM2, LOM3 or LOM4).
+.RE
+.TP
+\fIpowermonitor\fP
+.RS
+.br
+
+Displays power tracking statistics.
+
+.TP
+\fIpowermonitor clear cumulativepower\fP
+.RS
+.br
+
+Reset cumulative power reading.
+.RE
+.TP
+\fIpowermonitor clear peakpower\fP
+.RS
+.br
+
+Reset peak power reading.
+.RE
+.TP
+\fIpowermonitor powerconsumption\fP
+.RS
+\fI<watt>\fP|\fI<btuphr>\fP
+.br
+Displays the power consumption in watt or btuphr.
+.RE
+.TP
+\fIpowermonitor powerconsumptionhistory\fP
+.RS
+\fI<watt>\fP|\fI<btuphr>\fP
+.br
+Displays the power consumption history in watt or btuphr.
+.RE
+.TP
+\fIpowermonitor getpowerbudget\fP
+.RS
+\fI<watt>\fP|\fI<btuphr>\fP
+.br
+Displays the power cap in watt or btuphr.
+.RE
+.TP
+\fIpowermonitor setpowerbudget\fP
+.RS
+\fI<val>\fP\fI<watt\fP|\fIbtuphr\fP|\fIpercent>\fP
+.br
+Allows you to set the  power cap in watt, BTU/hr or percentage.
+.RE
+.TP
+\fIpowermonitor enablepowercap\fP
+.RS
+.br
+Enables set power cap.
+.RE
+.TP
+\fIpowermonitor disablepowercap\fP
+.RS
+.br
+
+Disables set power cap.
+.RE
+.RE
+.RE
+
+.RS
+.TP
+\fIvFlash info Card\fP
+.RS
+.br
+
+Shows Extended SD Card information.
+.RE
+.RE
+.TP 
+\fIecho\fP
+
+For echoing lines to stdout in scripts.
+.RS
+.RE
+.TP
+\fIekanalyzer\fP <\fBcommand\fR> <\fBxx=filename1\fR> <\fBxx=filename2\fR> [<\fBrc=filename3\fR>] \fB...\fR
+.RS
+.TP
+.br
+\fINOTE\fP : This command can support a maximum of 8 files per command line
+.TP
+.br
+\fIfilename1\fP : binary file that stores FRU data of a Carrier or an AMC module
+.TP
+.br
+\fIfilename2\fP : binary file that stores FRU data of an AMC module.
+      These binary files can be generated from command:
+      \fIipmitool fru read <id> <filename>\fP
+.TP
+.br
+\fIfilename3\fP : configuration file used for configuring On-Carrier Device ID
+or OEM GUID. This file is optional.
+.TP
+.br
+\fIxx\fP : indicates the type of the file. It can take the following value:
+.RS
+.TP
+.br
+\fIoc\fP : On-Carrier device
+.TP
+.br
+\fIa1\fP : AMC slot A1
+.TP
+.br
+\fIa2\fP : AMC slot A2
+.TP
+.br
+\fIa3\fP : AMC slot A3
+.TP
+.br
+\fIa4\fP : AMC slot A4
+.TP
+.br
+\fIb1\fP : AMC slot B1
+.TP
+.br
+\fIb2\fP : AMC slot B2
+.TP
+.br
+\fIb3\fP : AMC slot B3
+.TP
+.br
+\fIb4\fP : AMC slot B4
+.TP
+.br
+\fIsm\fP : Shelf Manager
+
+.RE
+.TP
+.br
+The available commands for ekanalyzer are:
+
+.RE
+.RS
+.TP
+\fIprint\fP [<\fBcarrier\fR | \fBpower\fR | \fBall\fR>]
+.RS
+.TP
+\fIcarrier\fP (default) <\fBoc=filename1\fR> <\fBoc=filename2\fR> \fB...\fR
+.br
+
+Display point to point physical connectivity between carriers and AMC modules.
+ Example:
+   > ipmitool ekanalyzer print carrier oc=fru oc=carrierfru
+   From Carrier file: fru
+      Number of AMC bays supported by Carrier: 2 
+      AMC slot B1 topology:
+         Port 0 =====> On Carrier Device ID 0, Port 16
+         Port 1 =====> On Carrier Device ID 0, Port 12
+         Port 2 =====> AMC slot B2, Port 2
+      AMC slot B2 topology:
+         Port 0 =====> On Carrier Device ID 0, Port 3
+         Port 2 =====> AMC slot B1, Port 2
+   *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+   From Carrier file: carrierfru
+      On Carrier Device ID 0 topology:
+         Port 0 =====> AMC slot B1, Port 4
+         Port 1 =====> AMC slot B1, Port 5
+         Port 2 =====> AMC slot B2, Port 6
+         Port 3 =====> AMC slot B2, Port 7
+      AMC slot B1 topology:
+         Port 0 =====> AMC slot B2, Port 0
+      AMC slot B1 topology:
+         Port 1 =====> AMC slot B2, Port 1
+      Number of AMC bays supported by Carrier: 2
+
+.TP
+\fIpower\fP <\fBxx=filename1\fR> <\fBxx=filename2\fR> \fB...\fr
+.br
+
+Display power supply information between carrier and AMC modules.
+.TP
+\fIall\fP <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fr
+.br
+
+Display both physical connectivity and power supply of each carrier and AMC
+modules.
+
+.RE
+.TP
+\fIfrushow\fP <\fBxx=filename\fR>
+.br
+Convert a binary FRU file into human readable text format. Use \-v option to get
+more display information.
+
+.RE
+.RS
+.TP
+\fIsummary\fP [<\fBmatch\fR | \fBunmatch\fR | \fBall\fR>]
+.RS
+.TP
+\fImatch\fP (default) <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fR
+.br
+Display only matched results of Ekeying match between an On-Carrier device
+and an AMC module or between 2 AMC modules. Example:
+ > ipmitool ekanalyzer summary match oc=fru b1=amcB1 a2=amcA2
+ On-Carrier Device vs AMC slot B1
+  AMC slot B1 port 0 ==> On-Carrier Device 0 port 16
+   Matching Result
+   - From On-Carrier Device ID 0
+    \-Channel ID 11 || Lane 0: enable
+    \-Link Type: AMC.2 Ethernet
+    \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+    \-Link Group ID: 0 || Link Asym. Match: exact match
+   - To AMC slot B1
+    \-Channel ID 0 || Lane 0: enable
+    \-Link Type: AMC.2 Ethernet
+    \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+    \-Link Group ID: 0 || Link Asym. Match: exact match
+   *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+  AMC slot B1 port 1 ==> On-Carrier Device 0 port 12
+   Matching Result
+   - From On-Carrier Device ID 0
+    \-Channel ID 6 || Lane 0: enable
+    \-Link Type: AMC.2 Ethernet
+    \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+    \-Link Group ID: 0 || Link Asym. Match: exact match
+   - To AMC slot B1
+    \-Channel ID 1 || Lane 0: enable
+    \-Link Type: AMC.2 Ethernet
+    \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+    \-Link Group ID: 0 || Link Asym. Match: exact match
+   *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ On-Carrier Device vs AMC slot A2
+  AMC slot A2 port 0 ==> On-Carrier Device 0 port 3
+   Matching Result
+   - From On-Carrier Device ID 0
+    \-Channel ID 9 || Lane 0: enable
+    \-Link Type: AMC.2 Ethernet
+    \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+    \-Link Group ID: 0 || Link Asym. Match: exact match
+   - To AMC slot A2
+    \-Channel ID 0 || Lane 0: enable
+    \-Link Type: AMC.2 Ethernet
+    \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+    \-Link Group ID: 0 || Link Asym. Match: exact match
+   *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ AMC slot B1 vs AMC slot A2
+  AMC slot A2 port 2 ==> AMC slot B1 port 2
+   Matching Result
+   - From AMC slot B1
+    \-Channel ID 2 || Lane 0: enable
+    \-Link Type: AMC.3 Storage
+    \-Link Type extension: Serial Attached SCSI (SAS/SATA)
+    \-Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match}
+   - To AMC slot A2
+    \-Channel ID 2 || Lane 0: enable
+    \-Link Type: AMC.3 Storage
+    \-Link Type extension: Serial Attached SCSI (SAS/SATA)
+    \-Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match}
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+.TP
+\fIunmatch\fP <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fr
+.br
+
+Display the unmatched results of Ekeying match between an On-Carrier device
+and an AMC module or between 2 AMC modules
+.TP
+\fIall\fP <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fr
+.br
+
+Display both matched result and unmatched results of Ekeying match between two
+cards or two modules.
+.RE
+.RE
+.TP 
+\fIevent\fP
+.RS
+.TP 
+<\fBpredefined event number\fR \fIN\fR>
+.br 
+
+Send a pre\-defined test event to the System Event Log.  The following
+events are included as a means to test the functionality of the 
+System Event Log component of the BMC (an entry will be added each 
+time the event \fIN\fP command is executed).
+
+Currently supported values for \fIN\fR are:
+.br 
+\fI1\fP	Temperature: Upper Critical: Going High
+.br 
+\fI2\fP	Voltage Threshold: Lower Critical: Going Low
+.br 
+\fI3\fP	Memory: Correctable ECC 
+.br 
+
+\fBNOTE\fR: These pre\-defined events will likely not produce
+"accurate" SEL records for a particular system because they will
+not be correctly tied to a valid sensor number, but they are
+sufficient to verify correct operation of the SEL.
+
+.TP 
+\fIfile\fP <\fBfilename\fR>
+.br 
+
+Event log records specified in <\fBfilename\fP> will be added to
+the System Event Log.
+
+The format of each line in the file is as follows:
+
+<{\fIEvM Revision\fP} {\fISensor Type\fP} {\fISensor Num\fP} {\fIEvent Dir/Type\fP} {\fIEvent Data 0\fP} {\fIEvent Data 1\fP} {\fIEvent Data 2\fP}>[\fI# COMMENT\fP]
+
+e.g.:
+0x4 0x2 0x60 0x1 0x52 0x0 0x0 # Voltage threshold: Lower Critical: Going Low
+.br 
+
+\fIEvM Revision\fP - 
+The "Event Message Revision" is 0x04 for messages that comply with the IPMI 2.0 
+Specification and 0x03 for messages that comply with the IPMI 1.0 Specification.
+
+\fISensor Type\fP - 
+Indicates the Event Type or Class.
+
+\fISensor Num\fP - 
+Represents the 'sensor' within the management controller that generated 
+the Event Message.
+
+\fIEvent Dir/Type\fP - 
+This field is encoded with the event direction as the high bit 
+(bit 7) and the event type as the low 7 bits.  Event direction is 
+0 for an assertion event and 1 for a deassertion event. 
+
+See the IPMI 2.0 specification for further details on the definitions for
+each field.
+
+.TP 
+<\fBsensorid\fR> <\fBlist\fR>
+.br 
+
+Get a list of all the possible Sensor States and pre-defined Sensor State
+Shortcuts available for a particular sensor.   \fBsensorid\fR is the character 
+string representation of the sensor and must be enclosed in double quotes
+if it includes white space.  Several different commands including 
+\fIipmitool sensor list\fP may be used to obtain a list that includes 
+the \fBsensorid\fR strings representing the sensors on a given system. 
+.RS
+.PP 
+> ipmitool \-I open event "PS 2T Fan Fault" list
+.br 
+Finding sensor PS 2T Fan Fault... ok
+.br 
+Sensor States:
+.br 
+  State Deasserted
+.br 
+  State Asserted
+.br 
+Sensor State Shortcuts:
+.br 
+  present    absent
+.br 
+  assert     deassert
+.br 
+  limit      nolimit
+.br 
+  fail       nofail
+.br 
+  yes        no
+.br 
+  on         off
+.br 
+  up         down
+
+.RE
+.TP 
+<\fBsensorid\fR> <\fBsensor state\fR> [<\fBdirection\fR>]
+
+Generate a custom event based on existing sensor information.
+The optional event \fBdirection can be either \fIassert\fP 
+(the default) or \fIdeassert\fP.  
+
+.RS
+.PP 
+> ipmitool event "PS 2T Fan Fault" "State Asserted"
+.br 
+Finding sensor PS 2T Fan Fault... ok
+.br 
+   0 | Pre-Init Time-stamp   | Fan PS 2T Fan Fault | State Asserted
+.RE
+.RS
+.PP 
+> ipmitool event "PS 2T Fan Fault" "State Deasserted"
+.br 
+Finding sensor PS 2T Fan Fault... ok
+.br 
+   0 | Pre-Init Time-stamp   | Fan PS 2T Fan Fault | State Desserted
+.RE
+.RS
+.PP 
+.RE
+.RE
+.TP 
+\fIexec\fP <\fBfilename\fR>
+
+.RS
+Execute ipmitool commands from \fIfilename\fR.  Each line is a
+complete command.  The syntax of the commands are defined by the
+COMMANDS section in this manpage.  Each line may have an optional
+comment at the end of the line, delimited with a `#' symbol.
+
+e.g., a command file with two lines:
+
+sdr list # get a list of sdr records
+.br 
+sel list # get a list of sel records
+.RE
+.TP 
+\fIfirewall\fP
+.br 
+
+This command supports the Firmware Firewall capability.  It may be used to 
+add or remove security-based restrictions on certain commands/command 
+sub-functions  or to list the current firmware firewall restrictions set on 
+any commands.  For each firmware firewall command listed below, parameters 
+may be included to cause the command to be executed with increasing 
+granularity on a specific LUN, for a specific NetFn, for a specific IPMI 
+Command, and finally for a specific command's sub-function (see Appendix H in the 
+IPMI 2.0 Specification for a listing of any sub-function numbers that may 
+be associated with a particular command).
+
+Parameter syntax and dependencies are as follows:
+
+[<\fIchannel\fP \fBH\fR>] [<\fIlun\fP \fBL\fR> [ <\fInetfn\fP \fBN\fR> [<\fIcommand\fP \fBC\fR [<\fIsubfn\fP \fBS\fR>]]]] 
+
+Note that if "netfn <\fBN\fR>" is specified, then "lun <\fBL\fR>" must also be 
+specified;  if "command <\fBC\fR>" is specified, then "netfn <\fBN\fR>" (and
+therefore "lun <\fBL\fR>") must also be specified, and so forth.
+
+"channel <\fBH\fR>" is an optional and standalone parameter.  If not specified,
+the requested operation will be performed on the current channel.  Note that
+command support may vary from channel to channel. 
+
+Firmware firewall commands:
+.RS
+.TP 
+\fIinfo\fP [<\fBParms as described above\fR>]
+.br 
+
+List firmware firewall information for the specified LUN, NetFn, and 
+Command (if supplied) on the current or specified channel.  Listed
+information includes the support, configurable, and enabled bits for
+the specified command or commands.
+
+Some usage examples:
+.RS
+.TP 
+\fIinfo\fP [<\fBchannel H\fR>] [<\fBlun L\fR>] 
+.br 
+
+This command will list firmware firewall information for all NetFns for the 
+specified LUN on either the current or the specified channel.
+.TP 
+\fIinfo\fP [<\fBchannel H\fR>] [<\fBlun L\fR> [ <\fBnetfn N\fR> ] 
+.br 
+
+This command will print out all command information for a single LUN/NetFn pair.
+.TP 
+\fIinfo\fP [<\fBchannel H\fR>] [<\fBlun L\fR> [ <\fBnetfn N\fR> [<\fBcommand C\fR] ]] 
+.br 
+
+This prints out detailed, human-readable information showing the support, configurable,
+and enabled bits for the specified command on the specified LUN/NetFn pair.  Information
+will be printed about each of the command subfunctions.
+.TP 
+\fIinfo\fP [<\fBchannel H\fR>] [<\fBlun L\fR> [ <\fBnetfn N\fR> [<\fBcommand C\fR [<\fBsubfn S\fR>]]]] 
+.br 
+
+Print out information for a specific sub-function.
+.RE
+.TP 
+\fIenable\fP [<\fBParms as described above\fR>]
+.br 
+
+This command is used to enable commands for a given NetFn/LUN combination on
+the specified channel. 
+.TP 
+\fIdisable\fP [<\fBParms as described above\fR>] [\fBforce\fR]
+.br 
+
+This command is used to disable commands for a given NetFn/LUN combination on
+the specified channel.   Great care should be taken if using the "force"
+option so as not to disable the "Set Command Enables" command.
+.TP 
+\fIreset\fP [<\fBParms as described above\fR>]
+.br 
+
+This command may be used to reset the firmware firewall back to a state
+where all commands and command sub-functions are enabled.
+.RE
+.TP 
+\fIfru\fP
+.RS
+.TP 
+\fIprint\fP
+.br 
+
+Read all Field  Replaceable  Unit (FRU) inventory data and extract 
+such information as serial number, part number, asset tags, and 
+short strings describing the chassis, board, or product.
+.TP 
+\fIread\fP <\fBfru id\fR> <\fBfru file\fR>
+.br 
+
+\fBfru id\fR is the digit ID of the FRU (see output of 'fru print').
+\fBfru file\fR is the absolute pathname of a file in which to dump the
+binary FRU data pertaining to the specified FRU entity.
+.TP 
+\fIwrite\fP <\fBfru id\fR> <\fBfru file\fR>
+.br 
+
+\fBfru id\fR is the digit ID of the FRU (see output of 'fru print').
+\fBfru file\fR is the absolute pathname of a file from which to pull
+the binary FRU data before uploading it to the specified FRU.
+.TP 
+\fIupgEkey\fP <\fBfru id\fR> <\fBfru file\fR>
+.br 
+
+Update a multirecord FRU location.
+\fBfru id\fR is the digit ID of the FRU (see output of 'fru print').
+\fBfru file\fR is the absolute pathname of a file from which to pull the
+binary FRU data to upload into the specified multirecord FRU entity.
+
+.TP 
+\fIedit\fP <\fBfru id\fR> 
+.br 
+
+This command provides interactive editing of some supported records, namely
+PICMG Carrier Activation Record.  \fBfru id\fR is the digit ID of the FRU 
+(see output of 'fru print'); default is 0.
+
+.TP 
+\fIedit\fP <\fBfru id\fR> \fBfield\fR <\fBsection\fR> <\fBindex\fR> <\fBstring\fR>
+.br 
+
+This command may be used to set a field string to a new value.  It replaces 
+the FRU data found at \fBindex\fR in the specified \fBsection\fR with the 
+supplied \fBstring\fR.  
+
+.RS
+.TP
+\fBfru id\fR is the digit ID of the FRU (see output of 'fru print').
+.br
+
+.TP
+<\fBsection\fR> is a string which refers to FRU Inventory Information
+Storage Areas and may be refer to:
+.RS
+.TP 
+\fIc\fP FRU Inventory Chassis Info Area
+.br
+.TP
+\fIb\fP FRU Inventory Board Info Area
+.br
+.TP
+\fIp\fP FRU Inventory Product Info Area
+.br
+.RE
+
+.TP
+<\fBindex\fR> specifies the field number. Field numbering starts on the first 'english text' field type. For instance in the <\fBboard\fR> info area field '0' is <\fBBoard Manufacturer\fR> and field '2' is <\fBBoard Serial Number\fR>; see IPMI Platform Management FRU Information Storage Definition v1.0 R1.1 for field locations.
+.br
+
+.TP
+<\fBstring\fR> must be the same length as the string being replaced and must be 8-bit ASCII (0xCx).
+.br
+
+.RE
+
+.TP 
+\fIedit\fP <\fBfru id\fR> \fBoem\fR \fBiana\fR <\fBrecord\fR> <\fBformat\fR> [<\fBargs\fR>]
+.br 
+
+This command edits the data found in the multirecord area. Support for
+OEM specific records is limited. 
+.RE
+.TP
+\fIfwum\fP
+.RS
+Update IPMC using Kontron OEM Firmware Update Manager.
+.TP
+\fIinfo\fR
+.br
+Show information about current firmware.
+
+.TP
+\fIstatus\fR
+.br
+Show status of each firmware bank present in the hardware.
+
+.TP
+\fIdownload\fP <\fBfilename\fR>
+.br
+
+Download specified firmware.
+
+.TP
+\fIupgrade\fP [\fBfilename\fR]
+.br
+
+Install firmware upgrade. If the filename is specified, the file is downloaded
+first, otherwise the last firmware downloaded is used.
+
+.TP
+\fIrollback\fP
+.br
+
+Ask IPMC to rollback to previous version.
+
+.TP
+\fItracelog\fP
+.br
+
+Show firmware upgrade log.
+
+.RE
+.TP 
+\fIgendev\fP
+.RS
+.TP 
+\fIlist\fP
+
+List All Generic Device Locators.
+.RS
+.RE
+.TP 
+\fIread\fP <\fBsdr name\fR> <\fBfile\fR>
+
+Read to file eeprom specify by Generic Device Locators.
+.RS
+.RE
+.TP
+\fIwrite\fP <\fBsdr name\fR> <\fBfile\fR>
+
+Write from file eeprom specify by Generic Device Locators
+.RS
+.RE
+.RE
+.TP
+\fIhpm\fP
+.RS
+PICMG HPM.1 Upgrade Agent
+.TP
+\fIcheck\fR
+.br
+Check the target information.
+
+.TP
+\fIcheck\fP <\fBfilename\fR>
+.br
+Display both the existing target version and image version on the screen.
+
+.TP
+\fIdownload\fP <\fBfilename\fR>
+.br
+
+Download specified firmware.
+
+.TP
+\fIupgrade\fP <\fBfilename\fR> [\fBall\fR] [\fBcomponent <x>\fR] [\fBactivate\fR]
+.br
+Upgrade the firmware using a valid HPM.1 image file. If no option is specified,
+the firmware versions are checked first and the firmware is upgraded only if they
+are different.
+
+.RS
+.TP
+\fIall\fR
+.br
+Upgrade all components even if the firmware versions are the same
+(use this only after using "check" command).
+
+.TP
+\fIcomponent\fP <\fBx\fR>
+.br
+Upgrade only given component from the given file.
+.br
+component 0 - BOOT
+.br
+component 1 - RTK
+
+.TP
+\fIactivate\fR
+.br
+Activate new firmware right away.
+
+.RE
+
+.TP
+\fIactivate\fR
+.br
+
+Activate the newly uploaded firmware.
+
+.TP
+\fItargetcap\fR
+.br
+
+Get the target upgrade capabilities.
+
+.TP
+\fIcompprop\fP <\fBid\fR> <\fBselect\fR>
+.br
+Get the specified component properties. Valid component \fBid\fR: 0-7.
+\fBSelect\fR can be one of following:
+.br
+0 - General properties
+.br
+1 - Current firmware version
+.br
+2 - Description string
+.br
+3 - Rollback firmware version
+.br
+4 - Deferred firmware version
+
+.TP
+\fIabort\fR
+.br
+
+Abort the on-going firmware upgrade.
+
+.TP
+\fIupgstatus\fR
+.br
+Show status of the last long duration command.
+
+.TP
+\fIrollback\fR
+.br
+Perform manual rollback on the IPM Controller firmware.
+
+.TP
+\fIrollbackstatus\fR
+.br
+
+Show the rollback status.
+
+.TP
+\fIselftestresult\fR
+.br
+
+Query the self test results.
+
+.RE
+.TP
+\fIi2c\fP <\fBi2caddr\fR> <\fBread bytes\fR> [<\fBwrite data\fR>]
+.br 
+
+This command may be used to execute raw I2C commands with the Master
+Write\-Read IPMI command.
+.RE
+.TP 
+\fIime\fP
+.RS
+.TP 
+\fIhelp\fP
+.br 
+
+Print usage information
+.TP 
+\fIinfo\fP
+
+Displays information about the Manageability Engine (ME)
+.TP 
+\fIupdate\fP <\fBfile\fR>
+.br
+
+Upgrade the ME firmware with the specified image file
+.br
+\fBWARNING\fR You MUST use a supported image provided by your board vendor
+.br
+.TP
+\fIrollback\fP
+
+Perform manual rollback of the ME firmware
+
+.RE
+.RE
+.TP 
+\fIisol\fP
+.RS
+.TP 
+\fIinfo\fP
+.br 
+
+Retrieve information about the Intel IPMI v1.5 Serial\-Over\-LAN
+configuration.
+.TP 
+\fIset\fP <\fBparameter\fR> <\fBvalue\fR>
+.br 
+
+Configure parameters for Intel IPMI v1.5 Serial\-over\-LAN.
+.RS
+.TP
+Valid parameters and values are:
+.br
+.TP
+\fIenabled\fP
+true, false.
+.TP
+\fIprivilege\-level\fP
+user, operator, admin, oem.
+.TP
+\fIbit\-rate\fP
+9.6, 19.2, 38.4, 57.6, 115.2.
+.RE
+.TP
+\fIactivate\fP
+.br
+
+Causes ipmitool to enter Intel IPMI v1.5 Serial Over LAN mode. An RMCP+
+connection is made to the BMC, the terminal is set to raw mode, and user
+input is sent to the serial console on the remote server. On exit, 
+the SOL payload mode is deactivated and the terminal is reset to its
+original settings.
+.RS
+
+Special escape sequences are provided to control the SOL session:
+.RS
+.TP
+\fI~.\fP        Terminate connection
+.TP
+\fI~^Z\fP       Suspend ipmitool
+.TP
+\fI~^X\fP       Suspend ipmitool, but don't restore tty on restart
+.TP
+\fI~B\fP        Send break
+.TP
+\fI~~\fP        Send the escape character by typing it twice
+.TP
+\fI~?\fP        Print the supported escape sequences
+.RE
+
+Note that escapes are only recognized immediately after newline.
+.RE
+.RE
+.TP 
+\fIkontronoem\fP
+.RS
+
+OEM commands specific to Kontron devices.
+.TP
+\fIsetsn\fP
+.br
+
+Set FRU serial number.
+.TP
+\fIsetmfgdate\fP
+.br
+
+Set FRU manufacturing date.
+.TP
+\fInextboot\fP <\fBboot device\fR>
+.br
+
+Select the next boot order on the Kontron CP6012.
+.RE
+.TP 
+\fIlan\fP
+.RS
+
+These commands will allow you to configure IPMI LAN channels
+with network information so they can be used with the ipmitool
+\fIlan\fP and \fIlanplus\fP interfaces.  \fINOTE\fR: To
+determine on which channel the LAN interface is located, issue
+the `channel info \fInumber\fR' command until you come across
+a valid 802.3 LAN channel.  For example:
+
+.br 
+> ipmitool \-I open channel info 1
+.br 
+Channel 0x1 info:
+.br 
+  Channel Medium Type   : 802.3 LAN
+  Channel Protocol Type : IPMB\-1.0
+  Session Support       : session\-based
+  Active Session Count  : 8
+  Protocol Vendor ID    : 7154
+
+.TP 
+\fIprint\fP [<\fBchannel\fR>]
+.br 
+
+Print the  current  configuration  for  the  given channel.
+The default will print information on the first found LAN channel.
+.TP 
+\fIset\fP <\fBchannel number\fR> <\fBcommand\fR> <\fBparameter\fR>
+.br 
+
+Set the given command and parameter on the specified channel.  Valid 
+command/parameter options are:
+.RS
+.TP 
+\fIipaddr\fP <\fBx.x.x.x\fR>
+.br 
+
+Set the IP address for this channel.
+.TP 
+\fInetmask\fP <\fBx.x.x.x\fR>
+.br 
+
+Set the netmask for this channel.
+.TP 
+\fImacaddr\fP <\fBxx:xx:xx:xx:xx:xx\fR>
+.br 
+
+Set the MAC address for this channel.
+.TP 
+\fIdefgw ipaddr\fP <\fBx.x.x.x\fR>
+.br 
+
+Set the default gateway IP address.
+.TP 
+\fIdefgw macaddr\fP <\fBxx:xx:xx:xx:xx:xx\fR>
+.br 
+
+Set the default gateway MAC address.
+.TP 
+\fIbakgw ipaddr\fP <\fBx.x.x.x\fR>
+.br 
+
+Set the backup gateway IP address.
+.TP 
+\fIbakgw macaddr\fP <\fBxx:xx:xx:xx:xx:xx\fR>
+.br 
+
+Set the backup gateway MAC address.
+.TP 
+\fIpassword\fP <\fBpass\fR>
+.br 
+
+Set the null user password.
+.TP 
+\fIsnmp\fP <\fBcommunity string\fR>
+.br 
+
+Set the SNMP community string.
+.TP 
+\fIuser\fP
+.br 
+
+Enable user access mode for userid 1 (issue the `user'
+command to display information about userids for a given channel).
+.TP 
+\fIaccess\fP <\fBon|off\fR>
+.br 
+
+Set LAN channel access mode.
+.TP 
+\fIalert\fP <\fBon|off\fR>
+.br 
+
+Enable or disable PEF alerting for this channel.
+.TP 
+\fIipsrc\fP <\fBsource\fR>
+.br 
+
+Set the IP address source:
+.br 
+\fInone\fP	unspecified
+.br 
+\fIstatic\fP	manually configured static IP address
+.br 
+\fIdhcp\fP	address obtained by BMC running DHCP
+.br 
+\fIbios\fP	address loaded by BIOS or system software
+.TP 
+\fIarp respond\fP <\fBon\fR|\fBoff\fR>
+.br 
+
+Set BMC generated ARP responses.
+.TP 
+\fIarp generate\fP <\fBon\fR|\fBoff\fR>
+.br 
+
+Set BMC generated gratuitous ARPs.
+.TP 
+\fIarp interval\fP <\fBseconds\fR>
+.br 
+
+Set BMC generated gratuitous ARP interval.
+.TP 
+\fIvlan id\fP <\fBoff\fR|\fBid\fR>
+.br 
+
+Disable VLAN operation or enable VLAN and set the ID.
+.br 
+ID: value of the virtual lan identifier between 1 and 4094 inclusive.
+.TP 
+\fIvlan priority\fP <\fBpriority\fR>
+.br 
+
+Set the priority associated with VLAN frames.
+.br 
+ID: priority of the virtual lan frames between 0 and 7 inclusive.
+.TP 
+\fIauth\fP <\fBlevel\fR,\fB...\fR> <\fBtype\fR,\fB...\fR>
+.br 
+
+Set the valid  authtypes  for  a  given  auth level.
+.br 
+Levels: callback, user, operator, admin
+.br 
+Types: none, md2, md5, password, oem
+.TP 
+\fIcipher_privs\fP <\fBprivlist\fR>
+.br 
+
+Correlates cipher suite numbers with the maximum privilege
+level that is allowed to use it.  In this way, cipher suites can restricted
+to users with a given privilege level, so that, for example,
+administrators are required to use a stronger cipher suite than
+normal users.
+
+The format of \fIprivlist\fR is as follows.  Each character represents
+a privilege level and the character position identifies the cipher
+suite number.  For example, the first character represents cipher
+suite 0, the second represents cipher suite 1, and so on.
+\fIprivlist\fR must be 15 characters in length.
+
+Characters used in \fIprivlist\fR and their associated privilege levels are:
+
+\fIX\fP	Cipher Suite Unused
+.br 
+\fIc\fP	CALLBACK
+.br 
+\fIu\fP	USER
+.br 
+\fIo\fP	OPERATOR
+.br 
+\fIa\fP	ADMIN
+.br 
+\fIO\fP	OEM
+.br 
+
+So, to set the maximum privilege for cipher suite 0 to USER and suite 1 to
+ADMIN, issue the following command:
+
+> ipmitool \-I \fIinterface\fR lan set \fIchannel\fR cipher_privs uaXXXXXXXXXXXXX
+
+.TP
+
+\fIbad_pass_thresh\fP <\fBthresh_num\fR> <\fB1|0\fR> <\fBreset_interval\fR> <\fBlockout_interval\fR>
+.br
+
+Sets the Bad Password Threshold.
+
+<\fBthresh_num\fR> If non-zero, this value determines the number of sequential bad passwords
+that will be allowed to be entered for the identified user before the user is automatically
+disabled from access on the channel.
+
+<\fB1|0\fR> 1 = generate a Session Audit sensor "Invalid password disable" event message.
+0 = do not generate an event message when the user is disabled.
+
+<\fBreset_interval\fR> Attempt Count Reset Interval. The interval, in tens of seconds, for
+which the accumulated count of bad password attempts is retained before being automatically
+reset to zero.
+
+<\fBlockout_interval\fR> User Lockout Interval. The interval, in tens of seconds, that the user
+will remain disabled after being disabled because the Bad Password Threshold number was reached.
+
+.RE
+.TP
+\fIalert\fP \fIprint\fP [<\fBchannel\fR>] [<\fBalert destination\fR>]
+.br 
+
+Print alert information for the specified channel and destination.  
+The default will print all alerts for all alert destinations on the 
+first found LAN channel.
+
+.TP
+\fIalert\fP \fIset\fP <\fBchannel number\fR> <\fBalert destination\fR> <\fBcommand\fR> <\fBparameter\fR>
+.br 
+
+Set an alert on the given LAN channel and destination.   Alert Destinations are
+listed via the '\fIlan alert print\fP' command.  Valid command/parameter options are:
+.RS
+.TP 
+\fIipaddr\fP <\fBx.x.x.x\fR>
+.br 
+
+Set alert IP address.
+.TP 
+\fImacaddr\fP <\fBxx:xx:xx:xx:xx:xx\fR>
+.br 
+
+Set alert MAC address.
+.TP 
+\fIgateway\fP <\fBdefault | backup\fR>
+.br 
+
+Set the channel gateway to use for alerts.
+.TP 
+\fIack\fP <\fBon | off\fR>
+.br 
+
+Set Alert Acknowledge on or off.
+.TP 
+\fItype\fP <\fBpet | oem1 | oem2\fR>
+.br 
+
+Set the destination type as PET or OEM.
+.TP 
+\fItime\fP <\fBseconds\fR>
+.br 
+
+Set ack timeout or unack retry interval.
+.TP 
+\fIretry\fP <\fBnumber\fR>
+.br 
+
+Set the number of alert retries.
+.RE
+.TP
+\fIstats\fP \fIget\fP [<\fBchannel number\fR>]
+.br 
+
+Retrieve information about the IP connections on the specified channel.
+The default will retrieve statistics on the first found LAN channel.
+.TP
+\fIstats\fP \fIclear\fP [<\fBchannel number\fR>]
+.br 
+
+Clear all IP/UDP/RMCP Statistics to 0 on the specified channel.
+The default will clear statistics on the first found LAN channel.
+.RE
+.TP 
+\fImc | bmc\fP
+.RS
+.TP 
+\fIreset\fP <\fBwarm\fR|\fBcold\fR>
+.br 
+
+Instructs the BMC to perform a warm or cold reset.
+.TP 
+\fIguid\fP
+
+Display the Management Controller Globally Unique IDentifier.
+.TP 
+\fIinfo\fP
+.br
+
+Displays information about the BMC hardware, including device
+revision, firmware revision, IPMI version supported, manufacturer ID,
+and information on additional device support.
+.TP 
+\fIwatchdog\fP
+.br 
+
+These commands allow a user to view and change the current 
+state of the watchdog timer.
+.RS
+.TP 
+\fIget\fP
+.br
+
+Show current Watchdog Timer settings and countdown state.
+.TP 
+\fIreset\fP
+.br
+
+Reset the Watchdog Timer to its most recent state and restart the 
+countdown timer.
+.TP 
+\fIoff\fP
+.br
+
+Turn off a currently running Watchdog countdown timer.
+.RE
+.TP 
+\fIselftest\fP
+.br 
+
+Check on the basic health of the BMC by executing the Get Self Test
+results command and report the results.
+.TP 
+\fIgetenables\fP
+.br 
+
+Displays a list of the currently enabled options for the BMC.
+.br 
+.TP 
+\fIsetenables\fP <\fBoption\fR>=[\fIon\fP|\fIoff\fP]
+.br 
+
+Enables or disables the given \fIoption\fR.  This command is
+only supported over the system interface according to the IPMI
+specification.  Currently supported values for \fIoption\fR include:
+.RS
+.TP 
+\fIrecv_msg_intr\fP
+.br 
+
+Receive Message Queue Interrupt
+.TP 
+\fIevent_msg_intr\fP
+.br 
+
+Event Message Buffer Full Interrupt
+.TP 
+\fIevent_msg\fP
+.br 
+
+Event Message Buffer
+.TP 
+\fIsystem_event_log\fP
+.br 
+
+System Event Logging
+.TP 
+\fIoem0\fP
+.br 
+
+OEM\-Defined option #0
+.TP 
+\fIoem1\fP
+.br 
+
+OEM\-Defined option #1
+.TP 
+\fIoem2\fP
+.br 
+
+OEM\-Defined option #2
+
+.RE
+.TP
+\fIgetsysinfo\fP <\fBargument\fP>
+Retrieves system info from bmc for given argument.
+.br
+See \fIsetsysinfo\fP for argument definitions
+.TP
+\fIsetsysinfo\fP  <\fBargument\fP> <\fBstring\fP>
+Stores system info string to bmc for given argument
+.RS
+.TP
+Possible arguments are:
+.RS
+.TP
+\fIprimary_os_name\fP     Primary Operating System Name
+.TP
+\fIos_name\fP             Operating System Name
+.TP
+\fIsystem_name\fP         System Name of Server
+.TP
+\fIdelloem_os_version\fP Running version of operating system
+.TP
+\fIdelloem_URL\fP        URL of BMC Webserver
+.RE
+.RE
+.TP 
+\fIchassis\fP
+.RS
+.TP 
+\fIstatus\fP
+.br 
+
+Displays information regarding the high\-level
+status of the system chassis and main power
+subsystem.
+.TP 
+\fIpoh\fP
+.br 
+
+This command will return the Power\-On Hours counter.
+.TP 
+\fIidentify\fP <\fBinterval\fR>
+
+Control the front panel identify  light.   Default interval
+is 15 seconds.  Use 0 to turn off.  Use "force" to turn on 
+indefinitely.
+.TP 
+\fIrestart_cause\fP
+.br 
+
+Query the chassis for the cause of the last system restart.
+.TP 
+\fIselftest\fP
+.br 
+
+Check on the basic health of the BMC by executing the Get Self Test
+results command and report the results.
+.TP 
+\fIpolicy\fP
+.br 
+
+Set the chassis power policy in  the  event  power failure.
+.RS
+.TP 
+\fIlist\fP
+.br 
+
+Return supported policies.
+.TP 
+\fIalways\-on\fP
+.br 
+
+Turn on when power is restored.
+.TP 
+\fIprevious\fP
+.br 
+
+Returned to  previous  state  when  power  is restored.
+.TP 
+\fIalways\-off\fP
+.br 
+
+Stay off after power is restored.
+.RE
+.TP 
+\fIpower\fP
+.br 
+
+Performs a chassis control  command  to  view  and
+change the power state.
+.RS
+.TP 
+\fIstatus\fP
+.br 
+
+Show current chassis power status.
+.TP 
+\fIon\fP
+.br 
+
+Power up chassis.
+.TP 
+\fIoff\fP
+.br 
+
+Power down chassis into soft off (S4/S5 state).
+\fBWARNING\fR: This command does not initiate a clean 
+shutdown of the operating system prior to powering down the system.
+.TP 
+\fIcycle\fP
+.br 
+
+Provides a power off interval of at least 1 second.  No action
+should occur if chassis power is in S4/S5 state, but it is
+recommended to check power state first and only issue a power
+cycle command if the  system  power is on or in lower sleep
+state than S4/S5.
+.TP 
+\fIreset\fP
+.br 
+
+This command will perform a hard reset.
+.TP 
+\fIdiag\fP
+.br 
+
+Pulse a diagnostic interrupt (NMI) directly to the processor(s).
+.TP 
+\fIsoft\fP
+.br 
+
+Initiate a soft\-shutdown of OS via ACPI.  This can be done in a
+number of ways, commonly by simulating an overtemperture or by
+simulating a power button press.  It is necessary for there to
+be Operating System support for ACPI and some sort of daemon
+watching for events for this soft power to work.
+.RE
+.TP 
+\fIbootdev\fP <\fBdevice\fR> [<\fIclear\-cmos\fP=\fByes\fR|\fBno\fR>] [<\fIoptions\fP=\fBhelp,...\fR>]
+.br 
+
+Request the system to boot from an alternate boot device on next reboot.
+The \fIclear\-cmos\fP option, if supplied, will instruct the BIOS to
+clear its CMOS on the next reboot.  Various options may be used to modify 
+the boot device settings.  Run \fI"bootdev none options=help"\fP for a list of 
+available boot device modifiers/options.  
+
+.RS
+.TP 
+Currently supported values for <device> are:
+.TP 
+\fInone\fP
+.br 
+
+Do not change boot device
+.TP 
+\fIpxe\fP
+.br 
+
+Force PXE boot
+.TP 
+\fIdisk\fP
+.br 
+
+Force boot from BIOS default boot device
+.TP 
+\fIsafe\fP
+.br 
+
+Force boot from BIOS default boot device, request Safe Mode
+.TP 
+\fIdiag\fP
+.br 
+
+Force boot from diagnostic partition
+.TP 
+\fIcdrom\fP
+.br 
+
+Force boot from CD/DVD
+.TP 
+\fIbios\fP
+.br 
+
+Force boot into BIOS setup
+.TP 
+\fIfloppy\fP
+.br 
+
+Force boot from Floppy/primary removable media
+.RE
+.TP 
+\fIbootparam\fP
+.br 
+
+Get or set various system boot option parameters.
+.RS
+.TP 
+\fIget\fP <\fBparam #\fR>
+.br 
+
+Get boot parameter. Currently supported values for <\fBparam #\fR> are:
+
+\fI0\fP - Set In Progress
+
+\fI1\fP - Service Partition Selector
+
+\fI2\fP - Service Partition Scan
+
+\fI3\fP - BMC Boot Flag Valid Bit Clearing
+
+\fI4\fP - Boot Info Acknowledge 
+
+\fI5\fP - Boot Flags
+
+\fI6\fP - Boot Initiator Info
+
+\fI7\fP - Boot Initiator Mailbox
+.br 
+
+.TP 
+\fIset\fP <\fBdevice\fR> [<\fIoptions\fP=\fBhelp,...\fR>]
+.br 
+
+Set boot device parameter used for next boot.  Various options may be used
+to change when the the next boot device is cleared.
+Run \fI"options=help"\fP for a list of available bootparam set device options.
+
+.RS
+.TP 
+Currently supported bootparam \fBdevice\fR settings are:
+.TP 
+\fIforce_pxe\fP
+.br 
+
+Force PXE boot
+.TP 
+\fIforce_disk\fP
+.br 
+
+Force boot from default hard-drive
+.TP 
+\fIforce_safe\fP
+.br 
+
+Force boot from default hard-drive, request Safe Mode
+.TP 
+\fIforce_diag\fP
+.br 
+
+Force boot from diagnostic partition
+.TP 
+\fIforce_cdrom\fP
+.br 
+
+Force boot from CD/DVD 
+.TP 
+\fIforce_bios\fP
+.br 
+
+Force boot into BIOS setup
+
+.RE
+.RS
+.TP 
+Currently supported bootparam \fBoptions\fR settings are associated with BMC Boot Valid Bit Clearing and are as follows:   Any option can be prefixed with "no-" to invert the sense of the operation.
+.TP 
+\fIPEF\fP
+.br 
+
+Clear valid bit on reset/power cycle caused by PEF
+.TP 
+\fItimeout\fP
+.br 
+
+Automatically clear boot flag valid bit if Chassis Control command is
+not received within 60 seconds.
+.TP 
+\fIwatchdog\fP
+.br 
+
+Clear valid bit on reset/power cycle caused by watchdog timeout
+.TP 
+\fIreset\fP
+.br 
+
+Clear valid bit on push button reset / soft-reset
+.TP 
+\fIpower\fP
+.br 
+
+Clear valid bit on power up via power push button or wake event
+
+.RE
+.RE
+.RE
+.RE
+.TP
+\fInm\fP
+.RS
+.TP
+\fIalert\fP
+.RS
+.TP
+\fIclear dest\fP <\fBdest\fR>
+.br
+
+Clear the Node Manager Alert lan destination.
+
+.RE
+.RS
+.TP
+\fIget\fP
+.br
+Get the Node Manager Alert settings.
+
+.RE
+.RS
+.TP
+\fIset chan\fP <\fBchan\fR> \fIdest\fP <\fBdest\fR> \fIstring\fP <\fBstring\fR>
+.br
+
+Set the Node Manager alert channel, lan destination, and alert string number.
+
+.RE
+.TP
+\fIcapability\fP
+.br
+
+Obtain the Node Manager power control capabilities and ranges.
+
+.TP
+\fIcontrol\fP
+.RS
+.TP
+\fIenable\fP|\fIdisable \fP
+.RS
+.TP
+\fIglobal\fP
+.br
+
+Enable/disable all policies for all domains.
+.TP
+\fIper_domain\fP <platform|CPU|Memory>
+.br
+
+Enable/disable all policies of the specified domain.
+.TP
+\fIper_policy\fP <0-7>
+.br
+
+Enable/disable the policy for the specified domain/policy combination.
+.RE
+.RE
+.TP
+\fIdiscover\fP
+.br
+
+Discover Node Manager presence as well as the Node Manager version, revision, and patch number.
+
+.TP
+\fIpolicy\fP
+.RS
+.TP
+\fIadd\fP
+.RS
+.TP
+\fIpower\fP <watts> \fIpolicy_id\fP <0-7> [\fIcorrection\fP auto|soft|hard] \fItrig_lim\fP <seconds> \fIstats\fP <seconds> [\fIdomain\fP <platform|CPU|Memory>] \fIenable\fP|\fIdisable\fP
+.br
+
+Add a new power policy, or overwrite an existing policy.
+The \fIcorrection\fP parameter is the agressiveness of frequency limiting, default is auto.
+The \fItrig_lim\fP is the correction time limit and must be at least 6000 and not greater than 65535.
+The \fIstats\fP setting is the averaging period in seconds and ranges from 1-65535.
+If domain is not supplied a default of platform is used.
+
+
+.TP
+\fIinlet\fP <temp> \fIpolicy_id\fP <0-7> [\fIcorrection\fP auto|soft|hard] \fItrig_lim\fP <seconds> \fIstats\fP <seconds> [\fIdomain\fP <platform|CPU|Memory>] \fIenable\fP|\fIdisable\fP
+.br
+
+Add a new inlet temp policy, or overwrite an existing policy.
+The \fIcorrection\fP parameter is the agressiveness of frequency limiting, default is auto.
+The \fItrig_lim\fP is the correction time limit and must be at least 6000 and not greater than 65535.
+The \fIstats\fP setting is the averaging period in seconds and ranges from 1-65535.
+If domain is not supplied a default of platform is used.
+
+
+.RE
+.TP
+\fIget\fP \fIpolicy_id\fP <0-7>
+.br
+
+Get a previously stored policy.
+.TP
+\fIlimiting\fP
+.br
+
+Report policy number if any policy is limiting power.
+.TP
+\fIremove\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Remove a policy. If domain is not supplied a default of platform is used.
+.RE
+.TP
+\fIpower\fP \fImin\fP <minimum> \fImax\fP <maximum> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Configure Node Manager power minimum and maximum power draw limits.
+The \fImin\fP and \fImax\fP values must be in the range of 0-65535.
+If domain is not supplied a default of platform is used.
+
+.RE
+.RS
+.TP
+\fIreset\fP
+.RS
+.TP
+\fIcomm\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Reset Node Manager communication statistics.
+If domain is not supplied a default of platform is used.
+
+.TP
+\fIglobal\fI 
+.br
+
+Reset Node Manager global statistics.
+
+.TP
+\fImemory\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Reset Node Manager memory throttling statistics.
+If domain is not supplied a default of platform is used.
+
+.TP
+\fIper_policy\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Reset Node Manager per policy statistics.
+If domain is not supplied a default of platform is used.
+
+.TP
+\fIrequests\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Reset Node Manager unhandled requests statistics.
+If domain is not supplied a default of platform is used.
+
+.TP
+\fIresponse\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Reset Node Manager response time statistics.
+If domain is not supplied a default of platform is used.
+
+.TP
+\fIthrottling\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Reset Node Manager throttling statistics.
+If domain is not supplied a default of platform is used.
+
+.RE
+.TP
+\fIstatistics\fP
+.RS
+.TP
+\fIcomm_fail\fP
+.br
+
+Report Node Manager communication failure statistics.
+
+.TP
+\fIcpu_throttling\fP
+.br
+
+Report Node Manager cpu throttling statistics.
+
+.TP
+\fImem_throttling\fP
+.br
+
+Report Node Manager memory throttling statistics.
+
+.TP
+\fIpolicy_power\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Report Node Manager per policy power statistics (policy must be a power limit type policy).
+If domain is not supplied a default of platform is used.
+
+.TP
+\fIpolicy_temps\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Report Node Manager per policy temp statistics (policy must be an inlet temp limit policy).
+If domain is not supplied a default of platform is used.
+
+.TP
+\fIpolicy_throt\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Report Node Manager per policy throttling statistics.
+If domain is not supplied a default of platform is used.
+
+.TP
+\fIrequests\fP
+.br
+
+Report Node Manager unhandled requests statistics.
+
+.TP
+\fIresponse\fP
+.br
+
+Report Node Manager response time statistics.
+
+.RE
+.TP
+\fIsuspend\fP
+.RS
+.TP
+\fIget\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Get Node Manager policy suspend periods.
+If domain is not supplied a default of platform is used.
+
+.TP
+\fIset\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>] <start> <stop> <repeat>
+.br
+
+Set Node Manager policy suspend periods.
+If domain is not supplied a default of platform is used.
+The <start> and <stop> values must be in the range of 0-239, which is the number of minutes past midnight divided by 6.
+The <repeat> value is the daily recurrence pattern. Bit 0 is repeat every Monday, bit 1 is repeat every Tuesday, on through bit 6 for Sunday.
+
+.RE
+.TP
+\fIthreshold\fP
+.RS
+.TP
+\fIget\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>]
+.br
+
+Get Node Manager policy Alert Threshold settings.
+If domain is not supplied a default of platform is used.
+
+.TP
+\fIset\fP \fIpolicy_id\fP <0-7> [\fIdomain\fP <platform|CPU|Memory>] \fIthresh_array\fP
+.br
+
+Set Node Manager policy Alert Threshold values.
+If domain is not supplied a default of platform is used.
+The \fIthresh_array\fP is 1, 2, or 3 integers that set three alert threshold settings. The setting type is a power or temperature value which must match the type of policy.
+
+.RE
+.RE
+
+.TP 
+\fIpef\fP
+.RS
+.TP 
+\fIinfo\fP
+.br 
+
+This command will query the BMC and print information about the PEF 
+supported features.
+.TP 
+\fIstatus\fP
+.br 
+
+This command prints the current PEF status (the last SEL entry 
+processed by the BMC, etc).
+.TP 
+\fIpolicy\fP
+.br 
+
+This command lists the PEF policy table entries.  Each policy 
+entry describes an alert destination.  A policy set is a 
+collection of table entries.  PEF alert actions reference policy sets.
+.TP 
+\fIlist\fP
+.br 
+
+This command lists the PEF table entries.  Each PEF entry 
+relates a sensor event to an action.  When PEF is active, 
+each platform event causes the BMC to scan this table for 
+entries matching the event, and possible actions to be taken.
+Actions are performed in priority order (higher criticality first).
+.RE
+.TP 
+\fIpicmg\fP <\fBproperties\fR> 
+.RS
+
+Run a PICMG/ATA extended command. Get PICMG properties may be used to
+obtain and print Extension major version information, PICMG identifier,
+FRU Device ID and Max FRU Device ID.
+.TP 
+\fIaddrinfo\fP
+.br 
+
+Get address information.  This command may return information on the Hardware
+address, IPMB-0 Address, FRU ID, Site/Entity ID, and Site/Entity Type.
+.TP 
+\fIfrucontrol\fP <\fBfru id\fR> <\fBoptions\fR>
+.br 
+
+Set various control options:
+.RS
+.TP 
+\fI0x00\fP      - Cold Reset
+.br 
+.TP 
+\fI0x01\fP      - Warm Reset
+.br 
+.TP 
+\fI0x02\fP      - Graceful Reboot
+.br 
+.TP 
+\fI0x03\fP      - Issue Diagnostic Interrupt
+.br 
+.TP 
+\fI0x04\fP      - Quiesce [AMC only]
+.br 
+.TP 
+\fI0x05-0xFF\fP - Cold Reset
+.br 
+.RE
+.TP 
+\fIactivate\fP <\fBfru id\fR>
+.br 
+
+Activate the specified FRU.
+.TP 
+\fIdeactivate\fP <\fBfru id\fR>
+.br 
+
+Deactivate the specified FRU.
+.TP 
+\fIpolicy\fP \fIget\fP <\fBfru id\fR>
+.br 
+
+Get FRU activation policy.
+.TP 
+\fIpolicy\fP \fIset\fP <\fBfru id\fR> <\fBlockmask\fR> <\fBlock\fR>
+.br 
+
+Set FRU activation policy.  \fBlockmask\fR is 1 or 0 to indicate action
+on the deactivation or activation locked bit respectively.  \fBlock\fR is
+1 or 0 to set/clear locked bit.
+.TP 
+\fIportstate\fP \fBset\fR|\fBgetall\fR|\fBgetgranted\fR|\fBgetdenied\fR <\fBparameters\fR> 
+.br 
+Get or set various port states.  See usage for parameter details.
+.RE
+.TP 
+\fIpower\fP <\fBchassis power command\fR>
+.br 
+
+Shortcut to the \fIchassis power\fP commands.
+See the \fIchassis power\fP commands for usage information.
+.RE
+.TP 
+\fIraw\fP <\fBnetfn\fR> <\fBcmd\fR> [<\fBdata\fR>]
+.br 
+
+This will allow you to execute raw IPMI commands.   For
+example to query the POH counter with a raw command:
+
+> ipmitool \-v raw 0x0 0xf
+.br 
+RAW REQ (netfn=0x0 cmd=0xf data_len=0)
+.br 
+RAW RSP (5 bytes)
+.br 
+3c 72 0c 00 00
+
+\fBNote\fR that the OpenIPMI driver provided by the Linux kernel will reject the Get Message, Send Message and Read Event Message Buffer commands because it handles the message sequencing internally.
+.RE
+.TP 
+\fIsdr\fP
+.RS
+.TP 
+\fIget\fP <\fBid\fR> ... [<\fBid\fR>]
+.br 
+
+Prints information for sensor data records specified by sensor id.
+.TP 
+\fIinfo\fP
+.br 
+
+This command will query the BMC for Sensor Data Record (SDR) Repository information.
+.TP 
+\fItype\fP [<\fBsensor type\fP>]
+
+This command will display all records from the SDR Repository of a specific type.
+Run with type \fIlist\fP (or simply with no type) to see the list of available types.
+For example to query for all Temperature sensors:
+
+> ipmitool sdr type Temperature
+.br 
+Baseboard Temp   | 30h | ok  |  7.1 | 28 degrees C
+.br 
+FntPnl Amb Temp  | 32h | ok  | 12.1 | 24 degrees C
+.br 
+Processor1 Temp  | 98h | ok  |  3.1 | 57 degrees C
+.br 
+Processor2 Temp  | 99h | ok  |  3.2 | 53 degrees C
+
+.TP 
+\fIlist\fP | \fIelist\fP [<\fBall\fR|\fBfull\fR|\fBcompact\fR|\fBevent\fR|\fBmcloc\fR|\fBfru\fR|\fBgeneric\fR>]
+.br 
+
+This command will read the Sensor Data Records (SDR) and extract sensor
+information of a given type,  then query each sensor and print its name,
+reading, and status.  If invoked as \fIelist\fP then it will also print
+sensor number, entity id and instance, and asserted discrete states.
+
+The default output will only display \fIfull\fP and \fIcompact\fP sensor
+types, to see all sensors use the \fIall\fP type with this command.
+.RS
+.TP 
+Valid types are:
+.RS
+.TP 
+\fIall\fP
+.br 
+
+All SDR records (Sensor and Locator) 
+.TP 
+\fIfull\fP
+.br 
+
+Full Sensor Record
+.TP 
+\fIcompact\fP
+.br 
+
+Compact Sensor Record
+.TP 
+\fIevent\fP
+.br 
+
+Event\-Only Sensor Record
+.TP 
+\fImcloc\fP
+.br 
+
+Management Controller Locator Record
+.TP 
+\fIfru\fP
+.br 
+
+FRU Locator Record
+.TP 
+\fIgeneric\fP
+.br 
+
+Generic SDR records
+.RE
+.RE
+.TP 
+\fIentity\fP <\fBid\fR>[.<\fBinstance\fR>]
+.br 
+
+Displays all sensors associated with an entity.  Get a list of
+valid entity ids on the target system by issuing the \fIsdr elist\fP command.
+A list of all entity ids can be found in the IPMI specifications.
+.TP 
+\fIdump\fP <\fBfile\fR>
+.br 
+
+Dumps raw SDR data to a file.  This data file can then be used as
+a local SDR cache of the remote managed system with the \fI\-S <file>\fP
+option on the ipmitool command line.  This can greatly improve performance
+over system interface or remote LAN.
+.TP 
+\fIfill\fP \fIsensors\fP
+.br 
+
+Create the SDR Repository for the current configuration.  Will perform
+a 'Clear SDR Repository' command so be careful.
+.TP 
+\fIfill\fP \fIfile\fP <\fBfilename\fR>
+.br 
+
+Fill the SDR Repository using records stored in a binary data file. Will perform
+a 'Clear SDR Repository' command so be careful.
+.RE
+.TP 
+\fIsel\fP
+.br 
+
+NOTE: System Event Log (SEL) entry\-times are displayed as 
+`Pre\-Init Time\-stamp' if the SEL clock needs to be set.
+Ensure that the SEL clock is accurate by invoking the
+\fIsel time get\fP and
+\fIsel time set <time string>\fP commands.
+.RS
+.TP 
+\fIinfo\fP
+.br 
+
+This command will query the BMC for information
+about the System Event Log (SEL) and its contents.
+.TP 
+\fIclear\fP
+.br 
+
+This command will clear the contents of the SEL.
+It cannot be undone so be careful.
+.TP 
+\fIlist\fP | \fIelist\fP
+.br 
+
+When this command is invoked without arguments, the entire
+contents of the System Event Log are displayed.  If invoked as
+\fIelist\fP (extended list) it will also use the Sensor Data 
+Record entries to display the sensor ID for the sensor that caused 
+each event.  \fBNote\fR this can take a long time over the 
+system interface.
+
+.RS
+.TP 
+<\fBcount\fR> | \fIfirst\fP <\fBcount\fR>
+.br 
+
+Displays the first \fIcount\fR (least\-recent) entries in the SEL.
+If \fIcount\fR is zero, all entries are displayed.
+.TP 
+\fIlast\fP <\fBcount\fR>
+.br 
+
+Displays the last \fIcount\fR (most\-recent) entries in the SEL.
+If \fIcount\fR is zero, all entries are displayed.
+.RE
+.TP          
+\fIdelete\fP <\fBSEL Record ID\fR> ... <\fBSEL Record ID\fR>
+.br 
+
+Delete one or more SEL event records.
+.TP 
+\fIadd\fP <\fBfilename ID\fR>
+.br 
+
+Read event entries from a file and add them to the SEL.  New SEL
+entries area added onto the SEL after the last record in the SEL.
+Record added is of type 2 and is automatically timestamped.
+.TP 
+\fIget\fP <\fBSEL Record ID\fR>
+.br 
+
+Print information on the specified SEL Record entry.
+.TP 
+\fIsave\fP <\fBfile\fR>
+
+Save SEL records to a text file that can be fed back into the
+\fIevent file\fP ipmitool command.  This can be useful for
+testing Event generation by building an appropriate Platform
+Event Message file based on existing events.  Please see the
+available help for the 'event file ...' command for a description of
+the format of this file.
+.TP 
+\fIwriteraw\fP <\fBfile\fR>
+
+Save SEL records to a file in raw, binary format.  This file can
+be fed back to the \fIsel readraw\fP ipmitool command for viewing.
+.TP 
+\fIreadraw\fP <\fBfile\fR>
+
+Read and display SEL records from a binary file.  Such a file can
+be created using the \fIsel writeraw\fP ipmitool command.
+.TP          
+\fItime\fP
+.RS
+.TP 
+\fIget\fP
+.br 
+Displays the SEL clock's current time.
+.TP 
+\fIset\fP <\fBtime string\fR>
+.br 
+
+Sets the SEL clock.  Future SEL entries will use the time
+set by this command.  <\fBtime string\fR> is of the
+form "MM/DD/YYYY HH:MM:SS".  Note that hours are in 24\-hour
+form.  It is recommended that the SEL be cleared before
+setting the time.
+.RE
+.RE
+.TP 
+\fIsensor\fP
+.RS
+.TP 
+\fIlist\fP
+.br 
+
+Lists sensors and thresholds in a wide table format.
+.TP 
+\fIget\fP <\fBid\fR> ... [<\fBid\fR>]
+.br 
+
+Prints information for sensors specified by name.
+.TP 
+\fIthresh\fP <\fBid\fR> <\fBthreshold\fR> <\fBsetting\fR>
+.br 
+
+This allows you to set a particular sensor threshold 
+value.  The sensor is specified by name.
+.RS
+.TP 
+Valid \fIthresholds\fP are:
+.br 
+\fIunr\fP	Upper Non\-Recoverable
+.br 
+\fIucr\fP	Upper Critical
+.br 
+\fIunc\fP	Upper Non\-Critical
+.br 
+\fIlnc\fP	Lower Non\-Critical
+.br 
+\fIlcr\fP	Lower Critical
+.br 
+\fIlnr\fP	Lower Non\-Recoverable
+.RE
+.TP 
+\fIthresh\fP <\fBid\fR> \fIlower\fP <\fBlnr\fR> <\fBlcr\fR> <\fBlnc\fR>
+
+This allows you to set all lower thresholds for a sensor at the same time.
+The sensor is specified by name and the thresholds are listed in order of
+Lower Non\-Recoverable, Lower Critical, and Lower Non\-Critical.
+.TP 
+\fIthresh\fP <\fBid\fR> \fIupper\fP <\fBunc\fR> <\fBucr\fR> <\fBunr\fR>
+
+This allows you to set all upper thresholds for a sensor at the same time.
+The sensor is specified by name and the thresholds are listed in order of
+Upper Non\-Critical, Upper Critical, and Upper Non\-Recoverable.
+.RE
+.TP 
+\fIsession\fP
+.RS
+.TP 
+\fIinfo\fP <\fBactive\fR|\fBall\fR|\fBid 0xnnnnnnnn\fR|\fBhandle 0xnn\fR>
+.br 
+
+Get information about the specified session(s).  You may identify
+sessions by their id, by their handle number, by their active status,
+or by using the keyword `all' to specify all sessions.
+.RE
+.TP
+\fIset\fP
+.RS
+.TP
+\fIhostname\fP <\fBhost\fR>
+
+Session hostname.
+.RS
+.RE
+.TP
+\fIusername\fP <\fBuser\fR>
+
+Session username.
+.RS
+.RE
+.TP
+\fIpassword\fP <\fBpass\fR>
+
+Session password.
+.RS
+.RE
+.TP
+\fIprivlvl\fP <\fBlevel\fR>
+
+Session privilege level force.
+.RS
+.RE
+.TP
+\fIauthtype\fP <\fBtype\fR>
+
+Authentication type force.
+.RS
+.RE
+.TP
+\fIlocaladdr\fP <\fBaddr\fR>
+
+Local IPMB address.
+.RS
+.RE
+.TP
+\fItargetaddr\fP <\fBaddr\fR>
+
+Remote target IPMB address.
+.RS
+.RE
+.TP
+\fIport\fP <\fBport\fR>
+
+Remote RMCP port.
+.RS
+.RE
+.TP
+\fIcsv\fP [\fBlevel\fR]
+
+Enable output in comma separated format.
+Affects following commands:
+\fIuser\fP, \fIchannel\fP, \fIisol\fP, \fIsunoem\fP,
+\fIsol\fP, \fIsensor\fP, \fIsdr\fP, \fIsel\fP, \fIsession\fP.
+.RS
+.RE
+.TP
+\fIverbose\fP [\fBverbose\fR]
+
+Verbosity level.
+.RS
+.RE
+.RE
+.TP 
+\fIshell\fP
+.RS
+This command will launch an interactive shell which you can use
+to send multiple ipmitool commands to a BMC and see the responses.
+This can be useful instead of running the full ipmitool command each
+time.  Some commands will make use of a Sensor Data Record cache
+and you will see marked improvement in speed if these commands
+are able to reuse the same cache in a shell session.  LAN sessions
+will send a periodic keepalive command to keep the IPMI session
+from timing out.
+.RE
+.TP 
+\fIsol\fP
+.RS
+.TP 
+\fIinfo\fP [<\fBchannel number\fR>]
+.br 
+
+Retrieve information about the Serial\-Over\-LAN configuration on 
+the specified channel.  If no channel is given, it will display 
+SOL configuration data for the currently used channel.
+.TP 
+\fIpayload\fP <\fIenable\fP | \fIdisable\fP | \fIstatus\fP> <\fBchannel number\fR> <\fBuserid\fR>
+.br 
+
+Enable, disable or show status of SOL payload for the user on the specified channel. 
+.TP 
+\fIset\fP <\fBparameter\fR> <\fBvalue\fR> [<\fBchannel\fR>]
+.br 
+
+Configure parameters for Serial Over Lan.  If no channel is given,
+it will display SOL configuration data for the currently used
+channel.  Configuration parameter updates are automatically guarded
+with the updates to the set\-in\-progress parameter.
+.RS
+.TP 
+Valid parameters and values are:
+.br 
+.TP 
+\fIset\-in\-progress\fP
+set\-complete set\-in\-progress commit\-write
+.TP 
+\fIenabled\fP
+true false
+.TP 
+\fIforce\-encryption\fP
+true false
+.TP 
+\fIforce\-authentication\fP
+true false
+.TP 
+\fIprivilege\-level\fP
+user operator admin oem
+.TP 
+\fIcharacter\-accumulate\-level\fP
+Decimal number given in 5 milliseconds increments
+.TP 
+\fIcharacter\-send\-threshold\fP
+Decimal number
+.TP 
+\fIretry\-count\fP
+Decimal number.  0 indicates no retries after packet is transmitted.
+.TP 
+\fIretry\-interval\fP
+Decimal number in 10 millisecond increments.  0 indicates 
+that retries should be sent back to back.
+.TP 
+\fInon\-volatile\-bit\-rate\fP
+serial, 19.2, 38.4, 57.6, 115.2.  Setting this value to 
+serial indicates that the BMC should use the setting used 
+by the IPMI over serial channel.
+.TP 
+\fIvolatile\-bit\-rate\fP
+serial, 19.2, 38.4, 57.6, 115.2.  Setting this value to 
+serial indicates that the BMC should use the setting used 
+by the IPMI over serial channel.
+.RE
+.TP 
+\fIactivate\fP [\fIusesolkeepalive\fP | \fInokeepalive\fP] [\fIinstance=<number>\fP]
+.br 
+
+Causes ipmitool to enter Serial Over LAN
+mode, and is only available when using the lanplus
+interface.  An RMCP+ connection is made to the BMC,
+the terminal is set to raw mode, and user input is
+sent to the serial console on the remote server.
+On exit, the the SOL payload mode is deactivated and
+the terminal is reset to its original settings.
+
+If the instance is given, it will activate using the given instance
+number.  The default is 1.
+.RS
+
+Special escape sequences are provided to control the SOL session:
+.RS
+.TP 
+\fI~.\fP	Terminate connection
+.TP 
+\fI~^Z\fP	Suspend ipmitool
+.TP 
+\fI~^X\fP	Suspend ipmitool, but don't restore tty on restart
+.TP 
+\fI~B\fP	Send break
+.TP 
+\fI~~\fP	Send the escape character by typing it twice
+.TP 
+\fI~?\fP	Print the supported escape sequences
+.RE
+
+Note that escapes are only recognized immediately after newline.
+.RE
+.TP 
+\fIdeactivate\fP [\fIinstance=<number>\fP]
+.br 
+
+Deactivates Serial Over LAN mode on the BMC.
+Exiting Serial Over LAN mode should automatically cause
+this command to be sent to the BMC, but in the case of an
+unintentional exit from SOL mode, this command may be
+necessary to reset the state of the BMC.
+
+If the instance is given, it will deactivate the given instance
+number.  The default is 1.
+.RE
+.TP 
+\fIspd\fP <\fBi2cbus\fR> <\fBi2caddr\fR> [<\fBchannel\fR>] [<\fmaxread\fR>]
+.br 
+
+This command may be used to read SPD (Serial Presence Detect) data using the 
+I2C Master Write\-Read IPMI command.
+
+.TP
+\fIsunoem\fP
+.RS
+.TP
+\fIcli\fP [<\fBcommand string\fR> ...]
+.br
+
+Execute the service processor command line interface commands.
+Without any command string, an interactive session is started
+in the service processor command line environment.  If a
+command string is specified, the command string is executed
+on the service processor and the connection is closed.
+.TP
+\fIled\fP
+.RS
+
+These commands provide a way to get and set the status of LEDs
+on a Sun Microsystems server.  Use 'sdr list generic' to get a
+list of devices that are controllable LEDs.  The \fIledtype\fP
+parameter is optional and not necessary to provide on the command
+line unless it is required by hardware.
+.TP
+\fIget\fP <\fBsensorid\fR> [<\fBledtype\fR>]
+
+Get status of a particular LED described by a Generic Device Locator
+record in the SDR.  A sensorid of \fIall\fP will get the status
+of all available LEDS.
+.TP
+\fIset\fP <\fBsensorid\fR> <\fBledmode\fR> [<\fBledtype\fR>]
+
+Set status of a particular LED described by a Generic Device Locator
+record in the SDR.  A sensorid of \fIall\fP will set the status
+of all available LEDS to the specified \fIledmode\fP and \fIledtype\fP.
+.TP
+LED Mode is required for set operations:
+.br
+\fIOFF\fP         Off
+.br
+\fION\fP          Steady On
+.br
+\fISTANDBY\fP     100ms on 2900ms off blink rate
+.br
+\fISLOW\fP        1HZ blink rate
+.br
+\fIFAST\fP        4HZ blink rate
+.TP
+LED Type is optional:
+.br
+\fIOK2RM\fP       Ok to Remove
+.br
+\fISERVICE\fP     Service Required
+.br
+\fIACT\fP         Activity
+.br
+\fILOCATE\fP      Locate
+
+.RE
+.TP
+\fInacname\fP <\fBipmi name\fR>
+.br
+
+Return the full NAC name of a target identified by ipmi name.
+.TP
+\fIping\fP <\fBcount\fR> [<\fBq\fR>]
+.br
+
+Send and receive count packets. Each packet is 64 bytes.
+
+q - Quiet. Displays output only at the start and end of the process.
+.TP
+\fIgetval\fP <\fBproperty name\fR>
+.br
+
+Returns value of specified ILOM property.
+.TP
+\fIsetval\fP <\fBproperty name\fR> <\fBproperty value\fR> [<\fBtimeout\fR>]
+.br
+
+Sets value of ILOM  property. If timeout is not specified, the
+default value is 5 seconds. NOTE: setval must be executed locally on host!
+.TP
+\fIsshkey\fP
+.RS
+.TP
+\fIset\fP <\fBuserid\fR> <\fBkeyfile\fR>
+
+This command will allow you to specify an SSH key to use for a particular
+user on the Service Processor. This key will be used for CLI logins to
+the SP and not for IPMI sessions. View available users and their userids
+with the 'user list' command.
+.TP
+\fIdel\fP <\fBuserid\fR>
+
+This command will delete the SSH key for a specified userid.
+.RE
+.TP
+\fIversion\fP
+.br
+
+Display the version of ILOM firmware.
+.TP
+\fIgetfile\fP <\fBfile identifier\fR> <\fBdestination file name\fR>
+.br
+
+This command will return various files from service processor and store them
+in specified destination file. Note that some files may not be present or
+be supported by your SP.
+.br
+
+.RS
+File identifiers:
+.RS
+.br
+\fISSH_PUBKEYS\fP
+.br
+\fIDIAG_PASSED\fP
+.br
+\fIDIAG_FAILED\fP
+.br
+\fIDIAG_END_TIME\fP
+.br
+\fIDIAG_INVENTORY\fP
+.br
+\fIDIAG_TEST_LOG\fP
+.br
+\fIDIAG_START_TIME\fP
+.br
+\fIDIAG_UEFI_LOG\fP
+.br
+\fIDIAG_TEST_LOG\fP
+.br
+\fIDIAG_LAST_LOG\fP
+.br
+\fIDIAG_LAST_CMD\fP
+.RE
+.RE
+
+.TP
+\fIgetbehavior\fP <\fBfeature identifier\fR>
+.br
+
+This command will test if various ILOM features are enabled.
+.br
+
+.RS
+Feature identifiers:
+.RS
+.br
+\fISUPPORTS_SIGNED_PACKAGES\fP
+.br
+\fIREQUIRES_SIGNED_PACKAGES\fP
+.RE
+.RE
+.RE
+.TP
+\fItsol\fP
+.RS
+
+This command allows Serial-over-LAN sessions to be established with Tyan
+IPMIv1.5 SMDC such as the M3289 or M3290.  The default command run with
+no arguments will establish default SOL session back to local IP address.
+Optional arguments may be supplied in any order.
+
+.TP
+\fI<ipaddr>\fP
+.br
+
+Send receiver IP address to SMDC which it will use to send serial
+traffic to.  By default this detects the local IP address and establishes
+two-way session.  Format of ipaddr is XX.XX.XX.XX
+
+.TP
+\fIport=NUM\fP
+.br
+
+Configure UDP port to receive serial traffic on.  By default this is 6230.
+
+.TP
+\fIro|rw\fP
+.br
+
+Confiure SOL session as read-only or read-write.  Sessions are read-write
+by default.
+
+.RE
+
+.TP 
+\fIuser\fP
+.RS
+.TP 
+\fIsummary\fP
+.br 
+
+Displays a summary of userid information, including maximum number of userids,
+the number of enabled users, and the number of fixed names defined.
+.TP 
+\fIlist\fP
+.br 
+
+Displays a list of user information for all defined userids.
+.TP 
+\fIset\fP
+.RS
+.TP 
+\fIname\fP <\fBuserid\fR> <\fBusername\fR>
+.br 
+
+Sets the username associated with the given userid.
+.TP 
+\fIpassword\fP <\fBuserid\fR> [<\fBpassword\fR>]
+.br 
+
+Sets the password for the given userid.  If no password is given,
+the password is cleared (set to the NULL password).  Be careful when
+removing passwords from administrator\-level accounts.
+.RE
+.TP 
+\fIdisable\fP <\fBuserid\fR>
+.br 
+
+Disables access to the BMC by the given userid.
+.TP 
+\fIenable\fP <\fBuserid\fR>
+.br 
+
+Enables access to the BMC by the given userid.
+.TP 
+\fIpriv\fP <\fBuserid\fR> <\fBprivilege level\fR> [<\fBchannel number\fR>]
+.br 
+
+Set user privilege level on the specified channel.  If the channel is not 
+specified, the current channel will be used.
+.TP 
+\fItest\fP <\fBuserid\fR> <\fB16\fR|\fB20\fR> [<\fBpassword\fR>]
+.br 
+
+Determine whether a password has been stored as 16 or 20 bytes.
+.RE
+
+.SH "OPEN INTERFACE"
+The ipmitool \fIopen\fP interface utilizes the OpenIPMI
+kernel device driver.  This driver is present in all modern
+2.4 and all 2.6 kernels and it should be present in recent
+Linux distribution kernels.  There are also IPMI driver
+kernel patches for different kernel versions available from
+the OpenIPMI homepage.
+
+The required kernel modules is different for 2.4 and 2.6
+kernels.  The following kernel modules must be loaded on
+a 2.4\-based kernel in order for ipmitool to work:
+.TP 
+.B ipmi_msghandler
+Incoming and outgoing message handler for IPMI interfaces.
+.TP 
+.B ipmi_kcs_drv
+An IPMI Keyboard Controller Style (KCS) interface driver for the message handler.
+.TP 
+.B ipmi_devintf
+Linux character device interface for the message handler.
+.LP 
+The following kernel modules must be loaded on
+a 2.6\-based kernel in order for ipmitool to work:
+.TP 
+.B ipmi_msghandler
+Incoming and outgoing message handler for IPMI interfaces.
+.TP 
+.B ipmi_si
+An IPMI system interface driver for the message handler.
+This module supports various IPMI system interfaces such
+as KCS, BT, SMIC, and even SMBus in 2.6 kernels.
+.TP 
+.B ipmi_devintf
+Linux character device interface for the message handler.
+.LP 
+Once the required modules are loaded there will be a dynamic
+character device entry that must exist at \fB/dev/ipmi0\fR.
+For systems that use devfs or udev this will appear at
+\fB/dev/ipmi/0\fR.
+
+To create the device node first determine what dynamic major
+number it was assigned by the kernel by looking in
+\fB/proc/devices\fR and checking for the \fIipmidev\fP
+entry.  Usually if this is the first dynamic device it will
+be major number \fB254\fR and the minor number for the first
+system interface is \fB0\fR so you would create the device
+entry with:
+
+.I mknod /dev/ipmi0 c 254 0
+
+ipmitool includes some sample initialization scripts that
+can perform this task automatically at start\-up.
+
+In order to have ipmitool use the OpenIPMI device interface
+you can specify it on the command line:
+.PP 
+ipmitool \fB\-I\fR \fIopen\fP <\fIcommand\fP>
+.SH "BMC INTERFACE"
+The ipmitool bmc interface utilizes the \fIbmc\fP device driver as
+provided by Solaris 10 and higher.  In order to force ipmitool to make
+use of this interface you can specify it on the command line:
+.PP 
+ipmitool \fB\-I\fR \fIbmc\fP <\fIcommand\fP>
+
+The following files are associated with the bmc driver:
+
+.TP 
+.B /platform/i86pc/kernel/drv/bmc
+32\-bit \fBELF\fR kernel module for the bmc driver.
+.TP 
+.B /platform/i86pc/kernel/drv/amd64/bmc
+64\-bit \fBELF\fR kernel module for the bmc driver.
+.TP 
+.B /dev/bmc
+Character device node used to communicate with the bmc driver.
+.SH "LIPMI INTERFACE"
+The ipmitool \fIlipmi\fP interface uses the Solaris 9 IPMI kernel device driver.
+It has been superceeded by the \fIbmc\fP interface on Solaris 10.  You can tell
+ipmitool to use this interface by specifying it on the command line.
+
+ipmitool \fB\-I\fR \fIlipmi\fP <\fIexpression\fP>
+.SH "LAN INTERFACE"
+The ipmitool \fIlan\fP interface communicates with the BMC
+over an Ethernet LAN connection using UDP under IPv4.  UDP
+datagrams are formatted to contain IPMI request/response 
+messages with a IPMI session headers and RMCP headers.
+
+IPMI\-over\-LAN uses version 1 of the Remote Management Control
+Protocol (RMCP) to support pre\-OS and OS\-absent management.  
+RMCP is a request\-response protocol delivered using UDP 
+datagrams to port 623.
+
+The LAN interface is an authentication multi\-session connection;
+messages delivered to the BMC can (and should) be authenticated
+with a challenge/response protocol with either straight
+password/key or MD5 message\-digest algorithm.  ipmitool will
+attempt to connect with administrator privilege level as this
+is required to perform chassis power functions.
+
+You can tell ipmitool to use the lan interface with the
+\fB\-I\fR \fIlan\fP option:
+
+.PP 
+ipmitool \fB\-I\fR \fIlan\fP \fB\-H\fR <\fIhostname\fP>
+[\fB\-U\fR <\fIusername\fP>] [\fB\-P\fR <\fIpassword\fP>] <\fIcommand\fP>
+
+A hostname must be given on the command line in order to use the 
+lan interface with ipmitool.  The password field is optional;
+if you do not provide a password on the command line, ipmitool
+will attempt to connect without authentication.  If you specify a 
+password it will use MD5 authentication if supported by the BMC
+and straight password/key otherwise, unless overridden with a
+command line option.
+.SH "LANPLUS INTERFACE"
+Like the \fIlan\fP interface, the \fIlanplus\fP interface
+communicates with the BMC over an Ethernet LAN connection using 
+UDP under IPv4.  The difference is that the \fIlanplus\fP
+interface uses the RMCP+ protocol as described in the IPMI v2.0
+specification.  RMCP+ allows for improved authentication and data 
+integrity checks, as well as encryption and the ability to carry
+multiple types of payloads.  Generic Serial Over LAN support 
+requires RMCP+, so the ipmitool \fIsol activate\fP command
+requires the use of the \fIlanplus\fP interface.
+
+RMCP+ session establishment uses a symmetric challenge\-response
+protocol called RAKP (\fBRemote Authenticated Key\-Exchange Protocol\fR)
+which allows the negotiation of many options.  ipmitool does not
+yet allow the user to specify the value of every option, defaulting
+to the most obvious settings marked as required in the v2.0 
+specification.  Authentication and integrity HMACS are produced with
+SHA1, and encryption is performed with AES\-CBC\-128.  Role\-level logins
+are not yet supported.
+
+ipmitool must be linked with the \fIOpenSSL\fP library in order to
+perform the encryption functions and support the \fIlanplus\fP
+interface.  If the required packages are not found it will not be
+compiled in and supported.
+
+You can tell ipmitool to use the lanplus interface with the
+\fB\-I\fR \fIlanplus\fP option:
+
+.PP 
+ipmitool \fB\-I\fR \fIlanplus\fP 
+\fB\-H\fR <\fIhostname\fP>
+[\fB\-U\fR <\fIusername\fP>]
+[\fB\-P\fR <\fIpassword\fP>]
+<\fIcommand\fP>
+
+A hostname must be given on the command line in order to use the 
+lan interface with ipmitool.  With the exception of the \fB\-A\fR and
+\fB\-C\fR options the rest of the command line options are identical to
+those available for the \fIlan\fP interface.
+
+The \fB\-C\fR option allows you specify the authentication, integrity,
+and encryption algorithms to use for for \fIlanplus\fP session based
+on the cipher suite ID found in the IPMIv2.0 specification in table
+22\-19.  The default cipher suite is \fI3\fP which specifies
+RAKP\-HMAC\-SHA1 authentication, HMAC\-SHA1\-96 integrity, and AES\-CBC\-128
+encryption algorightms.
+
+.SH "FREE INTERFACE"
+.LP
+The ipmitool \fIfree\fP interface utilizes the FreeIPMI libfreeipmi
+drivers.  
+.LP
+You can tell ipmitool to use the FreeIPMI interface with the \-I option:
+.PP
+ipmitool \fB\-I\fR \fIfree\fP <\fIcommand\fP>
+
+
+.SH "IMB INTERFACE"
+.LP
+The ipmitool \fIimb\fP interface supports the Intel IMB (Intel
+Inter-module Bus) Interface through the /dev/imb device.  
+.LP
+You can tell ipmitool to use the IMB interface with the \-I option:
+.PP
+ipmitool \fB\-I\fR \fIimb\fP <\fIcommand\fP>
+
+.SH "EXAMPLES"
+.TP 
+\fIExample 1\fP: Listing remote sensors
+
+> ipmitool \-I lan \-H 1.2.3.4 \-f passfile sdr list
+.br 
+Baseboard 1.25V  | 1.24 Volts        | ok
+.br 
+Baseboard 2.5V   | 2.49 Volts        | ok
+.br 
+Baseboard 3.3V   | 3.32 Volts        | ok
+.TP 
+\fIExample 2\fP: Displaying status of a remote sensor
+
+> ipmitool \-I lan \-H 1.2.3.4 \-f passfile sensor get "Baseboard 1.25V"
+.br 
+Locating sensor record...
+.br 
+Sensor ID              : Baseboard 1.25V (0x10)
+.br 
+Sensor Type (Analog)   : Voltage
+.br 
+Sensor Reading         : 1.245 (+/\- 0.039) Volts
+.br 
+Status                 : ok
+.br 
+Lower Non\-Recoverable  : na
+.br 
+Lower Critical         : 1.078
+.br 
+Lower Non\-Critical     : 1.107
+.br 
+Upper Non\-Critical     : 1.382
+.br 
+Upper Critical         : 1.431
+.br 
+Upper Non\-Recoverable  : na 
+.TP 
+\fIExample 3\fP: Displaying the power status of a remote chassis
+
+> ipmitool \-I lan \-H 1.2.3.4 \-f passfile chassis power status
+.br 
+Chassis Power is on
+.TP 
+\fIExample 4\fP: Controlling the power on a remote chassis
+
+> ipmitool \-I lan \-H 1.2.3.4 \-f passfile chassis power on
+.br 
+Chassis Power Control: Up/On
+	
+.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
+.TP
+FreeIPMI Homepage
+http://www.gnu.org/software/freeipmi/

+ 34 - 0
app/ipmitool-1.8.18/include/Makefile.am

@@ -0,0 +1,34 @@
+# 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
+
+SUBDIRS = ipmitool
+

+ 666 - 0
app/ipmitool-1.8.18/include/Makefile.in

@@ -0,0 +1,666 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# 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.
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = include
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-recursive dvi-recursive html-recursive info-recursive \
+	install-data-recursive install-dvi-recursive \
+	install-exec-recursive install-html-recursive \
+	install-info-recursive install-pdf-recursive \
+	install-ps-recursive install-recursive installcheck-recursive \
+	installdirs-recursive pdf-recursive ps-recursive \
+	tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+	distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+ARCH = @ARCH@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASEDIR = @BASEDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTRO = @DISTRO@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTF_BMC = @INTF_BMC@
+INTF_BMC_LIB = @INTF_BMC_LIB@
+INTF_DUMMY = @INTF_DUMMY@
+INTF_DUMMY_LIB = @INTF_DUMMY_LIB@
+INTF_FREE = @INTF_FREE@
+INTF_FREE_LIB = @INTF_FREE_LIB@
+INTF_IMB = @INTF_IMB@
+INTF_IMB_LIB = @INTF_IMB_LIB@
+INTF_LAN = @INTF_LAN@
+INTF_LANPLUS = @INTF_LANPLUS@
+INTF_LANPLUS_LIB = @INTF_LANPLUS_LIB@
+INTF_LAN_LIB = @INTF_LAN_LIB@
+INTF_LIPMI = @INTF_LIPMI@
+INTF_LIPMI_LIB = @INTF_LIPMI_LIB@
+INTF_OPEN = @INTF_OPEN@
+INTF_OPEN_LIB = @INTF_OPEN_LIB@
+INTF_SERIAL = @INTF_SERIAL@
+INTF_SERIAL_LIB = @INTF_SERIAL_LIB@
+INTF_USB = @INTF_USB@
+INTF_USB_LIB = @INTF_USB_LIB@
+IPMITOOL_INTF_LIB = @IPMITOOL_INTF_LIB@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OS = @OS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POW_LIB = @POW_LIB@
+PSTAMP = @PSTAMP@
+RANLIB = @RANLIB@
+RPMBUILD = @RPMBUILD@
+RPM_RELEASE = @RPM_RELEASE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_configure_args = @ac_configure_args@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in
+SUBDIRS = ipmitool
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign include/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+	check-am clean clean-generic clean-libtool cscopelist-am ctags \
+	ctags-am distclean distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am tags tags-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

+ 42 - 0
app/ipmitool-1.8.18/include/ipmitool/Makefile.am

@@ -0,0 +1,42 @@
+# 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
+
+noinst_HEADERS = log.h bswap.h hpm2.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 ipmi_vita.h ipmi_sel_supermicro.h \
+	ipmi_cfgp.h ipmi_lanp6.h

+ 564 - 0
app/ipmitool-1.8.18/include/ipmitool/Makefile.in

@@ -0,0 +1,564 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# 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.
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = include/ipmitool
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(noinst_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(noinst_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+ARCH = @ARCH@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASEDIR = @BASEDIR@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DISTRO = @DISTRO@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTF_BMC = @INTF_BMC@
+INTF_BMC_LIB = @INTF_BMC_LIB@
+INTF_DUMMY = @INTF_DUMMY@
+INTF_DUMMY_LIB = @INTF_DUMMY_LIB@
+INTF_FREE = @INTF_FREE@
+INTF_FREE_LIB = @INTF_FREE_LIB@
+INTF_IMB = @INTF_IMB@
+INTF_IMB_LIB = @INTF_IMB_LIB@
+INTF_LAN = @INTF_LAN@
+INTF_LANPLUS = @INTF_LANPLUS@
+INTF_LANPLUS_LIB = @INTF_LANPLUS_LIB@
+INTF_LAN_LIB = @INTF_LAN_LIB@
+INTF_LIPMI = @INTF_LIPMI@
+INTF_LIPMI_LIB = @INTF_LIPMI_LIB@
+INTF_OPEN = @INTF_OPEN@
+INTF_OPEN_LIB = @INTF_OPEN_LIB@
+INTF_SERIAL = @INTF_SERIAL@
+INTF_SERIAL_LIB = @INTF_SERIAL_LIB@
+INTF_USB = @INTF_USB@
+INTF_USB_LIB = @INTF_USB_LIB@
+IPMITOOL_INTF_LIB = @IPMITOOL_INTF_LIB@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OS = @OS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POW_LIB = @POW_LIB@
+PSTAMP = @PSTAMP@
+RANLIB = @RANLIB@
+RPMBUILD = @RPMBUILD@
+RPM_RELEASE = @RPM_RELEASE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_configure_args = @ac_configure_args@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in
+noinst_HEADERS = log.h bswap.h hpm2.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 ipmi_vita.h ipmi_sel_supermicro.h \
+	ipmi_cfgp.h ipmi_lanp6.h
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/ipmitool/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign include/ipmitool/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool cscopelist-am ctags ctags-am distclean \
+	distclean-generic distclean-libtool distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

+ 53 - 0
app/ipmitool-1.8.18/include/ipmitool/bswap.h

@@ -0,0 +1,53 @@
+/*
+ * 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_BSWAP_H
+#define IPMI_BSWAP_H
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#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) |\
+                     (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
+#endif
+
+#endif /* IPMI_BSWAP_H */

+ 131 - 0
app/ipmitool-1.8.18/include/ipmitool/helper.h

@@ -0,0 +1,131 @@
+/*
+ * 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_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;
+	const char * str;
+};
+
+const char * val2str(uint16_t val, const struct valstr * vs);
+const char * oemval2str(uint32_t oem,uint16_t val, const struct oemvalstr * vs);
+
+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);
+
+int eval_ccode(const int ccode);
+
+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);
+int is_ipmi_user_priv_limit(const char *argv_ptr, uint8_t *ipmi_priv_limit_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);
+#define BUF2STR_MAXIMUM_OUTPUT_SIZE	(3*1024 + 1)
+const char * buf2str_extended(const uint8_t *buf, int len, const char *sep);
+const char * buf2str(const uint8_t *buf, int len);
+int str2mac(const char *arg, uint8_t *buf);
+const char * mac2str(const uint8_t *buf);
+int ipmi_parse_hex(const char *str, uint8_t *out, int size);
+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);
+uint16_t ipmi_get_oem_id(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
+
+#endif /* IPMI_HELPER_H */

+ 91 - 0
app/ipmitool-1.8.18/include/ipmitool/hpm2.h

@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2012 Pigeon Point Systems.  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 Pigeon Point Systems nor 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.
+ * PIGEON POINT SYSTEMS ("PPS") 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
+ * PPS 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 PPS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include <stdint.h>
+#include <ipmitool/ipmi_intf.h>
+
+/* Global HPM.2 defines */
+#define HPM2_REVISION		0x01
+#define HPM3_REVISION		0x01
+#define HPM2_LAN_PARAMS_REV	0x01
+#define HPM2_SOL_PARAMS_REV	0x01
+#define HPM3_LAN_PARAMS_REV	0x01
+/* IPMI defines parameter revision as
+ * MSN = present revision,
+ * LSN = oldest revision parameter is
+ * backward compatible with. */
+#define LAN_PARAM_REV(x, y)	(((x) << 4) | ((y) & 0xF))
+
+/* HPM.2 capabilities */
+#define HPM2_CAPS_SOL_EXTENSION		0x01
+#define HPM2_CAPS_PACKET_TRACE		0x02
+#define HPM2_CAPS_EXT_MANAGEMENT	0x04
+#define HPM2_CAPS_VERSION_SENSOR	0x08
+#define HPM2_CAPS_DYNAMIC_SESSIONS	0x10
+
+#if HAVE_PRAGMA_PACK
+# pragma pack(push, 1)
+#endif
+
+/* HPM.2 LAN attach capabilities */
+struct hpm2_lan_attach_capabilities {
+	uint8_t hpm2_revision_id;
+	uint16_t lan_channel_mask;
+	uint8_t hpm2_caps;
+	uint8_t hpm2_lan_params_start;
+	uint8_t hpm2_lan_params_rev;
+	uint8_t hpm2_sol_params_start;
+	uint8_t hpm2_sol_params_rev;
+} ATTRIBUTE_PACKING;
+
+/* HPM.2 LAN channel capabilities */
+struct hpm2_lan_channel_capabilities {
+	uint8_t capabilities;
+	uint8_t attach_type;
+	uint8_t bandwidth_class;
+	uint16_t max_inbound_pld_size;
+	uint16_t max_outbound_pld_size;
+} ATTRIBUTE_PACKING;
+
+#if HAVE_PRAGMA_PACK
+# pragma pack(pop)
+#endif
+
+/* HPM.2 command assignments */
+#define HPM2_GET_LAN_ATTACH_CAPABILITIES	0x3E
+
+extern int hpm2_get_capabilities(struct ipmi_intf * intf,
+		struct hpm2_lan_attach_capabilities * caps);
+extern int hpm2_get_lan_channel_capabilities(struct ipmi_intf * intf,
+		uint8_t hpm2_lan_params_start,
+		struct hpm2_lan_channel_capabilities * caps);
+extern int hpm2_detect_max_payload_size(struct ipmi_intf * intf);

+ 307 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi.h

@@ -0,0 +1,307 @@
+/*
+ * 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_H
+#define IPMI_H
+
+#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>
+
+
+#define IPMI_BUF_SIZE 1024
+#define IPMI_MAX_MD_SIZE 0x20
+
+#if HAVE_PRAGMA_PACK
+#define ATTRIBUTE_PACKING
+#else
+#define ATTRIBUTE_PACKING __attribute__ ((packed))
+#endif
+
+/****** jimbo add *********/
+#define VERSION "1.8.18"
+
+/* 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
+
+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;
+};
+
+/*
+ * 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 {
+			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;
+};
+
+struct ipmi_rq_entry {
+	struct ipmi_rq req;
+	struct ipmi_intf *intf;
+	uint8_t rq_seq;
+	uint8_t *msg_data;
+	int msg_len;
+	int bridging_level;
+	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
+	 */
+	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;
+	} session;
+
+	/*
+	 * 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[IPMI_MAX_MD_SIZE];
+		} rakp2_message;
+		struct {
+			uint8_t message_tag;
+			uint8_t rakp_return_code;
+			uint32_t console_id;
+			uint8_t integrity_check_value[IPMI_MAX_MD_SIZE];
+		} 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;
+};
+
+#define IPMI_NETFN_CHASSIS		0x0
+#define IPMI_NETFN_BRIDGE		0x2
+#define IPMI_NETFN_SE			0x4
+#define IPMI_NETFN_APP			0x6
+#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_BMC_SLAVE_ADDR		0x20
+#define IPMI_REMOTE_SWID		0x81
+
+
+/* These values are IANA numbers */
+/************************************************************************
+* Add ID String for IANA Enterprise Number of IBM & ADLINK
+* https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers
+************************************************************************/
+
+typedef enum IPMI_OEM {
+     IPMI_OEM_UNKNOWN    = 0,
+     /* 2 for [IBM] */
+     IPMI_OEM_IBM_2      = 2,
+     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_ERICSSON   = 193,
+     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,
+     /* 4769 for [IBM Corporation] */
+     IPMI_OEM_IBM_4769   = 4769,
+     IPMI_OEM_MAGNUM     = 5593,
+     IPMI_OEM_TYAN       = 6653,
+     IPMI_OEM_QUANTA     = 7244,
+     IPMI_OEM_NEWISYS    = 9237,
+     IPMI_OEM_ADVANTECH  = 10297,
+     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,
+     /* 20301 for [IBM eServer X] */
+     IPMI_OEM_IBM_20301  = 20301,
+     IPMI_OEM_AMI        = 20974,
+     /* 24339 for [ADLINK TECHNOLOGY INC.] */
+     IPMI_OEM_ADLINK_24339 = 24339,
+     IPMI_OEM_NOKIA_SOLUTIONS_AND_NETWORKS = 28458,
+     IPMI_OEM_VITA       = 33196,
+     IPMI_OEM_SUPERMICRO_47488 = 47488
+} IPMI_OEM;
+
+extern const struct valstr completion_code_vals[];
+
+#endif				/* IPMI_H */

+ 76 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_cc.h

@@ -0,0 +1,76 @@
+/*
+ * 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*/

+ 197 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_cfgp.h

@@ -0,0 +1,197 @@
+/*
+ * Copyright (c) 2016 Pentair Technical Products. All right 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 Pentair Technical Products 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 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
+ * PENTAIR TECHNICAL SOLUTIONS 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_CFGP_H
+#define IPMI_CFGP_H
+
+#include <stdio.h>
+
+/* Forward declarations. */
+struct ipmi_cfgp;
+struct ipmi_cfgp_ctx;
+
+/*
+ * Action types.
+ */
+enum {
+	/* parse dumped parameter data */
+	CFGP_PARSE,
+	/* get parameter from BMC */
+	CFGP_GET,
+	/* set parameter to BMC */
+	CFGP_SET,
+	/* output parameter data in form that can be parsed back */
+	CFGP_SAVE,
+	/* print parameter in user-friendly format */
+	CFGP_PRINT
+};
+
+/*
+ * Action-specific information.
+ */
+struct ipmi_cfgp_action {
+	/* Action type. */
+	int type;
+
+	/* Set selector. */
+	int set;
+
+	/* Block selector. */
+	int block;
+
+	/* No error output needed. */
+	int quiet;
+
+	/* Number of command line arguments (only for parse action). */
+	int argc;
+
+	/* Command line arguments (only for parse action). */
+	const char **argv;
+
+	/* Output file (only for dump/print actions). */
+	FILE *file;
+};
+
+/*
+ * Access types.
+ */
+enum {
+	CFGP_RDWR,
+	CFGP_RDONLY,
+	CFGP_WRONLY,
+	CFGP_RESERVED
+};
+
+/*
+ * Configuration parameter descriptor.
+ */
+struct ipmi_cfgp {
+	/* Parameter name. */
+	const char *name;
+
+	/* Parameter format description. */
+	const char *format;
+
+	/* Various parameter traits. */
+	unsigned int size;		/* block size */
+	unsigned int access:2;		/* read-write/read-only/write-only */
+	unsigned int is_set:1;		/* takes non-zero set selectors */
+	unsigned int first_set:1;	/* 1 = 1-based set selector */
+	unsigned int has_blocks:1;	/* takes non-zero block selectors */
+	unsigned int first_block:1;	/* 1 = 1-based block selector */
+
+	/* Parameter-specific data. */
+	int specific;
+};
+
+/* Parameter callback. */
+typedef int (*ipmi_cfgp_handler_t)(void *priv,
+	const struct ipmi_cfgp *p, const struct ipmi_cfgp_action *action,
+	unsigned char *data);
+
+/*
+ * Parameter selector.
+ */
+struct ipmi_cfgp_sel {
+	int param;
+	int set;
+	int block;
+};
+
+/*
+ * Configuration parameter data.
+ */
+struct ipmi_cfgp_data {
+	struct ipmi_cfgp_data *next;
+	struct ipmi_cfgp_sel sel;
+	unsigned char data[];
+};
+
+/*
+ * Configuration parameter operation context.
+ */
+struct ipmi_cfgp_ctx {
+	/* Set of parameters. */
+	const struct ipmi_cfgp *set;
+
+	/* Descriptor count. */
+	int count;
+
+	/* Parameter action handler. */
+	ipmi_cfgp_handler_t handler;
+
+	/* ipmitool cmd name */
+	const char *cmdname;
+
+	/* List of parameter values. */
+	struct ipmi_cfgp_data *v;
+
+	/* Private data. */
+	void *priv;
+};
+
+/* Initialize configuration context. */
+extern int ipmi_cfgp_init(struct ipmi_cfgp_ctx *ctx,
+		const struct ipmi_cfgp *set, unsigned int count,
+		const char *cmdname,
+		ipmi_cfgp_handler_t handler, void *priv);
+
+/* Uninitialize context, free allocated memory. */
+extern int ipmi_cfgp_uninit(struct ipmi_cfgp_ctx *ctx);
+
+/* Print parameter usage. */
+void ipmi_cfgp_usage(const struct ipmi_cfgp *set, int count, int write);
+
+/* Parse parameter selector from command line. */
+extern int ipmi_cfgp_parse_sel(struct ipmi_cfgp_ctx *ctx,
+		int argc, const char **argv, struct ipmi_cfgp_sel *sel);
+
+/* Parse parameter data from command line. */
+extern int ipmi_cfgp_parse_data(struct ipmi_cfgp_ctx *ctx,
+		const struct ipmi_cfgp_sel *sel, int argc, const char **argv);
+
+/* Get parameter data from BMC. */
+extern int ipmi_cfgp_get(struct ipmi_cfgp_ctx *ctx,
+		const struct ipmi_cfgp_sel *sel);
+
+/* Set parameter data to BMC. */
+extern int ipmi_cfgp_set(struct ipmi_cfgp_ctx *ctx,
+		const struct ipmi_cfgp_sel *sel);
+
+/* Write parameter data to file. */
+extern int ipmi_cfgp_save(struct ipmi_cfgp_ctx *ctx,
+		const struct ipmi_cfgp_sel *sel, FILE *file);
+
+/* Print parameter data in user-friendly format. */
+extern int ipmi_cfgp_print(struct ipmi_cfgp_ctx *ctx,
+		const struct ipmi_cfgp_sel *sel, FILE *file);
+
+#endif /* IPMI_CFGP_H */

+ 146 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_channel.h

@@ -0,0 +1,146 @@
+/*
+ * 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_SET_CHANNEL_ACCESS        0x40
+#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
+
+/* These are for channel_info_t.session_support */
+#define IPMI_CHANNEL_SESSION_LESS 0x00
+#define IPMI_CHANNEL_SESSION_SINGLE 0x40
+#define IPMI_CHANNEL_SESSION_MULTI 0x80
+#define IPMI_CHANNEL_SESSION_BASED 0xC0
+
+/* (22.24) Get Channel Info */
+struct channel_info_t {
+	uint8_t channel;
+	uint8_t medium;
+	uint8_t protocol;
+	uint8_t session_support;
+	uint8_t active_sessions;
+	uint8_t vendor_id[3];
+	uint8_t aux_info[2];
+};
+
+/* (22.23) Get Channel Access */
+struct channel_access_t {
+	uint8_t access_mode;
+	uint8_t alerting;
+	uint8_t channel;
+	uint8_t per_message_auth;
+	uint8_t privilege_limit;
+	uint8_t user_level_auth;
+};
+
+/*
+ * 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
+
+int _ipmi_get_channel_access(struct ipmi_intf *intf,
+		struct channel_access_t *channel_access,
+		uint8_t get_volatile_settings);
+int _ipmi_get_channel_info(struct ipmi_intf *intf,
+        struct channel_info_t *channel_info);
+int _ipmi_set_channel_access(struct ipmi_intf *intf,
+		struct channel_access_t channel_access, uint8_t access_option,
+		uint8_t privilege_option);
+
+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*/

+ 55 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_chassis.h

@@ -0,0 +1,55 @@
+/*
+ * 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_CHASSIS_H
+#define IPMI_CHASSIS_H
+
+#include <ipmitool/ipmi.h>
+
+#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
+
+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);
+
+#endif /*IPMI_CHASSIS_H*/

+ 136 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_constants.h

@@ -0,0 +1,136 @@
+/*
+ * 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
+#define IPMI_AUTH_RAKP_HMAC_SHA256  0x03
+
+/* 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
+#define IPMI_INTEGRITY_HMAC_SHA256_128 0x04
+
+/* 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*/

+ 270 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_dcmi.h

@@ -0,0 +1,270 @@
+/*
+ * 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)))
+
+/* External Node Manager Configuration and Control Commands per spec 2.0 */
+
+#define IPMI_NM_POLICY_CTL     0xC0
+#define IPMI_NM_SET_POLICY     0xC1
+#define IPMI_NM_GET_POLICY     0xC2
+#define IPMI_NM_SET_ALERT_TH   0xC3
+#define IPMI_NM_GET_ALERT_TH   0xC4
+#define IPMI_NM_SET_SUSPEND    0xC5
+#define IPMI_NM_GET_SUSPEND    0xC6
+#define IPMI_NM_RESET_STATS    0xC7
+#define IPMI_NM_GET_STATS      0xC8
+#define IPMI_NM_GET_CAP        0xC9
+#define IPMI_NM_GET_VERSION    0xCA
+#define IPMI_NM_SET_POWER      0xCB
+#define IPMI_NM_SET_ALERT_DS   0xCE
+#define IPMI_NM_GET_ALERT_DS   0xCF
+#define IPMI_NM_LIMITING       0xF2
+
+/* Node Manager Policy Control Flags */
+#define IPMI_NM_GLOBAL_ENABLE  0x01
+#define IPMI_NM_DOMAIN_ENABLE  0x02
+#define IPMI_NM_PER_POLICY_ENABLE  0x04
+
+/* Node Manager Set Policy Enable */
+#define IPMI_NM_POLICY_ENABLE  0x10
+
+/* Node Manager Policy Trigger Codes */
+#define IPMI_NM_NO_POLICY_TRIG 0x00
+#define IPMI_NM_TEMP_TRIGGER   0x01
+#define IPMI_NM_NO_READ_TRIG   0x02
+#define IPMI_NM_RESET_TRIGGER  0x03
+#define IPMI_NM_BOOT_TRIGGER   0x04
+
+/* Policy Exception Actions flags */
+#define IPMI_NM_POLICY_ALERT  0x01
+#define IPMI_NM_POLICY_SHUT   0x02
+
+/* Power Correction codes for Policy action */
+#define IPMI_NM_PWR_AUTO_CORR 0x00
+#define IPMI_NM_PWR_SOFT_CORR 0x01
+#define IPMI_NM_PWR_AGGR_CORR 0x02
+
+/* Set Threshold message size */
+#define IPMI_NM_SET_THRESH_LEN 12
+
+/* Number of Suspend Periods */
+#define IPMI_NM_SUSPEND_PERIOD_MAX 5
+
+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);
+
+/* Node Manager discover command */
+struct nm_discover {
+    uint8_t intel_id[3]; /* Always returns 000157 */
+    uint8_t nm_version;
+    uint8_t ipmi_version;
+    uint8_t patch_version;
+    uint8_t major_rev;
+    uint8_t minor_rev;
+} __attribute__ ((packed));
+
+/* Node Manager get capabilites command */
+struct nm_capability {
+    uint8_t  intel_id[3];
+    uint8_t  max_settings;
+    uint16_t max_value; /* max power/thermal/time after reset */
+    uint16_t min_value; /* min ""                             */
+    uint32_t min_corr;  /* min correction time inmillesecs */
+    uint32_t max_corr;
+    uint16_t min_stats;
+    uint16_t max_stats;
+    uint8_t  scope;
+} __attribute__ ((packed));
+
+/* Node Manager get statistics command */
+struct nm_statistics {
+    uint8_t  intel_id[3];
+    uint16_t curr_value;
+    uint16_t min_value;
+    uint16_t max_value;
+    uint16_t ave_value;
+    uint32_t time_stamp;
+    uint32_t stat_period;
+    uint8_t  id_state;
+} __attribute__ ((packed));
+
+/* Node Manager set policy */
+struct nm_policy {
+    uint8_t  intel_id[3];
+    uint8_t  domain;       /* 0:3 are domain, 4 = Policy enabled */
+    uint8_t  policy_id;
+    uint8_t  policy_type;  /* 0:3 trigger type 4 = action 5:6 correction */
+    uint8_t  policy_exception;   /* exception actions */
+    uint16_t policy_limits;
+    uint32_t corr_time;
+    uint16_t trigger_limit;
+    uint16_t stats_period;
+} __attribute__ ((packed));
+
+/* Node Maager get policy */
+struct nm_get_policy {
+    uint8_t  intel_id[3];
+    uint8_t  domain;       /* 0:3 are domain, 4 = Policy enabled */
+    uint8_t  policy_type;  /* 0:3 trigger type 4 = action 5:6 correction */
+    uint8_t  policy_exception;   /* exception actions */
+    uint16_t policy_limits;
+    uint32_t corr_time;
+    uint16_t trigger_limit;
+    uint16_t stats_period;
+} __attribute__ ((packed));
+
+/* Node Manager set alert destination */
+struct nm_set_alert {
+    uint8_t  intel_id[3];
+    uint8_t  chan;           /* 0:3 BMC chan, 4:6 reserved, bit 7=0 register alert reciever =1 invalidate */
+    uint8_t  dest;           /* lan destination */
+    uint8_t  string;         /* alert string selector  */
+} __attribute__ ((packed));
+
+/* Node Manager set alert threshold */
+struct nm_thresh {
+    uint8_t  intel_id[3];
+    uint8_t  domain;       /* 0:3 are domain, 4 = Policy enabled */
+    uint8_t  policy_id;
+    uint8_t  count;
+    uint16_t thresholds[3];
+} __attribute__ ((packed));
+
+/* Node Manager suspend period struct */
+struct nm_period {
+    uint8_t  start;
+    uint8_t  stop;
+    uint8_t  repeat;
+} __attribute__ ((packed));
+
+/* Node Manager set suspend period */
+struct nm_suspend {
+    uint8_t  intel_id[3];
+    uint8_t  domain;       /* 0:3 are domain, 4 = Policy enabled */
+    uint8_t  policy_id;
+    uint8_t  count;
+    struct nm_period period[IPMI_NM_SUSPEND_PERIOD_MAX];
+} __attribute__ ((packed));
+
+int ipmi_nm_main(struct ipmi_intf * intf, int argc, char ** argv);
+#endif /*IPMI_DCMI_H*/

+ 370 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_delloem.h

@@ -0,0 +1,370 @@
+/****************************************************************************
+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
+#define	IDRAC_13G					3
+// 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)
+
+#define IMC_IDRAC_13G_MONOLITHIC 	(uint8_t) (0x20)
+#define IMC_IDRAC_13G_MODULAR 		(uint8_t) (0x21)
+#define IMC_IDRAC_13G_DCS			(uint8_t) (0x22)
+
+
+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*/

+ 68 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_ekanalyzer.h

@@ -0,0 +1,68 @@
+/*
+ * 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 */

+ 53 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_entity.h

@@ -0,0 +1,53 @@
+/*
+ * 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_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
+
+#endif /* IPMI_ENTITY_H */

+ 66 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_event.h

@@ -0,0 +1,66 @@
+/*
+ * 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*/

+ 106 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_firewall.h

@@ -0,0 +1,106 @@
+/*
+ * 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 */

+ 618 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_fru.h

@@ -0,0 +1,618 @@
+/*
+ * 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_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
+#define SET_FRU_DATA		0x12
+
+enum {
+	FRU_CHASSIS_PARTNO,
+	FRU_CHASSIS_SERIAL,
+	FRU_BOARD_MANUF,
+	FRU_BOARD_PRODUCT,
+	FRU_BOARD_SERIAL,
+	FRU_BOARD_PARTNO,
+	FRU_PRODUCT_MANUF,
+	FRU_PRODUCT_NAME,
+	FRU_PRODUCT_PARTNO,
+	FRU_PRODUCT_VERSION,
+	FRU_PRODUCT_SERIAL,
+	FRU_PRODUCT_ASSET,
+};
+
+struct fru_info {
+	uint16_t size;
+	uint8_t access:1;
+	uint8_t max_read_size;
+	uint8_t max_write_size;
+};
+
+#ifdef HAVE_PRAGMA_PACK
+#pragma pack(1)
+#endif
+struct fru_header {
+	uint8_t version;
+	union {
+		struct {
+			uint8_t internal;
+			uint8_t chassis;
+			uint8_t board;
+			uint8_t product;
+			uint8_t multi;
+		} offset;
+		uint8_t offsets[5];
+	};
+	uint8_t pad;
+	uint8_t checksum;
+}ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+#pragma pack(0)
+#endif
+
+struct fru_area_chassis {
+	uint8_t area_ver;
+	uint8_t type;
+	uint16_t area_len;
+	char * part;
+	char * serial;
+};
+
+struct fru_area_board {
+	uint8_t area_ver;
+	uint8_t lang;
+	uint16_t area_len;
+	uint32_t mfg_date_time;
+	char * mfg;
+	char * prod;
+	char * serial;
+	char * part;
+	char * fru;
+};
+
+struct fru_area_product {
+	uint8_t area_ver;
+	uint8_t lang;
+	uint16_t area_len;
+	char * mfg;
+	char * name;
+	char * part;
+	char * version;
+	char * serial;
+	char * asset;
+	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
+#define FRU_RECORD_TYPE_DC_LOAD 0x02
+#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
+
+#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
+
+static const char * combined_voltage_desc[] __attribute__((unused)) = {
+"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
+	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
+
+#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
+	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
+
+#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
+#define FRU_PICMGEXT_LINK_TYPE_FABRIC_ETHERNET_10GBD	0x32
+	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
+#define FRU_PICMGEXT_LINK_TYPE_FABRIC_ETHERNET_10GBD	0x32
+	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"
+};
+
+typedef struct ipmi_fru_bloc {
+	struct ipmi_fru_bloc * next;
+	uint16_t start;
+	uint16_t size;
+	uint8_t  blocId[32];
+} t_ipmi_fru_bloc;
+
+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);
+
+#endif /* IPMI_FRU_H */

+ 243 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_fwum.h

@@ -0,0 +1,243 @@
+/*
+ * 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_KFWUM_H
+# define IPMI_KFWUM_H
+
+#include <inttypes.h>
+#include <ipmitool/ipmi.h>
+
+/* KFWUM Version */
+# define VER_MAJOR        1
+# define VER_MINOR        3
+/* Minimum size (IPMB/IOL/old protocol) */
+# define KFWUM_SMALL_BUFFER     32
+/* Maximum size on KCS interface */
+# define KFWUM_BIG_BUFFER       32
+# define MAX_BUFFER_SIZE          1024*16
+
+/* 3 address + 1 size + 1 checksum + 1 command */
+# define KFWUM_OLD_CMD_OVERHEAD 6
+/* 1 sequence + 1 size + 1 checksum + 1 command */
+# define KFWUM_NEW_CMD_OVERHEAD 4
+# define KFWUM_PAGE_SIZE        256
+
+# define FWUM_SAVE_FIRMWARE_NO_RESPONSE_LIMIT 6
+# define FWUM_MAX_UPLOAD_RETRY 6
+
+# define TRACE_LOG_CHUNK_COUNT 7
+# define TRACE_LOG_CHUNK_SIZE  7
+# define TRACE_LOG_ATT_COUNT   3
+
+# define IN_FIRMWARE_INFO_OFFSET_LOCATION           0x5a0
+# define IN_FIRMWARE_INFO_SIZE                      20
+# define IN_FIRMWARE_INFO_OFFSET_FILE_SIZE          0
+# define IN_FIRMWARE_INFO_OFFSET_CHECKSUM           4
+# define IN_FIRMWARE_INFO_OFFSET_BOARD_ID           6
+# define IN_FIRMWARE_INFO_OFFSET_DEVICE_ID          8
+# define IN_FIRMWARE_INFO_OFFSET_TABLE_VERSION      9
+# define IN_FIRMWARE_INFO_OFFSET_IMPLEMENT_REV      10
+# define IN_FIRMWARE_INFO_OFFSET_VER_MAJOROR      11
+# define IN_FIRMWARE_INFO_OFFSET_VER_MINORSUB     12
+# define IN_FIRMWARE_INFO_OFFSET_SDR_REV            13
+# define IN_FIRMWARE_INFO_OFFSET_IANA0              14
+# define IN_FIRMWARE_INFO_OFFSET_IANA1              15
+# define IN_FIRMWARE_INFO_OFFSET_IANA2              16
+
+# define KWUM_GET_BYTE_AT_OFFSET(pBuffer,os)            pBuffer[os]
+
+int ipmi_fwum_main(struct ipmi_intf *, int, char **);
+
+typedef enum eKFWUM_BoardList
+{
+	KFWUM_BOARD_KONTRON_UNKNOWN = 0,
+	KFWUM_BOARD_KONTRON_5002 = 5002,
+} tKFWUM_BoardList;
+
+typedef struct sKFWUM_BoardInfo
+{
+	tKFWUM_BoardList boardId;
+	IPMI_OEM  iana;
+} tKFWUM_BoardInfo;
+
+typedef enum eKFWUM_DownloadType
+{
+	KFWUM_DOWNLOAD_TYPE_ADDRESS = 0,
+	KFWUM_DOWNLOAD_TYPE_SEQUENCE,
+} tKFWUM_DownloadType;
+
+typedef enum eKFWUM_DownloadBuffferType
+{
+	KFWUM_SMALL_BUFFER_TYPE = 0,
+	KFUMW_BIG_BUFFER_TYPE
+} tKFWUM_DownloadBuffferType;
+
+typedef struct sKFWUM_InFirmwareInfo
+{
+	unsigned long   fileSize;
+	unsigned short  checksum;
+	unsigned short  sumToRemoveFromChecksum;
+	/* Since the checksum is added in the bin
+	 * after the checksum is calculated, we
+	 * need to remove the each byte value.  This
+	 * byte will contain the addition of both bytes
+	 */
+	tKFWUM_BoardList boardId;
+	unsigned char   deviceId;
+	unsigned char   tableVers;
+	unsigned char   implRev;
+	unsigned char   versMajor;
+	unsigned char   versMinor;
+	unsigned char   versSubMinor;
+	unsigned char   sdrRev;
+	IPMI_OEM iana;
+} tKFWUM_InFirmwareInfo;
+
+typedef struct sKFWUM_SaveFirmwareInfo
+{
+	tKFWUM_DownloadType downloadType;
+	unsigned char       bufferSize;
+	unsigned char       overheadSize;
+} tKFWUM_SaveFirmwareInfo;
+
+/* COMMANDS */
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(1)
+# endif
+struct KfwumGetInfoResp {
+	unsigned char protocolRevision;
+	unsigned char controllerDeviceId;
+	struct {
+		unsigned char mode:1;
+		unsigned char seqAdd:1;
+		unsigned char res : 6;
+	} byte;
+	unsigned char firmRev1;
+	unsigned char firmRev2;
+	unsigned char numBank;
+} ATTRIBUTE_PACKING;
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(0)
+# endif
+
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(1)
+# endif
+struct KfwumGetStatusResp {
+	unsigned char bankState;
+	unsigned char firmLengthLSB;
+	unsigned char firmLengthMid;
+	unsigned char firmLengthMSB;
+	unsigned char firmRev1;
+	unsigned char firmRev2;
+	unsigned char firmRev3;
+} ATTRIBUTE_PACKING;
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(0)
+# endif
+
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(1)
+# endif
+struct KfwumManualRollbackReq {
+	unsigned char type;
+} ATTRIBUTE_PACKING;
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(0)
+# endif
+
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(1)
+# endif
+struct KfwumStartFirmwareDownloadReq {
+	unsigned char lengthLSB;
+	unsigned char lengthMid;
+	unsigned char lengthMSB;
+	unsigned char paddingLSB;
+	unsigned char paddingMSB;
+	unsigned char useSequence;
+} ATTRIBUTE_PACKING;
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(0)
+# endif
+
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(1)
+# endif
+struct KfwumStartFirmwareDownloadResp {
+	unsigned char bank;
+} ATTRIBUTE_PACKING;
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(0)
+# endif
+
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(1)
+# endif
+struct KfwumSaveFirmwareAddressReq
+{
+	unsigned char addressLSB;
+	unsigned char addressMid;
+	unsigned char addressMSB;
+	unsigned char numBytes;
+	unsigned char txBuf[KFWUM_SMALL_BUFFER-KFWUM_OLD_CMD_OVERHEAD];
+} ATTRIBUTE_PACKING;
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(0)
+# endif
+
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(1)
+# endif
+struct KfwumSaveFirmwareSequenceReq
+{
+	unsigned char sequenceNumber;
+	unsigned char txBuf[KFWUM_BIG_BUFFER];
+} ATTRIBUTE_PACKING;
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(0)
+# endif
+
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(1)
+# endif
+struct KfwumFinishFirmwareDownloadReq {
+	unsigned char versionMaj;
+	unsigned char versionMinSub;
+	unsigned char versionSdr;
+	unsigned char reserved;
+} ATTRIBUTE_PACKING;
+# ifdef HAVE_PRAGMA_PACK
+#  pragma pack(0)
+# endif
+
+#endif /* IPMI_KFWUM_H */

+ 48 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_gendev.h

@@ -0,0 +1,48 @@
+/*
+ * 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 */

+ 809 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_hpmfwupg.h

@@ -0,0 +1,809 @@
+/*
+ * 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 **);
+
+/* Agent version */
+#define HPMFWUPG_VERSION_MAJOR    1
+#define HPMFWUPG_VERSION_MINOR    0
+#define HPMFWUPG_VERSION_SUBMINOR 9
+
+/* HPM.1 FIRMWARE UPGRADE COMMANDS (part of PICMG) */
+#define HPMFWUPG_GET_TARGET_UPG_CAPABILITIES 0x2E
+#define HPMFWUPG_GET_COMPONENT_PROPERTIES    0x2F
+#define HPMFWUPG_ABORT_UPGRADE               0x30
+#define HPMFWUPG_INITIATE_UPGRADE_ACTION     0x31
+#define HPMFWUPG_UPLOAD_FIRMWARE_BLOCK       0x32
+#define HPMFWUPG_FINISH_FIRMWARE_UPLOAD      0x33
+#define HPMFWUPG_GET_UPGRADE_STATUS          0x34
+#define HPMFWUPG_ACTIVATE_FIRMWARE           0x35
+#define HPMFWUPG_QUERY_SELFTEST_RESULT       0x36
+#define HPMFWUPG_QUERY_ROLLBACK_STATUS       0x37
+#define HPMFWUPG_MANUAL_FIRMWARE_ROLLBACK    0x38
+
+/*  HPM.1 SPECIFIC COMPLETION CODES */
+#define HPMFWUPG_ROLLBACK_COMPLETED   0x00
+#define HPMFWUPG_COMMAND_IN_PROGRESS  0x80
+#define HPMFWUPG_NOT_SUPPORTED        0x81
+#define HPMFWUPG_SIZE_MISMATCH        0x81
+#define HPMFWUPG_ROLLBACK_FAILURE     0x81
+#define HPMFWUPG_INV_COMP_MASK        0x81
+#define HPMFWUPG__ABORT_FAILURE       0x81
+#define HPMFWUPG_INV_COMP_ID          0x82
+#define HPMFWUPG_INT_CHECKSUM_ERROR   0x82
+#define HPMFWUPG_INV_UPLOAD_MODE      0x82
+#define HPMFWUPG_ROLLBACK_OVERRIDE    0x82
+#define HPMFWUPG_INV_COMP_PROP        0x83
+#define HPMFWUPG_FW_MISMATCH          0x83
+#define HPMFWUPG_ROLLBACK_DENIED      0x83
+
+/*
+ * This error code is used as a temporary PATCH to
+ * the latest Open ipmi driver.  This PATCH
+ * will be removed once a new Open IPMI driver is released.
+ * (Buggy version = 39)
+ */
+#define ENABLE_OPENIPMI_V39_PATCH
+
+#ifdef ENABLE_OPENIPMI_V39_PATCH
+# define RETRY_COUNT_MAX 3
+static int errorCount;
+# define HPMFWUPG_IS_RETRYABLE(error)                                          \
+ ((((error==0x83)||(error==0x82)||(error==0x80)) && (errorCount++<RETRY_COUNT_MAX))?TRUE:FALSE)
+#else
+# define HPMFWUPG_IS_RETRYABLE(error) FALSE
+#endif
+
+/* HPM FIRMWARE UPGRADE GENERAL DEFINITIONS */
+#define HPMFWUPG_PICMG_IDENTIFIER         0
+#define HPMFWUPG_VERSION_SIZE             6
+#define HPMFWUPG_DESC_STRING_LENGTH       12
+#define HPMFWUPG_DEFAULT_INACCESS_TIMEOUT 60 /* sec */
+#define HPMFWUPG_DEFAULT_UPGRADE_TIMEOUT  60 /* sec */
+#define HPMFWUPG_MD5_SIGNATURE_LENGTH     16
+
+/* Component IDs */
+typedef enum eHpmfwupgComponentId {
+	HPMFWUPG_COMPONENT_ID_0 = 0,
+	HPMFWUPG_COMPONENT_ID_1,
+	HPMFWUPG_COMPONENT_ID_2,
+	HPMFWUPG_COMPONENT_ID_3,
+	HPMFWUPG_COMPONENT_ID_4,
+	HPMFWUPG_COMPONENT_ID_5,
+	HPMFWUPG_COMPONENT_ID_6,
+	HPMFWUPG_COMPONENT_ID_7,
+	HPMFWUPG_COMPONENT_ID_MAX
+} tHpmfwupgComponentId;
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgComponentBitMask {
+	union {
+		unsigned char byte;
+		struct {
+#ifdef WORDS_BIGENDIAN
+			unsigned char component7 : 1;
+			unsigned char component6 : 1;
+			unsigned char component5 : 1;
+			unsigned char component4 : 1;
+			unsigned char component3 : 1;
+			unsigned char component2 : 1;
+			unsigned char component1 : 1;
+			unsigned char component0 : 1;
+#else
+			unsigned char component0 : 1;
+			unsigned char component1 : 1;
+			unsigned char component2 : 1;
+			unsigned char component3 : 1;
+			unsigned char component4 : 1;
+			unsigned char component5 : 1;
+			unsigned char component6 : 1;
+			unsigned char component7 : 1;
+#endif
+		} ATTRIBUTE_PACKING bitField;
+	} ATTRIBUTE_PACKING ComponentBits;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+
+static const int HPMFWUPG_SUCCESS = 0;
+static const int HPMFWUPG_ERROR = -1;
+/* Upload firmware specific error codes */
+static const int HPMFWUPG_UPLOAD_BLOCK_LENGTH = 1;
+static const int HPMFWUPG_UPLOAD_RETRY = 2;
+
+
+/* TARGET UPGRADE CAPABILITIES DEFINITIONS */
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetTargetUpgCapabilitiesReq {
+	unsigned char picmgId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetTargetUpgCapabilitiesResp {
+	unsigned char picmgId;
+	unsigned char hpmVersion;
+	union {
+		unsigned char byte;
+		struct {
+#if WORDS_BIGENDIAN
+			unsigned char fwUpgUndesirable    : 1;
+			unsigned char autRollbackOverride : 1;
+			unsigned char ipmcDegradedDurinUpg: 1;
+			unsigned char deferActivation     : 1;
+			unsigned char servAffectDuringUpg : 1;
+			unsigned char manualRollback      : 1;
+			unsigned char autRollback         : 1;
+			unsigned char ipmcSelftestCap     : 1;
+#else
+			unsigned char ipmcSelftestCap     : 1;
+			unsigned char autRollback         : 1;
+			unsigned char manualRollback      : 1;
+			unsigned char servAffectDuringUpg : 1;
+			unsigned char deferActivation     : 1;
+			unsigned char ipmcDegradedDurinUpg: 1;
+			unsigned char autRollbackOverride : 1;
+			unsigned char fwUpgUndesirable    : 1;
+#endif
+		} ATTRIBUTE_PACKING bitField;
+	} ATTRIBUTE_PACKING GlobalCapabilities;
+	unsigned char upgradeTimeout;
+	unsigned char selftestTimeout;
+	unsigned char rollbackTimeout;
+	unsigned char inaccessTimeout;
+	struct HpmfwupgComponentBitMask componentsPresent;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetTargetUpgCapabilitiesCtx {
+	struct HpmfwupgGetTargetUpgCapabilitiesReq req;
+	struct HpmfwupgGetTargetUpgCapabilitiesResp resp;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+/* COMPONENT PROPERTIES DEFINITIONS */
+typedef enum eHpmfwupgCompPropertiesSelect {
+	HPMFWUPG_COMP_GEN_PROPERTIES = 0,
+	HPMFWUPG_COMP_CURRENT_VERSION,
+	HPMFWUPG_COMP_DESCRIPTION_STRING,
+	HPMFWUPG_COMP_ROLLBACK_FIRMWARE_VERSION,
+	HPMFWUPG_COMP_DEFERRED_FIRMWARE_VERSION,
+	HPMFWUPG_COMP_RESERVED,
+	HPMFWUPG_COMP_OEM_PROPERTIES = 192
+} tHpmfwupgCompPropertiesSelect;
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetComponentPropertiesReq {
+	unsigned char picmgId;
+	unsigned char componentId;
+	unsigned char selector;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetGeneralPropResp {
+	unsigned char picmgId;
+	union {
+		unsigned char byte;
+		struct {
+#if WORDS_BIGENDIAN
+			unsigned char reserved           : 2;
+			unsigned char payloadColdReset   : 1;
+			unsigned char deferredActivation : 1;
+			unsigned char comparisonSupport  : 1;
+			unsigned char preparationSupport : 1;
+			unsigned char rollbackBackup     : 2;
+#else
+			unsigned char rollbackBackup     : 2;
+			unsigned char preparationSupport : 1;
+			unsigned char comparisonSupport  : 1;
+			unsigned char deferredActivation : 1;
+			unsigned char payloadColdReset   : 1;
+			unsigned char reserved           : 2;
+#endif
+		} ATTRIBUTE_PACKING bitfield;
+	} ATTRIBUTE_PACKING GeneralCompProperties;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetCurrentVersionResp {
+	unsigned char picmgId;
+	unsigned char currentVersion[HPMFWUPG_VERSION_SIZE];
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetDescStringResp {
+	unsigned char picmgId;
+	char descString[HPMFWUPG_DESC_STRING_LENGTH];
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetRollbackFwVersionResp {
+	unsigned char picmgId;
+	unsigned char rollbackFwVersion[HPMFWUPG_VERSION_SIZE];
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetDeferredFwVersionResp {
+	unsigned char picmgId;
+	unsigned char deferredFwVersion[HPMFWUPG_VERSION_SIZE];
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+/* GetComponentProperties - OEM properties (192) */
+#define HPMFWUPG_OEM_LENGTH 4
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetOemProperties {
+	unsigned char picmgId;
+	unsigned char oemRspData[HPMFWUPG_OEM_LENGTH];
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetComponentPropertiesResp {
+	union {
+		struct HpmfwupgGetGeneralPropResp       generalPropResp;
+		struct HpmfwupgGetCurrentVersionResp    currentVersionResp;
+		struct HpmfwupgGetDescStringResp        descStringResp;
+		struct HpmfwupgGetRollbackFwVersionResp rollbackFwVersionResp;
+		struct HpmfwupgGetDeferredFwVersionResp deferredFwVersionResp;
+		struct HpmfwupgGetOemProperties         oemProperties;
+	} ATTRIBUTE_PACKING Response;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetComponentPropertiesCtx {
+	struct HpmfwupgGetComponentPropertiesReq  req;
+	struct HpmfwupgGetComponentPropertiesResp resp;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+/*  ABORT UPGRADE DEFINITIONS */
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgAbortUpgradeReq {
+	unsigned char picmgId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgAbortUpgradeResp {
+	unsigned char picmgId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgAbortUpgradeCtx {
+	struct HpmfwupgAbortUpgradeReq  req;
+	struct HpmfwupgAbortUpgradeResp resp;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+/* UPGRADE ACTIONS DEFINITIONS */
+typedef enum eHpmfwupgUpgradeAction {
+	HPMFWUPG_UPGRADE_ACTION_BACKUP = 0,
+	HPMFWUPG_UPGRADE_ACTION_PREPARE,
+	HPMFWUPG_UPGRADE_ACTION_UPGRADE,
+	HPMFWUPG_UPGRADE_ACTION_COMPARE,
+	HPMFWUPG_UPGRADE_ACTION_INVALID = 0xff
+}  tHpmfwupgUpgradeAction;
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgInitiateUpgradeActionReq {
+	unsigned char picmgId;
+	struct HpmfwupgComponentBitMask componentsMask;
+	unsigned char upgradeAction;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgInitiateUpgradeActionResp {
+	unsigned char picmgId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgInitiateUpgradeActionCtx {
+	struct HpmfwupgInitiateUpgradeActionReq  req;
+	struct HpmfwupgInitiateUpgradeActionResp resp;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+/* UPLOAD FIRMWARE BLOCK DEFINITIONS */
+#define HPMFWUPG_SEND_DATA_COUNT_KCS   30
+#define HPMFWUPG_SEND_DATA_COUNT_LAN   25
+#define HPMFWUPG_SEND_DATA_COUNT_IPMB  26
+#define HPMFWUPG_SEND_DATA_COUNT_IPMBL 26
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgUploadFirmwareBlockReq {
+	unsigned char picmgId;
+	unsigned char blockNumber;
+	unsigned char data[];
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgUploadFirmwareBlockResp {
+	unsigned char picmgId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgUploadFirmwareBlockCtx {
+	struct HpmfwupgUploadFirmwareBlockReq * req;
+	struct HpmfwupgUploadFirmwareBlockResp resp;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+/* FINISH FIRMWARE UPLOAD DEFINITIONS */
+#define HPMFWUPG_IMAGE_SIZE_BYTE_COUNT 4
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgFinishFirmwareUploadReq {
+	unsigned char picmgId;
+	unsigned char componentId;
+	unsigned char imageLength[HPMFWUPG_IMAGE_SIZE_BYTE_COUNT];
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgFinishFirmwareUploadResp {
+	unsigned char picmgId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgFinishFirmwareUploadCtx {
+	struct HpmfwupgFinishFirmwareUploadReq  req;
+	struct HpmfwupgFinishFirmwareUploadResp resp;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+/* ACTIVATE FW DEFINITIONS */
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgActivateFirmwareReq {
+	unsigned char picmgId;
+	unsigned char rollback_override;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgActivateFirmwareResp {
+	unsigned char picmgId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgActivateFirmwareCtx {
+	struct HpmfwupgActivateFirmwareReq  req;
+	struct HpmfwupgActivateFirmwareResp resp;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+/* GET UPGRADE STATUS DEFINITIONS */
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetUpgradeStatusReq {
+	unsigned char picmgId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetUpgradeStatusResp {
+	unsigned char picmgId;
+	unsigned char cmdInProcess;
+	unsigned char lastCmdCompCode;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgGetUpgradeStatusCtx {
+	struct HpmfwupgGetUpgradeStatusReq  req;
+	struct HpmfwupgGetUpgradeStatusResp resp;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+/* MANUAL FW ROLLBACK DEFINITIONS */
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgManualFirmwareRollbackReq {
+	unsigned char picmgId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgManualFirmwareRollbackResp {
+	unsigned char picmgId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+struct HpmfwupgManualFirmwareRollbackCtx {
+	struct HpmfwupgManualFirmwareRollbackReq  req;
+	struct HpmfwupgManualFirmwareRollbackResp resp;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+/* QUERY ROLLBACK STATUS DEFINITIONS */
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgQueryRollbackStatusReq {
+	unsigned char picmgId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgQueryRollbackStatusResp {
+	unsigned char picmgId;
+	struct HpmfwupgComponentBitMask rollbackComp;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgQueryRollbackStatusCtx {
+	struct HpmfwupgQueryRollbackStatusReq  req;
+	struct HpmfwupgQueryRollbackStatusResp resp;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+/* QUERY SELF TEST RESULT DEFINITIONS */
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct  HpmfwupgQuerySelftestResultReq {
+	unsigned char picmgId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct  HpmfwupgQuerySelftestResultResp {
+	unsigned char picmgId;
+	unsigned char result1;
+	unsigned char result2;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgQuerySelftestResultCtx {
+	struct HpmfwupgQuerySelftestResultReq  req;
+	struct HpmfwupgQuerySelftestResultResp resp;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+/* HPM.1 IMAGE DEFINITIONS */
+#define HPMFWUPG_HEADER_SIGNATURE_LENGTH 8
+#define HPMFWUPG_MANUFATURER_ID_LENGTH   3
+#define HPMFWUPG_PRODUCT_ID_LENGTH       2
+#define HPMFWUPG_TIME_LENGTH             4
+#define HPMFWUPG_TIMEOUT_LENGTH          1
+#define HPMFWUPG_COMP_REVISION_LENGTH    2
+#define HPMFWUPG_FIRM_REVISION_LENGTH    6
+#define HPMFWUPG_IMAGE_HEADER_VERSION    0
+#define HPMFWUPG_IMAGE_SIGNATURE "PICMGFWU"
+
+#ifdef HAVE_PRAGMA_PACK
+#pragma pack(1)
+#endif
+struct HpmfwupgImageHeader {
+	char           signature[HPMFWUPG_HEADER_SIGNATURE_LENGTH];
+	unsigned char  formatVersion;
+	unsigned char  deviceId;
+	unsigned char  manId[HPMFWUPG_MANUFATURER_ID_LENGTH];
+	unsigned char  prodId[HPMFWUPG_PRODUCT_ID_LENGTH];
+	unsigned char  time[HPMFWUPG_TIME_LENGTH];
+	union {
+		struct {
+#if WORDS_BIGENDIAN
+			unsigned char imageSelfTest   : 1;
+			unsigned char autRollback     : 1;
+			unsigned char manRollback     : 1;
+			unsigned char servAffected    : 1;
+			unsigned char reserved        : 4;
+#else
+			unsigned char reserved        : 4;
+			unsigned char servAffected    : 1;
+			unsigned char manRollback     : 1;
+			unsigned char autRollback     : 1;
+			unsigned char imageSelfTest   : 1;
+#endif
+		} ATTRIBUTE_PACKING bitField;
+		unsigned char byte;
+	}ATTRIBUTE_PACKING imageCapabilities;
+	struct HpmfwupgComponentBitMask components;
+	unsigned char  selfTestTimeout;
+	unsigned char  rollbackTimeout;
+	unsigned char  inaccessTimeout;
+	unsigned char  compRevision[HPMFWUPG_COMP_REVISION_LENGTH];
+	unsigned char  firmRevision[HPMFWUPG_FIRM_REVISION_LENGTH];
+	unsigned short oemDataLength;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#define HPMFWUPG_DESCRIPTION_LENGTH   21
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgActionRecord {
+	unsigned char  actionType;
+	struct HpmfwupgComponentBitMask components;
+	unsigned char  checksum;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#define HPMFWUPG_FIRMWARE_SIZE_LENGTH 4
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgFirmwareImage {
+	unsigned char version[HPMFWUPG_FIRM_REVISION_LENGTH];
+	char          desc[HPMFWUPG_DESCRIPTION_LENGTH];
+	unsigned char length[HPMFWUPG_FIRMWARE_SIZE_LENGTH];
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(1)
+#endif
+struct HpmfwupgUpgradeCtx {
+	struct HpmfwupgComponentBitMask compUpdateMask;
+	unsigned int   imageSize;
+	unsigned char* pImageData;
+	unsigned char  componentId;
+	struct HpmfwupgGetTargetUpgCapabilitiesResp targetCap;
+	struct HpmfwupgGetGeneralPropResp genCompProp[HPMFWUPG_COMPONENT_ID_MAX];
+	struct ipm_devid_rsp devId;
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+# pragma pack(0)
+#endif
+
+typedef enum eHpmfwupgActionType {
+	HPMFWUPG_ACTION_BACKUP_COMPONENTS = 0,
+	HPMFWUPG_ACTION_PREPARE_COMPONENTS,
+	HPMFWUPG_ACTION_UPLOAD_FIRMWARE,
+	HPMFWUPG_ACTION_RESERVED = 0xFF
+} tHpmfwupgActionType;
+
+/* FUNCTIONS PROTOTYPES */
+#define HPMFWUPG_MAJORMINOR_VERSION_SIZE        2
+
+/* Options added for user to check the version and to view both the FILE and
+ * TARGET Version
+ */
+#define VIEW_MODE                     0x01
+#define DEBUG_MODE                    0x02
+#define FORCE_MODE                    0x04
+#define COMPARE_MODE                  0x08
+
+typedef struct _VERSIONINFO {
+	unsigned char componentId;
+	unsigned char targetMajor;
+	unsigned char targetMinor;
+	unsigned char targetAux[4];
+	unsigned char rollbackMajor;
+	unsigned char rollbackMinor;
+	unsigned char rollbackAux[4];
+	unsigned char deferredMajor;
+	unsigned char deferredMinor;
+	unsigned char deferredAux[4];
+	unsigned char imageMajor;
+	unsigned char imageMinor;
+	unsigned char imageAux[4];
+	unsigned char coldResetRequired;
+	unsigned char rollbackSupported;
+	unsigned char deferredActivationSupported;
+	char descString[HPMFWUPG_DESC_STRING_LENGTH + 1];
+}VERSIONINFO, *PVERSIONINFO;
+
+VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
+
+#define TARGET_VER (0x01)
+#define ROLLBACK_VER (0x02)
+#define IMAGE_VER (0x04)
+
+#endif /* IPMI_KFWUM_H */

+ 45 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_ime.h

@@ -0,0 +1,45 @@
+/*
+ * 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 */

+ 234 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_intf.h

@@ -0,0 +1,234 @@
+/*
+ * 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_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      IPMI_MAX_MD_SIZE
+#define IPMI_KG_BUFFER_SIZE       21 /* key plus null byte */
+
+struct ipmi_session_params {
+	char * hostname;
+	uint8_t username[17];
+	uint8_t authcode_set[IPMI_AUTHCODE_BUFFER_SIZE + 1];
+	uint8_t authtype_set;
+	uint8_t privlvl;
+	uint8_t cipher_suite_id;
+	char sol_escape_char;
+	int password;
+	int port;
+	int retry;
+	uint32_t timeout;
+	uint8_t kg[IPMI_KG_BUFFER_SIZE];   /* BMC key */
+	uint8_t lookupbit;
+};
+
+#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
+
+struct ipmi_session {
+	int active;
+	uint32_t session_id;
+	uint32_t in_seq;
+	uint32_t out_seq;
+
+	uint8_t authcode[IPMI_AUTHCODE_BUFFER_SIZE + 1];
+	uint8_t challenge[16];
+	uint8_t authtype;
+	uint8_t authstatus;
+	uint8_t authextra;
+	uint32_t timeout;
+
+	struct sockaddr_storage 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;
+
+		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 sik_len;                   /* Session Integrity key length */
+		uint8_t  kg[IPMI_KG_BUFFER_SIZE];   /* BMC key */
+		uint8_t  k1[IPMI_MAX_MD_SIZE];      /* Used for Integrity checking? */
+		uint8_t k1_len;                    /* K1 key length */
+		uint8_t  k2[IPMI_MAX_MD_SIZE];      /* First 16 bytes used for AES  */
+		uint8_t k2_len;                    /* K2 key length */
+	} 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;
+	int vita_avail;
+	IPMI_OEM manufacturer_id;
+	int ai_family;
+
+	struct ipmi_session_params ssn_params;
+	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;
+	uint16_t max_request_data_size;
+	uint16_t max_response_data_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);
+	void (*set_max_request_data_size)(struct ipmi_intf * intf, uint16_t size);
+	void (*set_max_response_data_size)(struct ipmi_intf * intf, uint16_t size);
+};
+
+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, const uint8_t *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_intf_session_cleanup(struct ipmi_intf *intf);
+void ipmi_cleanup(struct ipmi_intf * intf);
+
+#if defined(IPMI_INTF_LAN) || defined (IPMI_INTF_LANPLUS)
+int  ipmi_intf_socket_connect(struct ipmi_intf * intf);
+#endif
+#endif /* IPMI_INTF_H */

+ 57 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_isol.h

@@ -0,0 +1,57 @@
+/*
+ * 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 */

+ 46 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_kontronoem.h

@@ -0,0 +1,46 @@
+/*
+ * 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 */

+ 168 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_lanp.h

@@ -0,0 +1,168 @@
+/*
+ * 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_LANP_H
+#define IPMI_LANP_H
+
+#include <ipmitool/ipmi.h>
+
+#define IPMI_LAN_SET_CONFIG	0x01
+#define IPMI_LAN_GET_CONFIG	0x02
+#define IPMI_LAN_SUSPEND_ARP	0x03
+# define IPMI_LAN_SUSPEND_ARP_RESP (2)
+# define IPMI_LAN_SUSPEND_ARP_GRAT (1)
+#define IPMI_LAN_GET_STAT	0x04
+
+#define IPMI_CHANNEL_NUMBER_MAX	0xe
+
+#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
+
+enum {
+	IPMI_LANP_SET_IN_PROGRESS,
+	IPMI_LANP_AUTH_TYPE,
+	IPMI_LANP_AUTH_TYPE_ENABLE,
+	IPMI_LANP_IP_ADDR,
+	IPMI_LANP_IP_ADDR_SRC,
+	IPMI_LANP_MAC_ADDR,            /* 5 */
+	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_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_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_VLAN_TAGS,
+	IPMI_LANP_BAD_PASS_THRESH,
+	IPMI_LANP_IP6_SUPPORT=50,
+	IPMI_LANP_IP6_ENABLES,
+	IPMI_LANP_IP6_TRAFFIC_CLASS,
+	IPMI_LANP_IP6_STATIC_HOPS,
+	IPMI_LANP_IP6_FLOW_LABEL,
+	IPMI_LANP_IP6_STATUS,
+	IPMI_LANP_IP6_STATIC_ADDR,
+	IPMI_LANP_IP6_STATIC_DUID_STG,
+	IPMI_LANP_IP6_STATIC_DUID,
+	IPMI_LANP_IP6_DYNAMIC_ADDR,
+	IPMI_LANP_IP6_DYNAMIC_DUID_STG,
+	IPMI_LANP_IP6_DYNAMIC_DUID,
+	IPMI_LANP_IP6_DHCP6_CFG_SUP,
+	IPMI_LANP_IP6_DHCP6_CFG,
+	IPMI_LANP_IP6_ROUTER_CFG,
+	IPMI_LANP_IP6_STATIC_RTR1_ADDR,
+	IPMI_LANP_IP6_STATIC_RTR1_MAC,
+	IPMI_LANP_IP6_STATIC_RTR1_PFX_LEN,
+	IPMI_LANP_IP6_STATIC_RTR1_PFX,
+	IPMI_LANP_IP6_STATIC_RTR2_ADDR,
+	IPMI_LANP_IP6_STATIC_RTR2_MAC,
+	IPMI_LANP_IP6_STATIC_RTR2_PFX_LEN,
+	IPMI_LANP_IP6_STATIC_RTR2_PFX,
+	IPMI_LANP_IP6_NUM_DYNAMIC_RTRS,
+	IPMI_LANP_IP6_DYNAMIC_RTR_ADDR,
+	IPMI_LANP_IP6_DYNAMIC_RTR_MAC,
+	IPMI_LANP_IP6_DYNAMIC_RTR_PFX_LEN,
+	IPMI_LANP_IP6_DYNAMIC_RTR_PFX,
+	IPMI_LANP_IP6_DYNAMIC_HOPS,
+	IPMI_LANP_IP6_NDSLAAC_CFG_SUP,
+	IPMI_LANP_IP6_NDSLAAC_CFG,
+	IPMI_LANP_OEM_ALERT_STRING=96,
+	IPMI_LANP_ALERT_RETRY=97,
+	IPMI_LANP_UTC_OFFSET=98,
+	IPMI_LANP_DHCP_SERVER_IP=192,
+	IPMI_LANP_DHCP_SERVER_MAC=193,
+	IPMI_LANP_DHCP_ENABLE=194,
+	IPMI_LANP_CHAN_ACCESS_MODE=201,
+};
+
+static struct lan_param {
+	int cmd;
+	int size;
+	char desc[24];
+	uint8_t * data;
+	int data_len;
+} ipmi_lan_params[] __attribute__((unused)) = {
+	{ IPMI_LANP_SET_IN_PROGRESS,	1,	"Set in Progress", NULL, 0 },
+	{ IPMI_LANP_AUTH_TYPE,		1,	"Auth Type Support", NULL, 0 },
+	{ IPMI_LANP_AUTH_TYPE_ENABLE,	5,	"Auth Type Enable", NULL, 0	},
+	{ IPMI_LANP_IP_ADDR,		4,	"IP Address", NULL, 0 },
+	{ IPMI_LANP_IP_ADDR_SRC,	1,	"IP Address Source", NULL, 0 },
+	{ IPMI_LANP_MAC_ADDR,		6,	"MAC Address", NULL, 0 }, /* 5 */
+	{ IPMI_LANP_SUBNET_MASK,	4,	"Subnet Mask", NULL, 0 },
+	{ IPMI_LANP_IP_HEADER,		3,	"IP Header", NULL, 0 },
+	{ IPMI_LANP_PRI_RMCP_PORT,	2,	"Primary RMCP Port", NULL, 0 },
+	{ IPMI_LANP_SEC_RMCP_PORT,	2,	"Secondary RMCP Port", NULL, 0 },
+	{ IPMI_LANP_BMC_ARP,		1,	"BMC ARP Control", NULL, 0}, /* 10 */
+	{ IPMI_LANP_GRAT_ARP,		1,	"Gratituous ARP Intrvl", NULL, 0 },
+	{ IPMI_LANP_DEF_GATEWAY_IP,	4,	"Default Gateway IP", NULL, 0 },
+	{ IPMI_LANP_DEF_GATEWAY_MAC,	6,	"Default Gateway MAC", NULL, 0 },
+	{ IPMI_LANP_BAK_GATEWAY_IP,	4,	"Backup Gateway IP", NULL, 0 },
+	{ IPMI_LANP_BAK_GATEWAY_MAC,	6,	"Backup Gateway MAC", NULL, 0 }, /* 15 */
+	{ IPMI_LANP_SNMP_STRING,	18,	"SNMP Community String", NULL, 0 },
+	{ IPMI_LANP_NUM_DEST,		1,	"Number of Destinations", NULL, 0 },
+	{ IPMI_LANP_DEST_TYPE,		4,	"Destination Type", NULL, 0 },
+	{ IPMI_LANP_DEST_ADDR,		13,	"Destination Addresses", NULL, 0 },
+	{ IPMI_LANP_VLAN_ID,		2,	"802.1q VLAN ID", NULL, 0 }, /* 20 */
+	{ IPMI_LANP_VLAN_PRIORITY,	1,	"802.1q VLAN Priority", NULL, 0 },
+	{ IPMI_LANP_RMCP_CIPHER_SUPPORT,1,	"RMCP+ Cipher Suite Count", NULL, 0 },
+	{ IPMI_LANP_RMCP_CIPHERS,	16,	"RMCP+ Cipher Suites", NULL, 0 },
+	{ IPMI_LANP_RMCP_PRIV_LEVELS,	9,	"Cipher Suite Priv Max", NULL, 0 },
+	{ IPMI_LANP_BAD_PASS_THRESH,	6,	"Bad Password Threshold", NULL, 0 },
+	{ IPMI_LANP_OEM_ALERT_STRING,	28,	"OEM Alert String", NULL, 0 }, /* 25 */
+	{ IPMI_LANP_ALERT_RETRY,	1,	"Alert Retry Algorithm", NULL, 0 },
+	{ IPMI_LANP_UTC_OFFSET,		3,	"UTC Offset", NULL, 0 },
+	{ IPMI_LANP_DHCP_SERVER_IP,	4,	"DHCP Server IP", NULL, 0 },
+	{ IPMI_LANP_DHCP_SERVER_MAC,	6,	"DHDP Server MAC", NULL, 0},
+	{ IPMI_LANP_DHCP_ENABLE,	1,	"DHCP Enable", NULL, 0 }, /* 30 */
+	{ IPMI_LANP_CHAN_ACCESS_MODE,	2,	"Channel Access Mode", NULL, 0 },
+	{ -1, -1, "", NULL, -1 }
+};
+
+int  ipmi_lanp_main(struct ipmi_intf *, int, char **);
+
+uint8_t find_lan_channel(struct ipmi_intf *intf, uint8_t start);
+
+#endif /*IPMI_LANP_H*/

+ 54 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_lanp6.h

@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2016 Pentair Technical Products. All right 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 Pentair Technical Products 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 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
+ * PENTAIR TECHNICAL SOLUTIONS 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_LANP6_H
+#define IPMI_LANP6_H
+
+#include <ipmitool/ipmi_intf.h>
+
+/*
+ * LAN configuration parameter.
+ */
+struct ipmi_lanp {
+	int selector;
+	const char *name;
+	int size;
+};
+
+/*
+ * Private data for LAN configuration.
+ */
+struct ipmi_lanp_priv {
+	struct ipmi_intf *intf;
+	int channel;
+};
+
+#endif /* IPMI_LANP6_H */

+ 42 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_main.h

@@ -0,0 +1,42 @@
+/*
+ * 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 */

+ 194 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_mc.h

@@ -0,0 +1,194 @@
+/*
+ * 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)
+
+/* Structure follow the IPMI V.2 Rev 1.0
+ * See Table 20-10 */
+#ifdef HAVE_PRAGMA_PACK
+#pragma pack(1)
+#endif
+struct ipmi_guid_t {
+	uint32_t  time_low;	/* timestamp low field */
+	uint16_t  time_mid;	/* timestamp middle field */
+	uint16_t  time_hi_and_version; /* timestamp high field and version number */
+	uint8_t   clock_seq_hi_variant;/* clock sequence high field and variant */
+	uint8_t   clock_seq_low; /* clock sequence low field */
+	uint8_t   node[6];	/* node */
+} ATTRIBUTE_PACKING;
+#ifdef HAVE_PRAGMA_PACK
+#pragma pack(0)
+#endif
+
+int _ipmi_mc_get_guid(struct ipmi_intf *, struct ipmi_guid_t *);
+
+#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
+
+/* System Information "Parameter selector" values: */
+#define IPMI_SYSINFO_SET_STATE		0x00
+#define IPMI_SYSINFO_SYSTEM_FW_VERSION	0x01
+#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
+#define IPMI_SYSINFO_DELL_IPV6_COUNT    0xe6
+#define IPMI_SYSINFO_DELL_IPV6_DESTADDR 0xf0
+
+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 */

+ 47 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_oem.h

@@ -0,0 +1,47 @@
+/*
+ * 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*/

+ 967 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_pef.h

@@ -0,0 +1,967 @@
+/*
+ * 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 event_filter_count;
+};
+
+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_DISABLED 0xF7
+#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_DISABLED 0x7F
+# define PEF_FILTER_ENABLED 0x80
+# 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 id;
+	uint8_t cfg;
+} 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_SET_PEF_CONFIG_PARMS 0x12
+#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
+
+struct pef_cfgparm_set_policy_table_entry
+{
+	uint8_t param_selector;
+	uint8_t policy_id;
+	struct pef_policy_entry entry;
+} ATTRIBUTE_PACKING;
+
+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 */

+ 211 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_picmg.h

@@ -0,0 +1,211 @@
+
+/*
+	(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

+ 44 - 0
app/ipmitool-1.8.18/include/ipmitool/ipmi_raw.h

@@ -0,0 +1,44 @@
+/*
+ * 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 */

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott