blob: c13e05a27661511078b75c90418531f315f5e0ca [file] [log] [blame]
Patrick Venture690a2342020-05-17 11:51:31 -07001#pragma once
2
3#include <cstdint>
4#include <ipmid/api-types.hpp>
5
6namespace ipmi
7{
8namespace transport
9{
10
11/** @brief IPMI LAN Parameters */
12enum class LanParam : uint8_t
13{
14 SetStatus = 0,
15 AuthSupport = 1,
16 AuthEnables = 2,
17 IP = 3,
18 IPSrc = 4,
19 MAC = 5,
20 SubnetMask = 6,
21 Gateway1 = 12,
22 Gateway1MAC = 13,
23 VLANId = 20,
24 CiphersuiteSupport = 22,
25 CiphersuiteEntries = 23,
26 cipherSuitePrivilegeLevels = 24,
27 IPFamilySupport = 50,
28 IPFamilyEnables = 51,
29 IPv6Status = 55,
30 IPv6StaticAddresses = 56,
31 IPv6DynamicAddresses = 59,
32 IPv6RouterControl = 64,
33 IPv6StaticRouter1IP = 65,
34 IPv6StaticRouter1MAC = 66,
35 IPv6StaticRouter1PrefixLength = 67,
36 IPv6StaticRouter1PrefixValue = 68,
37};
38
39/** @brief IPMI IP Origin Types */
40enum class IPSrc : uint8_t
41{
42 Unspecified = 0,
43 Static = 1,
44 DHCP = 2,
45 BIOS = 3,
46 BMC = 4,
47};
48
49/** @brief IPMI Set Status */
50enum class SetStatus : uint8_t
51{
52 Complete = 0,
53 InProgress = 1,
54 Commit = 2,
55};
56
57/** @brief IPMI Family Suport Bits */
58namespace IPFamilySupportFlag
59{
60constexpr uint8_t IPv6Only = 0;
61constexpr uint8_t DualStack = 1;
62constexpr uint8_t IPv6Alerts = 2;
63} // namespace IPFamilySupportFlag
64
65/** @brief IPMI IPFamily Enables Flag */
66enum class IPFamilyEnables : uint8_t
67{
68 IPv4Only = 0,
69 IPv6Only = 1,
70 DualStack = 2,
71};
72
73/** @brief IPMI IPv6 Dyanmic Status Bits */
74namespace IPv6StatusFlag
75{
76constexpr uint8_t DHCP = 0;
77constexpr uint8_t SLAAC = 1;
78}; // namespace IPv6StatusFlag
79
80/** @brief IPMI IPv6 Source */
81enum class IPv6Source : uint8_t
82{
83 Static = 0,
84 SLAAC = 1,
85 DHCP = 2,
86};
87
88/** @brief IPMI IPv6 Address Status */
89enum class IPv6AddressStatus : uint8_t
90{
91 Active = 0,
92 Disabled = 1,
93};
94
95namespace IPv6RouterControlFlag
96{
97constexpr uint8_t Static = 0;
98constexpr uint8_t Dynamic = 1;
99}; // namespace IPv6RouterControlFlag
100
101// LAN Handler specific response codes
102constexpr Cc ccParamNotSupported = 0x80;
103constexpr Cc ccParamSetLocked = 0x81;
104constexpr Cc ccParamReadOnly = 0x82;
105
106// VLANs are a 12-bit value
107constexpr uint16_t VLAN_VALUE_MASK = 0x0fff;
108constexpr uint16_t VLAN_ENABLE_FLAG = 0x8000;
109
110// Arbitrary v6 Address Limits to prevent too much output in ipmitool
111constexpr uint8_t MAX_IPV6_STATIC_ADDRESSES = 15;
112constexpr uint8_t MAX_IPV6_DYNAMIC_ADDRESSES = 15;
113
114} // namespace transport
115} // namespace ipmi