/*****************************************************************
 *****************************************************************
 ***                                                            **
 ***    (C)Copyright 2005-2006, American Megatrends Inc.        **
 ***                                                            **
 ***            All Rights Reserved.                            **
 ***                                                            **
 ***        6145-F, Northbelt Parkway, Norcross,                **
 ***                                                            **
 ***        Georgia - 30071, USA. Phone-(770)-246-8600.         **
 ***                                                            **
 *****************************************************************
 *****************************************************************
 ******************************************************************
 *
 * PMConfig.h
 * Platform management configuration structures
 *
 *  Author: Govind Kothandapani <govindk@ami.com>
 *          Basavaraj Astekar   <basavaraja@ami.com>
 *          Ravinder Reddy      <bakkar@ami.com>
 ******************************************************************/
#ifndef PMCONFIG_H
#define PMCONFIG_H
//#include "Support.h"
//#include "IPMI_PEF.h"
#include "com_IPMI_AppDevice.h"
//#include "OemDefs.h"
//#include "IPMI_LANConfig.h"
//#include "IPMI_ChassisDevice.h"
#include <stdint.h>

/*** External Definitions ***/
#define MAX_PRIVILEGE_TYPES                 7
#define MAX_CHFILE_NAME                         50

#define MAX_EVT_FILTER_ENTRIES              40
#define ALERT_POLICY_SET_SIZE		    4
#define ALERT_POLICY_PER_CHANNEL	    15
#define LAN_DESTINATIONS_PER_CHANNEL	    15
#define NUM_LAN_DESTINATION                 LAN_DESTINATIONS_PER_CHANNEL
#define MAX_ALERT_POLICY_ENTRIES            (ALERT_POLICY_PER_CHANNEL * 4)

//Added to Support 20 Alert Strings in Set/Get Pef Config.Parms ../
/* It should equal to number of Event filter entries */
#define MAX_ALERT_STRINGS                  MAX_EVT_FILTER_ENTRIES
#define PEF_MAX_OEM_PARAMETERS              0x20
#define MAX_SIZE_PET_GUID                   0x11
#define MAX_PLD_ENABLES_TYPES               4
#define MAX_FF_CMD_CFGS                     255
/* RMCP+ Definitions */
#define MAX_ALGORITHMS						2
#define MAX_PAYLOADS						3
#define HASH_KEY_LEN						20
#define MAX_ID_PAIRS 7


#define IPMI_CONFIG_VERSION     17

#define MAX_ENCRYPTED_PSWD_LEN 24

/* The maximum no. of users that can be configured
     via MDS */
#define MAX_USER_CFG_MDS 0x10

/* The maximum no. of channel users that can be configured
     via MDS */
#define MAX_NUM_CH_USERS_MDS 0x10

/*  The IPMI configuration version is maintained in IPMI_CONFIG_VERSION macro and the version 
      number should be incremented in counts of '1' whenever there are changes in CDF files used in 
      MDS and in CDF related structures used in this file.One should make sure that the version number incremented
      in IPMI_CONFIG_VERSION and version number maintained in libipmipar package should be same.
      The CDF version number for libipmipar should be configured using MDS. The IPMI Config version check
      will be done only when CONFIG_SPX_FEATURE_IPMI_CONFIG_VER_CHECK feature is enabled 
      in PRJ file*/
#pragma pack( 1 )

/**
 * @struct WDTConfig_T
 * @brief Watchdog Timer configuration information.
**/
typedef struct
{
    uint8_t   TmrUse;
    uint8_t   TmrActions;
    uint8_t   PreTimeOutInterval;
    uint8_t   ExpirationFlag;
    uint16_t InitCountDown;
    uint8_t   PreTimeoutActionTaken;

}   WDTConfig_T;



