diff options
author | William A. Kennington III <wak@google.com> | 2018-11-19 17:41:20 -0800 |
---|---|---|
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | 2018-11-26 16:43:08 +0000 |
commit | 7a3479eefe373b5d122876173bbaf6aad7424a52 (patch) | |
tree | 2a83eb12feda80fea787e2c742c518e3b5d4b030 /transporthandler.hpp | |
parent | dfad4863541f2315f02dd1c95cd7d4e8b688f697 (diff) | |
download | phosphor-host-ipmid-7a3479eefe373b5d122876173bbaf6aad7424a52.tar.gz phosphor-host-ipmid-7a3479eefe373b5d122876173bbaf6aad7424a52.zip |
transporthandler: Convert ints to enum
We want to be able to identify unique LanParams for each of the
different sub-queries. These make more semantic sense as an enum than
individual ints.
Tested:
Built and run through unit test suite.
Change-Id: Ieb304f2f866215776e8d3e264b07ea110c639efc
Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'transporthandler.hpp')
-rw-r--r-- | transporthandler.hpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/transporthandler.hpp b/transporthandler.hpp index a47b908..d08fef2 100644 --- a/transporthandler.hpp +++ b/transporthandler.hpp @@ -18,17 +18,20 @@ enum ipmi_transport_return_codes }; // Parameters -static const int LAN_PARM_INPROGRESS = 0; -static const int LAN_PARM_AUTHSUPPORT = 1; -static const int LAN_PARM_AUTHENABLES = 2; -static const int LAN_PARM_IP = 3; -static const int LAN_PARM_IPSRC = 4; -static const int LAN_PARM_MAC = 5; -static const int LAN_PARM_SUBNET = 6; -static const int LAN_PARM_GATEWAY = 12; -static const int LAN_PARM_VLAN = 20; -static const int CIPHER_SUITE_COUNT = 22; -static const int CIPHER_SUITE_ENTRIES = 23; +enum LanParam : uint8_t +{ + LAN_PARM_INPROGRESS = 0, + LAN_PARM_AUTHSUPPORT = 1, + LAN_PARM_AUTHENABLES = 2, + LAN_PARM_IP = 3, + LAN_PARM_IPSRC = 4, + LAN_PARM_MAC = 5, + LAN_PARM_SUBNET = 6, + LAN_PARM_GATEWAY = 12, + LAN_PARM_VLAN = 20, + CIPHER_SUITE_COUNT = 22, + CIPHER_SUITE_ENTRIES = 23, +}; constexpr uint8_t SET_COMPLETE = 0; constexpr uint8_t SET_IN_PROGRESS = 1; |