com_IPMI_LANConfig.h 8.1 KB

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