///**
// * @struct PEFConfig_T
// * PEF Configuration structure.
//**/
//typedef struct
//{
//    uint8_t                   PEFControl;
//    uint8_t                   PEFActionGblControl;
//    uint8_t                   PEFStartupDly;
//    uint8_t                   PEFAlertStartupDly;
//    EvtFilterTblEntry_T     EvtFilterTblEntry [MAX_EVT_FILTER_ENTRIES];
//    AlertPolicyTblEntry_T   AlertPolicyTblEntry [MAX_ALERT_POLICY_ENTRIES];
//    uint8_t                   SystemGUID [MAX_SIZE_PET_GUID];
//    AlertStringTbl_T        AlertStringEntry [MAX_ALERT_STRINGS];
//    uint8_t                   OEMParams [PEF_MAX_OEM_PARAMETERS];
//    uint8_t                   NumAlertPolicyEntries;

//}   PEFConfig_T;


///**
// * @struct PEFRecordDetailsConfig_T
// * Record ID Configuration structure.
//**/
//typedef struct
//{
//    uint16_t                  LastBMCProcessedEventID;
//    uint16_t                  LastSWProcessedEventID;
//    uint16_t                  LastSELRecordID;
//    uint32_t                  LastProcessedTimestamp;
//    uint8_t                   LastActionDone;

//}   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 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 ChassisConfig_T
// * Chassis Configuration.
//**/
//typedef struct
//{
//   uint8_t                        SysRestartCause;
//   uint8_t                        PowerRestorePolicy;
//   ChassisPowerState_T          ChassisPowerState;
//   ChassisCapabilities_T        ChassisCapabilities;
//   uint8_t						PowerCycleInterval;
//   AMI_BootOpt_T                OemBootOpt;  /**< AMI OEM BootOptions */
//   uint8_t                        SysPartitionScan;

//}   ChassisConfig_T;


///**
// * @struct VLANDestTags_T
// * VLAN Destination Tags.
//**/
//typedef struct
//{
//    uint8_t   AddressFormat;
//    uint16_t  VLANTag;

//}   VLANDestTags_T;


///**
// * @struct LANConfig_T
// * LAN Configuration.
//**/
//typedef struct {

//    uint8_t               AuthTypeSupport;
//    AuthTypeEnables_T   AuthTypeEnables;
//    uint8_t               IPAddr [IP_ADDR_LEN];
//    uint8_t               IPAddrSrc;
//    uint8_t               MACAddr [MAC_ADDR_LEN];
//    uint8_t               SubNetMask [4];
//    IPv4HdrParams_T     Ipv4HdrParam;
//    uint16_t              PrimaryRMCPPort;
//    uint16_t              SecondaryPort;
//    uint8_t               BMCGeneratedARPControl;
//    uint8_t               GratitousARPInterval;
//    uint8_t               DefaultGatewayIPAddr  [IP_ADDR_LEN];
//    uint8_t               DefaultGatewayMACAddr [MAC_ADDR_LEN];
//    uint8_t               BackupGatewayIPAddr  [IP_ADDR_LEN];
//    uint8_t               BackupGatewayMACAddr [MAC_ADDR_LEN];
//    uint8_t               CommunityStr [MAX_COMM_STRING_SIZE];
//    uint8_t               NumDest;
//    LANDestType_T       DestType [NUM_LAN_DESTINATION];
//    LANDestAddr_T       DestAddr [NUM_LAN_DESTINATION];
//    LANDestv6Addr_T       Destv6Addr [NUM_LAN_DESTINATION];
//    uint16_t              VLANID;
//    uint8_t               VLANPriority;
//    uint8_t               CipherSuitePrivLevels [MAX_NUM_CIPHER_SUITE_PRIV_LEVELS];
//    VLANDestTags_T      VLANDestTags [NUM_LAN_DESTINATION];
//    BadPassword_T BadPasswd;
//    uint8_t               IPv6_Enable;
//    uint8_t               IPv6_IPAddrSrc;
//    uint8_t               IPv6_IPAddr [16][IP6_ADDR_LEN];
//    uint8_t               IPv6_PrefixLen[16];
//    uint8_t               IPv6_GatewayIPAddr[IP6_ADDR_LEN];
//    uint8_t               IPv4_Enable;
//    uint8_t               AutoNegotiationEnable;
//    uint16_t              Speed;
//    uint8_t               Duplex;
//    uint16_t              MTU_size;
//}   LANConfig_T;


