123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617 |
- /****************************************************************
- ****************************************************************
- ** **
- ** (C)Copyright 2005-2006, American Megatrends Inc. **
- ** **
- ** All Rights Reserved. **
- ** **
- ** 6145-F, Northbelt Parkway, Norcross, **
- ** **
- ** Georgia - 30071, USA. Phone-(770)-246-8600. **
- ** **
- ****************************************************************
- ****************************************************************
- *****************************************************************
- *
- * IPMI_App.h
- * AppDevice Commands Handler
- *
- * Author: Govind Kothandapani <govindk@ami.com>
- * : Rama Bisa <ramab@ami.com>
- * : Basavaraj Astekar <basavaraja@ami.com>
- * : Bakka Ravinder Reddy <bakkar@ami.com>
- *
- *****************************************************************/
- #ifndef IPMI_APPDEV_H
- #define IPMI_APPDEV_H
- #include "com_IPMIDefs.h"
- /*** Macro definition ***/
- #define CHALLENGE_STR_LEN 16
- #define AUTH_CODE_LEN 16
- #define MAX_APP_CONF_PARAM 4
- #define MIN_SYSINFO_OEM_CONF_PARAM 192
- #define MAX_SYSINFO_OEM_CONF_PARAM 255
- /* Added to Support IPMI v2.0/RMCP+ Integrity Algorithm Number */
- #define AUTH_CODE_HASH_LEN 20
- #define HASH_DATA_LEN 16
- #define MAX_I2C_BUFFER_SIZE 50
- #define IPMI15_MAX_PASSWORD_LEN 16
- #define SIXTEEN_COUNT_WINDOW_LEN 16
- #define SEQNUM_ROLLOVER 0xFFFFFFFF
- #define RMCPPLUS_SEQLOWLIMIT 16
- #define RMCPPLUS_SEQUPLIMIT 15
- #define EIGHT_COUNT_WINDOW_LEN 8
- #define MAX_FW_VER_LENGTH 254
- #define MAX_SYS_NAME_LENGTH 254
- #define MAX_PRIM_OS_NAME_LENGTH 254
- #define MAX_OS_NAME_LENGTH 254
- #define MAX_BLOCK_SIZE 16
- #define SYS_INFO_SET_COMPLETE 0x00
- #define SYS_INFO_SET_IN_PROGRESS 0x01
- #define SYS_INFO_COMMIT_WRITE 0x02
- #define PARAM_PRESENT_REVISION 0x11
- #define PARAM_OLDER_REVISION 0x00
- #define SET_IN_PROGRESS_PARAM 0x00
- #define SYS_FW_VERSION_PARAM 0x01
- #define SYS_NAME_PARAM 0x02
- #define PRIM_OS_NAME_PARAM 0x03
- #define OS_NAME_PARAM 0x04
- #define MAX_PARAM_SELECTOR OS_NAME_PARAM +1 /* Last Parameter + 1 */
- #define GET_PARAM_REV_ONLY 0x80
- #pragma pack( 1 )
- /* SetWDTReq_T */
- typedef struct
- {
- uint8_t TmrUse;
- uint8_t TmrActions;
- uint8_t PreTimeOutInterval;
- uint8_t ExpirationFlag;
- uint16_t InitCountDown;
- } SetWDTReq_T;
- /* GetWDTRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- SetWDTReq_T CurrentSettings;
- uint16_t PresentCountDown;
- } GetWDTRes_T;
- /* GetBMCGblEnblRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t BMCGblEnblByte;
- } GetBMCGblEnblRes_T;
- /* ClearMsgsFlagReq_T */
- typedef struct
- {
- uint8_t Flag;
- } ClearMsgsFlagReq_T;
- /* GetMsgFlagsRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t MsgFlags;
- } GetMsgFlagsRes_T;
- /* EnblMsgChRcvReq_T */
- typedef struct
- {
- uint8_t ChannelNum;
- uint8_t ChannelState;
- } EnblMsgChRcvReq_T;
- /* EnblMsgChRcvRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t ChannelNum;
- uint8_t ChannelState;
- } EnblMsgChRcvRes_T;
- /* GetMsgRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t ChannelNum;
- } GetMsgRes_T;
- /* SendMsgReq_T */
- typedef struct
- {
- uint8_t ChNoTrackReq;
- } SendMsgReq_T;
- /* SendMsgRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t ResData;
- } SendMsgRes_T;
- /* ReadEvtMsgBufRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t ResData[16];
- } ReadEvtMsgBufRes_T;
- /* GetBTIfcCapRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t NumReqSupported;
- uint8_t InputBufSize;
- uint8_t OutputBufSize;
- uint8_t RespTime;
- uint8_t Retries;
- } GetBTIfcCapRes_T;
- /* GetSysGUIDRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t Node[6];
- uint16_t ClockSeq;
- uint16_t TimeHigh;
- uint16_t TimeMid;
- uint32_t TimeLow;
- } GetSysGUIDRes_T;
- /* GetChAuthCapReq_T */
- typedef struct
- {
- uint8_t ChannelNum;
- uint8_t PrivLevel;
- } GetChAuthCapReq_T;
- /* GetChAuthCapRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t ChannelNum;
- uint8_t AuthType;
- uint8_t PerMsgUserAuthLoginStatus;
- uint8_t ExtCap;
- uint8_t OEMID[3];
- uint8_t OEMAuxData;
- } GetChAuthCapRes_T;
- /* GetSesChallengeReq_T */
- typedef struct
- {
- uint8_t AuthType;
- uint8_t UserName[16];
- } GetSesChallengeReq_T;
- /* GetSesChallengeRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint32_t TempSessionID;
- uint8_t ChallengeString[16];
- } GetSesChallengeRes_T;
- /* ActivateSesReq_T */
- typedef struct
- {
- uint8_t AuthType;
- uint8_t Privilege;
- uint8_t ChallengeString[CHALLENGE_STR_LEN];
- uint32_t OutboundSeq;
- } ActivateSesReq_T;
- /* ActivateSesRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t AuthType;
- uint32_t SessionID;
- uint32_t InboundSeq;
- uint8_t Privilege;
- } ActivateSesRes_T;
- /* SetSesPrivLevelReq_T */
- typedef struct
- {
- uint8_t Privilege;
- } SetSesPrivLevelReq_T;
- /* SetSesPrivLevelRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t Privilege;
- } SetSesPrivLevelRes_T;
- /* GetSesInfoReq_T */
- typedef struct
- {
- uint8_t SessionIndex;
- uint8_t SessionHandleOrID [4];
- } GetSesInfoReq_T;
- /* LANSesInfoRes_T */
- typedef struct
- {
- uint8_t IPAddress[4];
- uint8_t MACAddress[6];
- uint16_t PortNumber;
- } LANSesInfoRes_T;
- /* SerialSesInfoRes_T */
- typedef struct
- {
- uint8_t SessionActivityType;
- uint8_t DestinationSelector;
- uint8_t IPAddress[4];
- uint16_t PortNumber;
- } SerialSesInfoRes_T;
- /* Union SessionInfoRes_T */
- typedef union
- {
- LANSesInfoRes_T LANSesInfo;
- SerialSesInfoRes_T SerialSesInfo;
- } SessionInfoRes_T;
- /* ActiveSesInfo_T */
- typedef struct
- {
- uint8_t UserID;
- uint8_t Privilege;
- uint8_t ChannelNum;
- } ActiveSesInfo_T;
- /* GetSesInfoRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t SessionHandle;
- uint8_t NumPossibleActiveSession;
- uint8_t NumActiveSession;
- ActiveSesInfo_T ActiveSesinfo;
- SessionInfoRes_T SesInfo;
- } GetSesInfoRes_T;
- /* LANIPv6SesInfoRes_T */
- typedef struct
- {
- uint8_t IPv6Address[16];
- uint8_t MACAddress[6];
- uint16_t PortNumber;
- } LANIPv6SesInfoRes_T;
- /* CloseSesReq_T */
- typedef struct
- {
- uint32_t SessionID;
- uint8_t SessionHandle;
- } CloseSesReq_T;
- /* GetAuthCodeReq_T */
- typedef struct
- {
- uint8_t AuthType;
- uint8_t ChannelNum;
- uint8_t UserID;
- uint8_t HashData[HASH_DATA_LEN];
- } GetAuthCodeReq_T;
- /* GetAuthCodeRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t AuthCode[AUTH_CODE_HASH_LEN];
- } GetAuthCodeRes_T;
- /* SetChAccessReq_T */
- typedef struct
- {
- uint8_t ChannelNum;
- uint8_t ChannelAccess;
- uint8_t Privilege;
- } SetChAccessReq_T;
- typedef struct
- {
- uint8_t CompletionCode;
- } SetChAccessRes_T;
- /* GetChAccessReq_T */
- typedef struct
- {
- uint8_t ChannelNum;
- uint8_t AccessFlag;
- } GetChAccessReq_T;
- /* GetChAccessRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t ChannelAccess;
- uint8_t Privilege;
- } GetChAccessRes_T;
- typedef struct
- {
- uint8_t ChannelNum;
- } GetChInfoReq_T;
- /* GetChInfoRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t ChannelNum;
- uint8_t ChannelMedium;
- uint8_t ChannelProtocol;
- uint8_t SessionActiveSupport;
- uint8_t VendorID[3];
- uint8_t AuxiliaryInfo[2];
- } GetChInfoRes_T;
- /* SetUserAccessReq_T */
- typedef struct
- {
- uint8_t ChannelNoUserAccess;
- uint8_t UserID;
- uint8_t AccessLimit;
- uint8_t SessionLimit;
- } SetUserAccessReq_T;
- typedef struct
- {
- uint8_t CompletionCode;
- } SetUserAccessRes_T;
- /* GetUserAccessReq_T */
- typedef struct
- {
- uint8_t ChannelNum;
- uint8_t UserID;
- } GetUserAccessReq_T;
- /* GetUserAccessRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t MaxNoUserID;
- uint8_t CurrentUserID;
- uint8_t FixedUserID;
- uint8_t ChannelAccess;
- } GetUserAccessRes_T;
- /* SetUserNameReq_T */
- typedef struct
- {
- uint8_t UserID;
- uint8_t UserName[MAX_USERNAME_LEN];
- } SetUserNameReq_T;
- typedef struct
- {
- uint8_t CompletionCode;
- } SetUserNameRes_T;
- /*GetUserNameReq_T*/
- typedef struct
- {
- uint8_t UserID;
- } GetUserNameReq_T;
- /* GetUserNameRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t UserName[MAX_USERNAME_LEN];
- } GetUserNameRes_T;
- /* SetUserPswdReq_T */
- typedef struct
- {
- uint8_t UserID;
- uint8_t Operation;
- uint8_t Password[MAX_PASSWORD_LEN];
- } SetUserPswdReq_T;
- /* SetUserPswdReq_T */
- typedef struct
- {
- uint8_t CompletionCode;
- } SetUserPswdRes_T;
- /* MasterWriteReadReq_T */
- typedef struct
- {
- uint8_t BusTypeChNo;
- uint8_t SlaveAddress;
- uint8_t ReadCount;
- uint8_t Data[MAX_I2C_BUFFER_SIZE];
- } MasterWriteReadReq_T;
- /* MasterWriteReadRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t Data[MAX_I2C_BUFFER_SIZE];
- } MasterWriteReadRes_T;
- typedef struct
- {
- uint8_t TypeOfEncoding ;
- uint8_t StringLength;
- uint8_t SysFWVersionName[MAX_FW_VER_LENGTH];
- } SysFWVersion_T;
- typedef struct
- {
- uint8_t TypeOfEncoding_Sys_Name;
- uint8_t StringLength_Sys_Name;
- uint8_t SystemName[MAX_SYS_NAME_LENGTH];
- } SysName_T;
- typedef struct
- {
- uint8_t TypeOfEncoding_PrimaryOSName;
- uint8_t StringLength_PrimaryOSName;
- uint8_t PrimaryOperatingSystemName[MAX_PRIM_OS_NAME_LENGTH];
- } PrimaryOSName_T;
- typedef struct
- {
- uint8_t TypeOfEncoding_OSName;
- uint8_t StringLength_OSName;
- uint8_t OSName[MAX_OS_NAME_LENGTH];
- } OSName_T;
- typedef struct
- {
- uint8_t SetSelector;
- uint8_t SysFWVersion[MAX_BLOCK_SIZE];
- } SysVerInfo_T;
- typedef struct
- {
- uint8_t SetSelector;
- uint8_t SysName[MAX_BLOCK_SIZE];
- } SysNameInfo_T;
- typedef struct {
- uint8_t SetSelector;
- uint8_t PrimaryOSName[MAX_BLOCK_SIZE];
- } PrimOSInfo_T;
- typedef struct {
- uint8_t SetSelector;
- uint8_t OperatingSystemName[MAX_BLOCK_SIZE];
- } OSInfo_T;
- typedef union {
- uint8_t SetInProgress;
- SysVerInfo_T SysVerInfo;
- SysNameInfo_T SysNameInfo;
- PrimOSInfo_T PrimOSInfo;
- OSInfo_T OSInfo;
- } SysInfoUN_T ;
- /* GetSystemInfoParamReq_T */
- typedef struct
- {
- uint8_t ParamRev;
- uint8_t ParamSelector;
- uint8_t SetSelector;
- uint8_t BlockSelector;
- } GetSystemInfoParamReq_T;
- /* GetSystemInfoParamRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t ParamRevision;
- SysInfoUN_T SysInfo;
- } GetSystemInfoParamRes_T;
- /* GetSystemInfoParamOEMRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t ParamRevision;
- /* OEM Info */
- } GetSystemInfoParamOEMRes_T;
- /* SetSystemInfoParamReq_T */
- typedef struct
- {
- uint8_t ParamSelector;
- SysInfoUN_T SysInfo;
- } SetSystemInfoParamReq_T;
- /* SetSystemInfoParamRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- } SetSystemInfoParamRes_T;
- /* SetSystemInfoParamOEMReq_T */
- typedef struct
- {
- uint8_t ParamSelector;
- /* OEM parameter */
- } SetSystemInfoParamOEMReq_T;
- #pragma pack( )
- #endif /* IPMI_APPDEV_H */
|