summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-09-08 09:27:16 -0700
committerPatrick Venture <venture@google.com>2018-09-10 14:55:09 -0700
commitdd0459e027105e66de146f7be36d85aade93f302 (patch)
treeab5f1a4144891c3f6802d38bba943987591d9878
parent0b02be925a29357f69abbc9e9a58e7c5aaed2eab (diff)
downloadphosphor-host-ipmid-dd0459e027105e66de146f7be36d85aade93f302.tar.gz
phosphor-host-ipmid-dd0459e027105e66de146f7be36d85aade93f302.zip
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 <venture@google.com>
-rw-r--r--Makefile.am1
-rw-r--r--host-ipmid/iana.hpp19
-rw-r--r--host-ipmid/oemopenbmc.hpp6
-rw-r--r--host-ipmid/oemrouter.hpp6
4 files changed, 23 insertions, 9 deletions
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 <cstdint>
+
+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 <host-ipmid/ipmid-api.h>
+
#include <array>
#include <cstdint>
#include <functional>
+#include <host-ipmid/iana.hpp>
#include <vector>
-#include "host-ipmid/ipmid-api.h"
-
namespace oem
{
constexpr size_t groupMagicSize = 3;
using Group = std::array<uint8_t, groupMagicSize>;
-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.
OpenPOWER on IntegriCloud