///**
// * @struct PayloadSupport_T
// * Payload support.
//**/
//typedef struct
//{
//    uint8_t   StandPldtype1;
//    uint8_t   StandPldtype2;
//    uint8_t   SessStpPldtype1;
//    uint8_t   SessStpPldtype2;
//    uint8_t   OemPldtype1;
//    uint8_t   OemPldtype2;

//}   PayloadSupport_T;


///**
// * @struct PayloadInfo_T
// * Payload information.
//**/
//typedef struct
//{
//    uint8_t   Type;
//    uint8_t   OemPldIANA [3];
//    uint8_t   OemPldID [2];
//    uint8_t   Version;

//}   PayloadInfo_T;


///**
// * @struct RMCPPlus_T
// * RMCP+ information.
//**/
//typedef struct
//{
//    bool                LockKey [2];
//    uint8_t               KGHashKey [HASH_KEY_LEN];
//    uint8_t               PseudoGenKey [HASH_KEY_LEN];
//    uint8_t               Algorithm [MAX_PAYLOADS] [MAX_PRIVILEGE_TYPES];
//    PayloadSupport_T    PayloadSupport;
//    PayloadInfo_T       PayloadInfo [MAX_PYLDS_SUPPORT];

//}   RMCPPlus_T;


///**
// * @struct FFCmdConfigTbl_T
// * Firmware Firewall Command Configuration Tbl.
//**/
//typedef struct
//{
//    uint8_t   NetFn;
//    uint8_t   Cmd;
//    uint8_t   Config;

//}   FFCmdConfigTbl_T;


///**
// * @struct SOLConfig_T
// * SOL Configuration.
//**/
//typedef struct
//{
//    uint8_t   SOLEnable;
//    uint8_t   SOLAuth;
//    uint16_t  CharAccThresh;
//    uint8_t   SOLRetryCount;
//    uint8_t   SOLRetryInterval;
//    uint8_t   NVBitRate;
//    uint8_t   VBitRate;
//    uint8_t   PayldChannel;
//    uint16_t  PayldPortNum;

//}   SOLConfig_T;


///**
// * @struct SystemInfoConfig_T
// * Get / Set System Info Parameters info.
//**/
//typedef struct
//{
//    SysFWVersion_T SysFWVersion;
//    SysName_T SysName;
//    PrimaryOSName_T PrimaryOSName;
//} SystemInfoConfig_T;

///**
// * @struct DCMIThermalCfg_T
// * brief Temperature limit for inlet sensors
//**/
//typedef struct
//{
//    uint8_t   Valid;
//    uint8_t   ExceptionAction;
//    uint8_t   TemperatureLimit;
//    uint16_t  ExceptionTime;
//} DCMIThermalCfg_T;

//typedef struct
//{
//    bool	IsValid;
//    uint8_t	ActivePowerLimit;
//    uint8_t	ExceptionAction;
//    uint16_t	PwrLimitInWatts;
//    uint32_t	CorrectionTimeLimitInMsec;
//    uint16_t	MangSamplingTimeInSecs;
//    DCMIThermalCfg_T    ThermalCfg[MAX_TEMP_INSTANCE];

//}  DCMICfg_T;


//typedef struct
//{
//    uint8_t    CurrentNoUser;
//    uint32_t    POHCounterReading;
//    /* SEL Time UTC Offset information */
//    uint16_t    SELTimeUTCOffset;
//    uint32_t    SDREraseTime;
//    /*Location of time (asia/calcutta)*/
//    uint8_t      TimeZone[64];
//} GENConfig_T;


