com_IPMI_LANConfig.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. /****************************************************************
  2. ****************************************************************
  3. ** **
  4. ** (C)Copyright 2005-2006, American Megatrends Inc. **
  5. ** **
  6. ** All Rights Reserved. **
  7. ** **
  8. ** 6145-F, Northbelt Parkway, Norcross, **
  9. ** **
  10. ** Georgia - 30071, USA. Phone-(770)-246-8600. **
  11. ** **
  12. ****************************************************************
  13. ****************************************************************
  14. ****************************************************************
  15. ****************************************************************
  16. *
  17. * ipmi_lanconfig.h
  18. * Lan configuration command handler
  19. *
  20. * Author: Bakka Ravinder Reddy <bakkar@ami.com>
  21. *
  22. *****************************************************************/
  23. #ifndef IPMI_LANCONFIG_H
  24. #define IPMI_LANCONFIG_H
  25. #include <stdint.h>
  26. /*** External Definitions ***/
  27. #define IP_ADDR_LEN 4
  28. #define MAC_ADDR_LEN 6
  29. #define MAX_COMM_STRING_SIZE 18
  30. #define MAX_NUM_CIPHER_SUITE_PRIV_LEVELS 10
  31. #define MAX_IPV6_ADDR_STRLEN 41
  32. #define MAX_NUM_LAN_ALERT_DESTINATIONS 15 //1h to Fh
  33. #define MAX_LAN_CONF_PARAM 0x1A
  34. #define MIN_LAN_OEM_CONF_PARAM 192
  35. #define MAX_LAN_OEM_CONF_PARAM 255
  36. /**
  37. * @struct AuthTypeEnables_T
  38. * @brief Authentication Type Enables
  39. **/
  40. #pragma pack(1)
  41. typedef struct
  42. {
  43. uint8_t AuthTypeCallBack;
  44. uint8_t AuthTypeUser;
  45. uint8_t AuthTypeOperator;
  46. uint8_t AuthTypeAdmin;
  47. uint8_t AuthTypeOem;
  48. } AuthTypeEnables_T;
  49. /**
  50. * @struct LANDestType_T
  51. * @brief LAN Destination Type
  52. **/
  53. typedef struct
  54. {
  55. uint8_t SetSelect;
  56. uint8_t DestType;
  57. uint8_t AlertAckTimeout;
  58. uint8_t Retries;
  59. } LANDestType_T;
  60. /**
  61. * @struct LANDestAddr_T
  62. * @brief LAN Destination Address
  63. **/
  64. typedef struct
  65. {
  66. uint8_t SetSelect;
  67. uint8_t AddrFormat;
  68. uint8_t GateWayUse;
  69. uint8_t IPAddr [IP_ADDR_LEN];
  70. uint8_t MACAddr [MAC_ADDR_LEN];
  71. } LANDestAddr_T;
  72. typedef struct
  73. {
  74. uint8_t SetSelect;
  75. uint8_t AddrFormat;
  76. uint8_t GateWayUse;
  77. uint8_t IPAddr [IP6_ADDR_LEN];
  78. uint8_t MACAddr [MAC_ADDR_LEN];
  79. } LANDestv6Addr_T;
  80. /**
  81. * @struct IPv4HdrParams_T
  82. * @brief IPv4 Header Parameters
  83. **/
  84. typedef struct
  85. {
  86. uint8_t TimeToLive;
  87. uint8_t IpHeaderFlags;
  88. uint8_t TypeOfService;
  89. } IPv4HdrParams_T;
  90. typedef struct
  91. {
  92. uint8_t GenEvent;
  93. uint8_t ThreshNum;
  94. uint16_t ResetInterval;
  95. uint16_t LockoutInterval;
  96. } BadPassword_T;
  97. typedef struct
  98. {
  99. uint8_t EthIndex;
  100. uint8_t MACAddress[MAC_ADDR_LEN];
  101. } EnableSetMACAddress_T;
  102. typedef struct
  103. {
  104. uint8_t Interface;
  105. uint8_t PackageId;
  106. uint8_t ChannelId;
  107. } NCSIPortConfig_T;
  108. typedef struct
  109. {
  110. uint8_t Interface;
  111. uint8_t NCSIMode;
  112. } NCSIModeConfig_T;
  113. typedef struct
  114. {
  115. uint8_t Command;
  116. uint8_t Interface;
  117. uint8_t VetoBit;
  118. } NCSIPHYConfigSet_T;
  119. typedef struct
  120. {
  121. uint8_t Interface;
  122. uint8_t VetoBit;
  123. } NCSIPHYConfigGet_T;
  124. /**
  125. * @struct IPv6Addr_T
  126. * @brief Setting Multiple static IPv6 address
  127. **/
  128. typedef struct
  129. {
  130. uint8_t IPv6_Cntr;
  131. uint8_t IPv6_IPAddr [IP6_ADDR_LEN];
  132. }IPv6Addr_T;
  133. /**
  134. * @struct IPv6Prefix_T
  135. * @brief Setting Multiple static IPv6 prefix length
  136. **/
  137. typedef struct
  138. {
  139. uint8_t IPv6_Prepos;
  140. uint8_t IPv6_PrefixLen;
  141. }IPv6Prefix_T;
  142. ///**
  143. // * @struct LANConfigUn_T
  144. // * @brief LAN Configuration Parameters.
  145. //**/
  146. //typedef union {
  147. // uint8_t SetInProgress;
  148. // uint8_t AuthTypeSupport;
  149. // AuthTypeEnables_T AuthTypeEnables;
  150. // uint8_t IPAddr [4];
  151. // uint8_t IPAddrSrc;
  152. // uint8_t MACAddr [6];
  153. // uint8_t SubNetMask [4];
  154. // IPv4HdrParams_T Ipv4HdrParam;
  155. // uint16_t PrimaryRMCPPort;
  156. // uint16_t SecondaryPort;
  157. // uint8_t BMCGeneratedARPControl;
  158. // uint8_t GratitousARPInterval;
  159. // uint8_t DefaultGatewayIPAddr [IP_ADDR_LEN];
  160. // uint8_t DefaultGatewayMACAddr [MAC_ADDR_LEN];
  161. // uint8_t BackupGatewayIPAddr [IP_ADDR_LEN];
  162. // uint8_t BackupGatewayMACAddr [MAC_ADDR_LEN];
  163. // uint8_t CommunityStr [MAX_COMM_STRING_SIZE];
  164. // uint8_t NumDest;
  165. // LANDestType_T DestType;
  166. // LANDestAddr_T DestAddr;
  167. // LANDestv6Addr_T Destv6Addr;
  168. // uint16_t VLANID;
  169. // uint8_t VLANPriority;
  170. // uint8_t CipherSuiteSup;
  171. // uint8_t CipherSuiteEntries [17];
  172. // uint8_t CipherSuitePrivLevels [MAX_NUM_CIPHER_SUITE_PRIV_LEVELS];
  173. // BadPassword_T BadPasswd;
  174. // uint8_t EthIndex;
  175. // uint8_t ChangeMACEnabled;
  176. // uint8_t IPv6_Enable;
  177. // uint8_t IPv6_IPAddrSrc;
  178. // uint8_t IPv6_LinkAddr [IP6_ADDR_LEN];
  179. // IPv6Addr_T IPv6Addr;
  180. // IPv6Prefix_T IPv6Prefix;
  181. // uint8_t IPv6_LinkAddrPrefix;
  182. // uint8_t IPv6_GatewayIPAddr[IP6_ADDR_LEN];
  183. // uint8_t NumNCSIPortConfigs;
  184. // NCSIPortConfig_T NCSIPortConfig;
  185. // PHYConfig_T PHYConfig;
  186. // uint8_t SSI2ndPriEthMACAddr[MAC_ADDR_LEN];
  187. // uint8_t SSILinkControl;
  188. // uint8_t CMMIPAddr[IP_ADDR_LEN];
  189. // uint16_t MTU_size;
  190. // NCSIModeConfig_T NCSIModeConfig;
  191. // NCSIPHYConfigSet_T NCSIPHYConfigSet;
  192. // NCSIPHYConfigGet_T NCSIPHYConfigGet;
  193. //} LANConfigUn_T;
  194. /* GetLanCCRev_T */
  195. typedef struct
  196. {
  197. uint8_t CompletionCode;
  198. uint8_t ParamRevision;
  199. } GetLanCCRev_T;
  200. /* GetLanConfigReq_T */
  201. typedef struct
  202. {
  203. uint8_t ChannelNum;
  204. uint8_t ParameterSelect;
  205. uint8_t SetSelect;
  206. uint8_t BlockSelect;
  207. } GetLanConfigReq_T;
  208. ///* GetLanConfigRes_T */
  209. //typedef struct
  210. //{
  211. // GetLanCCRev_T CCParamRev;
  212. // LANConfigUn_T ConfigData;
  213. //} GetLanConfigRes_T;
  214. /* GetLanConfigOEM_T */
  215. typedef struct
  216. {
  217. GetLanCCRev_T CCParamRev;
  218. /* OEM parameter should be added below*/
  219. } GetLanConfigOEMRes_T;
  220. /* SetLanConfigReq_T */
  221. typedef struct
  222. {
  223. uint8_t ChannelNum;
  224. uint8_t ParameterSelect;
  225. /* OEM parameter should be added below*/
  226. } SetLanConfigOEMReq_T;
  227. ///* SetLanConfigReq_T */
  228. //typedef struct
  229. //{
  230. // uint8_t ChannelNum;
  231. // uint8_t ParameterSelect;
  232. // LANConfigUn_T ConfigData;
  233. //} SetLanConfigReq_T;
  234. /* SetLanConfigRes_T */
  235. typedef struct
  236. {
  237. uint8_t CompletionCode;
  238. } SetLanConfigRes_T;
  239. /* SuspendBMCArpsReq_T */
  240. typedef struct
  241. {
  242. uint8_t ChannelNo;
  243. uint8_t ArpSuspend;
  244. } SuspendBMCArpsReq_T;
  245. /* SuspendBMCArpsRes_T */
  246. typedef struct
  247. {
  248. uint8_t CompletionCode;
  249. uint8_t ArpSuspendStatus;
  250. } SuspendBMCArpsRes_T;
  251. /* GetIPUDPRMCPStatsReq_T */
  252. typedef struct
  253. {
  254. uint8_t ChannelNo;
  255. uint8_t ClearStatus;
  256. } GetIPUDPRMCPStatsReq_T;
  257. /* GetIPUDPRMCPStatsRes_T */
  258. typedef struct
  259. {
  260. uint8_t CompletionCode;
  261. uint16_t IPPacketsRecv;
  262. uint16_t IPHeaderErr;
  263. uint16_t IPAddrErr;
  264. uint16_t FragIPPacketsRecv;
  265. uint16_t IPPacketsTrans;
  266. uint16_t UDPPacketsRecv;
  267. uint16_t ValidRMCPPackets;
  268. } GetIPUDPRMCPStatsRes_T;
  269. typedef struct
  270. {
  271. int16_t RegValue;
  272. uint8_t RegNumber;
  273. uint8_t IsReplace;
  274. } SetPHYReg_T;
  275. #pragma pack()
  276. #endif /* IPMI_LANCONFIG_H */