From dd0459e027105e66de146f7be36d85aade93f302 Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Sat, 8 Sep 2018 09:27:16 -0700 Subject: add iana header to store OEM Numbers The iana.hpp header is installed to identify OEM IPMI numbers used, to avoid namespace conflicts. Change-Id: Ifd629817e3b921f86a5ea4cf2c2965a44a2d8201 Signed-off-by: Patrick Venture --- Makefile.am | 1 + host-ipmid/iana.hpp | 19 +++++++++++++++++++ host-ipmid/oemopenbmc.hpp | 6 ------ host-ipmid/oemrouter.hpp | 6 +++--- 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 host-ipmid/iana.hpp diff --git a/Makefile.am b/Makefile.am index cf45c3b..8286fd4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -121,6 +121,7 @@ libsysintfcmds_la_CXXFLAGS = $(SYSTEMD_CFLAGS) \ -flto nobase_include_HEADERS = \ + host-ipmid/iana.hpp \ host-ipmid/ipmid-api.h \ host-ipmid/ipmid-host-cmd.hpp \ host-ipmid/ipmid-host-cmd-utils.hpp \ diff --git a/host-ipmid/iana.hpp b/host-ipmid/iana.hpp new file mode 100644 index 0000000..aa9e173 --- /dev/null +++ b/host-ipmid/iana.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include + +namespace oem +{ +using Number = std::uint32_t; // smallest standard size >= 24. + +/* + * This is the OpenBMC IANA OEM Number + */ +constexpr Number obmcOemNumber = 49871; + +/* + * This is the Google IANA OEM Number + */ +constexpr Number googOemNumber = 11129; + +} // namespace oem diff --git a/host-ipmid/oemopenbmc.hpp b/host-ipmid/oemopenbmc.hpp index 8b5dc0c..f8b96af 100644 --- a/host-ipmid/oemopenbmc.hpp +++ b/host-ipmid/oemopenbmc.hpp @@ -6,12 +6,6 @@ namespace oem { - -/* - * This is the OpenBMC IANA OEM Number - */ -constexpr Number obmcOemNumber = 49871; - /* * OpenBMC OEM Extension IPMI Command codes. */ diff --git a/host-ipmid/oemrouter.hpp b/host-ipmid/oemrouter.hpp index d6f0735..fb12750 100644 --- a/host-ipmid/oemrouter.hpp +++ b/host-ipmid/oemrouter.hpp @@ -1,18 +1,18 @@ #pragma once +#include + #include #include #include +#include #include -#include "host-ipmid/ipmid-api.h" - namespace oem { constexpr size_t groupMagicSize = 3; using Group = std::array; -using Number = uint32_t; // smallest standard size >= 24. // Handler signature includes ipmi cmd to support wildcard cmd match. // Buffers and lengths exclude the OemGroup bytes in the IPMI message. -- cgit v1.2.1