///**
// * @struct ChcfgInfo_T
// * Channel Configuration Information taken from respective channel .i files.
//**/
//typedef struct
//{
//    uint8_t ChType;
//    ChannelInfo_T ChannelInfo;
//}  ChcfgInfo_T;

///**
// * @struct AuthTypeEnable_T
// * @brief Authentication Enables.
//**/
//typedef struct
//{
//    uint8_t Callback;
//    uint8_t User;
//    uint8_t Operator;
//    uint8_t Admin;
//    uint8_t oem;

//}   AuthTypeEnable_T;


///**
// * @struct ChannelCallbackCtrl_T
// * @brief Channel Callback Control.
//**/
//typedef struct 
//{
//    uint8_t CallBackEnable;
//    uint8_t CBCPnegopt;
//    uint8_t CallBackDes1;
//    uint8_t CallBackDes2;
//    uint8_t CallBackDes3;

//}   ChannelCallbackCtrl_T;


///**
// * @struct IpmiMsgCommSettings_T
// * @brief Communication Settings.
//**/
//typedef struct 
//{
//    uint8_t  FlowCtrl;
//    uint8_t  BitRate;

//}   IpmiMsgCommSettings_T;


///** 
// * @struct MuxSwitchCtrl_T
// * @brief MUX Switch Control.
//**/
//typedef struct 
//{
//    uint8_t Data1;
//    uint8_t Data2;

//}   MuxSwitchCtrl_T;


///**
// * @struct ModemRingTime_T
// * @brief Modem Ring Time.
//**/
//typedef struct 
//{
//    uint8_t RingDuration;
//    uint8_t RingDeadTime;

//}   ModemRingTime_T;


///**
// * @struct DestInfo_T
// * @brief Destination Information.
//**/
//typedef struct 
//{
//    uint8_t DesType;
//    uint8_t AlertAckTimeout;
//    uint8_t Retries;
//    uint8_t DesTypeSpecific;

//}   DestInfo_T;


///**
// * @struct ModemDestCommSettings_T
// * @brief Modem Destination Communication Settings.
//**/
//typedef struct 
//{
//    uint8_t FlowControl;
//    uint8_t BitRate;

//}   ModemDestCommSettings_T;


///**
// * @struct DestIPAddr_T
// * @brief Destination IP Address.
//**/
//typedef struct 
//{
//    uint8_t ip [IP_ADDR_LEN];

//}   DestIPAddr_T;


///**
// * @struct TAPServiceSettings_T
// * @brief TAP Service Settings.
//**/
//typedef struct 
//{
//    uint8_t   TAPConfirmation;
//    uint8_t   TAPServiceTypeChars [3];
//    uint32_t  TAPCtrlESCMask;
//    uint8_t   TimeOutParam1;
//    uint8_t   TimeOutParam2;
//    uint8_t   TimeOutParam3;
//    uint8_t   RetryParam1;
//    uint8_t   RetryParam2;

//}   TAPServiceSettings_T;


///**
// * @struct TermConfig_T
// * @brief Terminal Configuration Data.
//**/
//typedef struct 
//{
//    uint8_t Data1;    /* Config Data1 deals with feature configuration */
//    uint8_t Data2;    /* Config Data2 deals with i/o termination sequence */

//}   TermConfig_T;


///**
// * @struct PPPProtocolOptions_T
// * @brief PPP Protocol Options.
//**/
//typedef struct 
//{
//    uint8_t  SnoopControl;
//    uint8_t  NegControl;
//    uint8_t  NegConfig;

//}   PPPProtocolOptions_T;


///**
// * @struct PPPAccm_T
// * @brief PPP ACCM.
//**/
//typedef struct 
//{
//    uint32_t  ReceiveACCM;
//    uint32_t  TransmitACCM;

//}   PPPAccm_T;


///**
// * @struct PPPSnoopAccm_T
// * @brief PPP Snoop ACCM
//**/
//typedef struct 
//{
//    uint32_t  ReceiveACCM;

