123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- /****************************************************************
- ****************************************************************
- ** **
- ** (C)Copyright 2005-2006, American Megatrends Inc. **
- ** **
- ** All Rights Reserved. **
- ** **
- ** 6145-F, Northbelt Parkway, Norcross, **
- ** **
- ** Georgia - 30071, USA. Phone-(770)-246-8600. **
- ** **
- ****************************************************************
- ****************************************************************
- ****************************************************************
- ****************************************************************
- *
- * ipmi_lanconfig.h
- * Lan configuration command handler
- *
- * Author: Bakka Ravinder Reddy <bakkar@ami.com>
- *
- *****************************************************************/
- #ifndef IPMI_LANCONFIG_H
- #define IPMI_LANCONFIG_H
- #include <stdint.h>
- /*** External Definitions ***/
- #define IP_ADDR_LEN 4
- #define IP6_ADDR_LEN 16
- #define MAC_ADDR_LEN 6
- #define MAX_COMM_STRING_SIZE 18
- #define MAX_NUM_CIPHER_SUITE_PRIV_LEVELS 10
- #define MAX_IPV6_ADDR_STRLEN 41
- #define MAX_NUM_LAN_ALERT_DESTINATIONS 15 //1h to Fh
- #define MAX_LAN_CONF_PARAM 0x1A
- #define MIN_LAN_OEM_CONF_PARAM 192
- #define MAX_LAN_OEM_CONF_PARAM 255
- /**
- * @struct AuthTypeEnables_T
- * @brief Authentication Type Enables
- **/
- #pragma pack(1)
- typedef struct
- {
- uint8_t AuthTypeCallBack;
- uint8_t AuthTypeUser;
- uint8_t AuthTypeOperator;
- uint8_t AuthTypeAdmin;
- uint8_t AuthTypeOem;
- } AuthTypeEnables_T;
- /**
- * @struct LANDestType_T
- * @brief LAN Destination Type
- **/
- typedef struct
- {
- uint8_t SetSelect;
- uint8_t DestType;
- uint8_t AlertAckTimeout;
- uint8_t Retries;
- } LANDestType_T;
- /**
- * @struct LANDestAddr_T
- * @brief LAN Destination Address
- **/
- typedef struct
- {
- uint8_t SetSelect;
- uint8_t AddrFormat;
- uint8_t GateWayUse;
- uint8_t IPAddr [IP_ADDR_LEN];
- uint8_t MACAddr [MAC_ADDR_LEN];
- } LANDestAddr_T;
- typedef struct
- {
- uint8_t SetSelect;
- uint8_t AddrFormat;
- uint8_t GateWayUse;
- uint8_t IPAddr [IP6_ADDR_LEN];
- uint8_t MACAddr [MAC_ADDR_LEN];
- } LANDestv6Addr_T;
- /**
- * @struct IPv4HdrParams_T
- * @brief IPv4 Header Parameters
- **/
- typedef struct
- {
- uint8_t TimeToLive;
- uint8_t IpHeaderFlags;
- uint8_t TypeOfService;
- } IPv4HdrParams_T;
- typedef struct
- {
- uint8_t GenEvent;
- uint8_t ThreshNum;
- uint16_t ResetInterval;
- uint16_t LockoutInterval;
- } BadPassword_T;
- typedef struct
- {
- uint8_t EthIndex;
- uint8_t MACAddress[MAC_ADDR_LEN];
- } EnableSetMACAddress_T;
- typedef struct
- {
- uint8_t Interface;
- uint8_t PackageId;
- uint8_t ChannelId;
- } NCSIPortConfig_T;
- typedef struct
- {
- uint8_t Interface;
- uint8_t NCSIMode;
- } NCSIModeConfig_T;
- typedef struct
- {
- uint8_t Command;
- uint8_t Interface;
- uint8_t VetoBit;
- } NCSIPHYConfigSet_T;
- typedef struct
- {
- uint8_t Interface;
- uint8_t VetoBit;
- } NCSIPHYConfigGet_T;
- /**
- * @struct IPv6Addr_T
- * @brief Setting Multiple static IPv6 address
- **/
- typedef struct
- {
- uint8_t IPv6_Cntr;
- uint8_t IPv6_IPAddr [IP6_ADDR_LEN];
- }IPv6Addr_T;
- /**
- * @struct IPv6Prefix_T
- * @brief Setting Multiple static IPv6 prefix length
- **/
- typedef struct
- {
- uint8_t IPv6_Prepos;
- uint8_t IPv6_PrefixLen;
- }IPv6Prefix_T;
- ///**
- // * @struct LANConfigUn_T
- // * @brief LAN Configuration Parameters.
- //**/
- //typedef union {
- // uint8_t SetInProgress;
- // uint8_t AuthTypeSupport;
- // AuthTypeEnables_T AuthTypeEnables;
- // uint8_t IPAddr [4];
- // uint8_t IPAddrSrc;
- // uint8_t MACAddr [6];
- // 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;
- // LANDestAddr_T DestAddr;
- // LANDestv6Addr_T Destv6Addr;
- // uint16_t VLANID;
- // uint8_t VLANPriority;
- // uint8_t CipherSuiteSup;
- // uint8_t CipherSuiteEntries [17];
- // uint8_t CipherSuitePrivLevels [MAX_NUM_CIPHER_SUITE_PRIV_LEVELS];
- // BadPassword_T BadPasswd;
- // uint8_t EthIndex;
- // uint8_t ChangeMACEnabled;
- // uint8_t IPv6_Enable;
- // uint8_t IPv6_IPAddrSrc;
- // uint8_t IPv6_LinkAddr [IP6_ADDR_LEN];
- // IPv6Addr_T IPv6Addr;
- // IPv6Prefix_T IPv6Prefix;
- // uint8_t IPv6_LinkAddrPrefix;
- // uint8_t IPv6_GatewayIPAddr[IP6_ADDR_LEN];
- // uint8_t NumNCSIPortConfigs;
- // NCSIPortConfig_T NCSIPortConfig;
- // PHYConfig_T PHYConfig;
- // uint8_t SSI2ndPriEthMACAddr[MAC_ADDR_LEN];
- // uint8_t SSILinkControl;
- // uint8_t CMMIPAddr[IP_ADDR_LEN];
- // uint16_t MTU_size;
- // NCSIModeConfig_T NCSIModeConfig;
- // NCSIPHYConfigSet_T NCSIPHYConfigSet;
- // NCSIPHYConfigGet_T NCSIPHYConfigGet;
- //} LANConfigUn_T;
- /* GetLanCCRev_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t ParamRevision;
- } GetLanCCRev_T;
- /* GetLanConfigReq_T */
- typedef struct
- {
- uint8_t ChannelNum;
- uint8_t ParameterSelect;
- uint8_t SetSelect;
- uint8_t BlockSelect;
- } GetLanConfigReq_T;
- ///* GetLanConfigRes_T */
- //typedef struct
- //{
- // GetLanCCRev_T CCParamRev;
- // LANConfigUn_T ConfigData;
- //} GetLanConfigRes_T;
- /* GetLanConfigOEM_T */
- typedef struct
- {
- GetLanCCRev_T CCParamRev;
- /* OEM parameter should be added below*/
- } GetLanConfigOEMRes_T;
- /* SetLanConfigReq_T */
- typedef struct
- {
- uint8_t ChannelNum;
- uint8_t ParameterSelect;
- /* OEM parameter should be added below*/
- } SetLanConfigOEMReq_T;
- ///* SetLanConfigReq_T */
- //typedef struct
- //{
- // uint8_t ChannelNum;
- // uint8_t ParameterSelect;
- // LANConfigUn_T ConfigData;
- //} SetLanConfigReq_T;
- /* SetLanConfigRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- } SetLanConfigRes_T;
- /* SuspendBMCArpsReq_T */
- typedef struct
- {
- uint8_t ChannelNo;
- uint8_t ArpSuspend;
- } SuspendBMCArpsReq_T;
- /* SuspendBMCArpsRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint8_t ArpSuspendStatus;
- } SuspendBMCArpsRes_T;
- /* GetIPUDPRMCPStatsReq_T */
- typedef struct
- {
- uint8_t ChannelNo;
- uint8_t ClearStatus;
- } GetIPUDPRMCPStatsReq_T;
- /* GetIPUDPRMCPStatsRes_T */
- typedef struct
- {
- uint8_t CompletionCode;
- uint16_t IPPacketsRecv;
- uint16_t IPHeaderErr;
- uint16_t IPAddrErr;
- uint16_t FragIPPacketsRecv;
- uint16_t IPPacketsTrans;
- uint16_t UDPPacketsRecv;
- uint16_t ValidRMCPPackets;
- } GetIPUDPRMCPStatsRes_T;
- typedef struct
- {
- int16_t RegValue;
- uint8_t RegNumber;
- uint8_t IsReplace;
- } SetPHYReg_T;
- #pragma pack()
- #endif /* IPMI_LANCONFIG_H */
|