//}   PPPSnoopAccm_T;


///**
// * @struct PPPUDPProxyIPHeaderData_T
// * @brief PPP UDP Proxy Header Data.
//**/
//typedef struct 
//{
//    uint8_t SrcIPAddress [IP_ADDR_LEN];
//    uint8_t DestIPAddress [IP_ADDR_LEN];

//}   PPPUDPProxyIPHeaderData_T;


///**
// * @struct SMConfig_T
// * @brief Serial/Modem Configuration.
//**/
//typedef struct
//{
//    uint8_t                       SetInProgress;
//    uint8_t                       AuthTypeSupport;
//    AuthTypeEnable_T            AuthTypeEnable;
//    uint8_t                       ConnectionMode;
//    uint8_t                       SessionInactivity;
//    ChannelCallbackCtrl_T       ChannelCallBackCtrl;
//    uint8_t                       SessionTermination;
//    IpmiMsgCommSettings_T       IpmiMsgCommSet;
//    MuxSwitchCtrl_T             MUXSwitchCtrl;
//    ModemRingTime_T             RingTime;
//    uint8_t                       ModemInitString [4] [16];
//    uint8_t                       ModemEscapeSeq [MAX_MODEM_ESC_SEQ_SIZE + 1];   /*+1 for NULL Termination when */
//    uint8_t                       ModemHangup [MAX_MODEM_HANG_UP_SEQ_SIZE + 1];  /*full non null chars are provided*/
//    uint8_t                       ModemDialCmd [MAX_MODEM_DIAL_CMD_SIZE + 1];
//    uint8_t                       PageBlockOut;
//    uint8_t                       CommunityString [MAX_COMM_STRING_SIZE + 1];
//    uint8_t                       TotalAlertDest;
//    DestInfo_T                  DestinationInfo [MAX_SERIAL_ALERT_DESTINATIONS];
//    uint8_t                       CallRetryInterval;
//    ModemDestCommSettings_T     DestComSet [MAX_SERIAL_ALERT_DESTINATIONS];
//    uint8_t                       TotalDialStr;
//    uint8_t                       DestDialStrings [MAX_MODEM_DIAL_STRS] [MAX_MODEM_DIAL_STR_BLOCKS] [MAX_MODEM_DIAL_STR_BLOCK_SIZE];
//    uint8_t                       TotalDestIP;
//    DestIPAddr_T                DestAddr [MAX_MODEM_ALERT_DEST_IP_ADDRS];
//    uint8_t                       TotalTAPAcc;
//    uint8_t                       TAPAccountSelector [MAX_MODEM_TAP_ACCOUNTS];
//    uint8_t                       TAPPasswd [MAX_MODEM_TAP_ACCOUNTS] [TAP_PASSWORD_SIZE + 1];
//    uint8_t                       TAPPagerIDStrings [MAX_MODEM_TAP_ACCOUNTS] [TAP_PAGER_ID_STRING_SIZE + 1];
//    TAPServiceSettings_T        TAPServiceSettings [MAX_MODEM_TAP_ACCOUNTS];
//    TermConfig_T                Termconfig;
//    PPPProtocolOptions_T        PPPProtocolOptions;
//    uint16_t                      PPPPrimaryRMCPPort;
//    uint16_t                      PPPSecondaryRMCPPort;
//    uint8_t                       PPPLinkAuth;
//    uint8_t                       CHAPName [MAX_MODEM_CHAP_NAME_SIZE];
//    PPPAccm_T                   PPPACCM;
//    PPPSnoopAccm_T              PPPSnoopACCM;
//    uint8_t                       TotalPPPAcc;
//    uint8_t                       PPPAccDialStrSel [MAX_MODEM_PPP_ACCOUNTS];
//    uint8_t                       PPPAccIPAddress [MAX_MODEM_PPP_ACCOUNTS] [IP_ADDR_LEN];
//    uint8_t                       PPPAccUserNames [MAX_MODEM_PPP_ACCOUNTS] [PPP_ACC_USER_NAME_DOMAIN_PASSWD_SIZE + 1 ];
//    uint8_t                       PPPAccUserDomain [MAX_MODEM_PPP_ACCOUNTS] [PPP_ACC_USER_NAME_DOMAIN_PASSWD_SIZE + 1];
//    uint8_t                       PPPAccUserPasswd [MAX_MODEM_PPP_ACCOUNTS] [PPP_ACC_USER_NAME_DOMAIN_PASSWD_SIZE + 1];
//    uint8_t                       PPPAccAuthSettings [MAX_MODEM_PPP_ACCOUNTS];
//    uint8_t                       PPPAccConnHoldTimes [MAX_MODEM_PPP_ACCOUNTS];
//    PPPUDPProxyIPHeaderData_T   PPPUDPProxyIPHeadData;
//    uint16_t                      PPPUDPProxyTransmitBuffSize;
//    uint16_t                      PPPUDPProxyReceiveBuffSize;
//    uint8_t                       PPPRemoteConsoleIPAdd [IP_ADDR_LEN];
//    BadPassword_T               BadPasswd;

//}   SMConfig_T;

/*
* SensorOffsetInfo_T Structure
*/
typedef struct {

    uint8_t SensorLUN;
    uint8_t SensorNo;
    int8_t Offset;
    uint8_t valid;

}  SensorOffsetInfo_T;


/*
* OPMA_IDPair_T Structure
*/
typedef struct
{
    uint16_t OemId;
    uint16_t ImplementationId;

}  OPMA_IDPair_T;


///*
// * OPMA Config Structure
// * The OPMA specific Data are stored in this Structure
// */
//typedef struct
//{
//    SensorOffsetInfo_T SensorOffsetInfo [256];
//    uint8_t         SupportedSysCount;
//    OPMA_IDPair_T OPMA_IdPairs [ MAX_ID_PAIRS ];
//    OPMA_IDPair_T SystemIdentifier ;
//    uint8_t SysLocalAccessLockout;
//    uint16_t OPMASpecComplaince;

//}  OPMA_Config_T;


//typedef struct
//{
//    uint8_t EnableDisableSMTP;
//    uint8_t EnableDisableSmtpAuth;
//    uint8_t ServerAddr [ IP_ADDR_LEN ];
//    uint8_t IP6_ServerAddr [ IP6_ADDR_LEN ];
//    uint8_t UserName [ MAX_SMTP_USERNAME_LEN ];
//    uint8_t Passwd   [MAX_SMTP_PASSWD_LEN];
//    uint8_t NoofDestinations;
//    uint8_t Subject	 [MAX_EMAIL_DESTINATIONS+1][MAX_SUB_BLOCK_SIZE * MAX_SUB_BLOCKS];
//    uint8_t Msg	 [MAX_EMAIL_DESTINATIONS+1][MAX_MSG_BLOCK_SIZE * MAX_MSG_BLOCKS];
//    uint8_t SenderAddr[MAX_EMAIL_BLOCK_SIZE * MAX_EMAIL_ADDR_BLOCKS];
//    uint8_t  Servername[MAX_SRV_NAME_BLOCK_SIZE * MAX_SRV_NAME_BLOCKS];
//    uint16_t SmtpPort;
//    uint8_t UserID[MAX_EMAIL_DESTINATIONS+1];
//    uint8_t EnableDisableSMTP2;
//    uint8_t EnableDisableSmtp2Auth;
//    uint8_t Server2Addr [ IP_ADDR_LEN ];
//    uint8_t IP6_Server2Addr [ IP6_ADDR_LEN ];
//    uint8_t UserName2 [ MAX_SMTP_USERNAME_LEN ];
//    uint8_t Passwd2 [MAX_SMTP_PASSWD_LEN];
//    uint8_t Sender2Addr[MAX_EMAIL_BLOCK_SIZE * MAX_EMAIL_ADDR_BLOCKS];
//    uint8_t  Server2name[MAX_SRV_NAME_BLOCK_SIZE * MAX_SRV_NAME_BLOCKS];
//    uint16_t Smtp2Port;
//}  Smtp_Config_T;


/**
 * @struct TriggerEventCfg_T
 * Trigger Event Configuration.
**/
typedef struct
{
   uint8_t CriticalFlag;
   uint8_t NONCriticalFlag;
   uint8_t NONRecoverableFlag;
   uint8_t FanTroubled;
   uint8_t WDTTimeExpire;
   uint8_t SysDConFlag;
   uint8_t SysDCoffFlag;
   uint8_t SysResetFlag;
   uint8_t LPCResetFlag;
   uint8_t SpecDateTime;
   uint32_t Time;
} TriggerEventCfg_T;

/**
 * @struct LoginAuditConfig_T
 * Login Audit Configuration.
**/
typedef struct
{
   uint8_t WebEventMask;
   uint8_t IPMIEventMask;
   uint8_t TelnetEventMask;
   uint8_t SSHEventMask;
   uint8_t KVMEventMask;
} LoginAuditConfig_T;

/**
 * @struct AMIConfig_T
 * @brief AMI Specific Configuration.
**/
typedef struct
{
    uint8_t CircularSEL;
    uint8_t  CircularSELFlag;

}  AMIConfig_T;

///**
// * @struct SSIConfig_T
// * @brief SSI Configuration.
//**/
//typedef struct
//{
//    OpState CurrentState;
//    uint32_t  CurrentConditions;
//    uint8_t   CurrentPowerLevel;
//    uint8_t   CMMIPAddr[IP_ADDR_LEN];

//}  SSIConfig_T; 

typedef struct
{
    uint32_t Version;
}  VersionConfig_T;

typedef struct
{
    uint8_t Host[200];
    uint8_t Path[200];
    uint8_t Retry;
}  ConnectionInfo_T;

typedef struct
{
    uint8_t ProtocolType;
    ConnectionInfo_T ConnectionInfo;
}  FWConfig_T;

typedef struct
{
    char  EncryptedPswd[MAX_ENCRYPTED_PSWD_LEN];
}  EncryptedUserInfo_T;
#pragma pack( )

/**
 * @brief Initialize PM configuration information.
 * @return 0 if success, -1 if error.
**/
extern int InitPMConfig (int BMCInst);


/**
*@fn InitChannelConfigs
*@brief This function is Initialize to load all Channel Configs from NVRAM to RAM
*/
extern int InitChannelConfigs(int BMCInst);

/**
*@fn InitDCMIConfig
*@brief This function is invoked to Initialize all DCMI Configs from NVRAM to RAM
*/
extern int initDCMIConfig(int BMCInst);

/**
*@fn InitUserConfig
*@brief This function is invoked to Initialize UserConfigs from NVRAM to RAM
*/
extern int InitUserConfig(int BMCInst);

/**
*@fn InitTriggerEventConfig
*@brief This function is invoked to Initialize TriggerEventConfig from NVRAM to RAM
*/
extern int InitTriggerEventConfig(int BMCInst);

/**
*@fn InitLoginAuditConfig
*@brief This function is invoked to Initialize the login audit configuration from NVRAM to RAM
*/
extern int InitLoginAuditConfig(int BMCInst);

/**
*@fn InitEncUserPswdConfig
*@brief This function is invoked to Initialize EncUserPasswordsConfigs from NVRAM to RAM
*/
extern int InitEncUserPswdConfig(int BMCInst);

/**
*@fn InitChannelPriv
*@brief Add Channel Groups
**/
extern void InitChannelPrivtbl(int BMCInst);

/**
*@fn AddUserToChGroups
*@brief Add users to Channel Groups
**/
extern void AddUserToChGroups(int BMCInst);
#endif /* PMCONFIG_H */

