summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/Makefile.am1
-rw-r--r--include/ipmid/sessiondef.hpp47
2 files changed, 48 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index b7c303a..996c41a 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,6 +1,7 @@
nobase_include_HEADERS = \
ipmid/api.hpp \
ipmid/api-types.hpp \
+ ipmid/sessiondef.hpp \
ipmid/filter.hpp \
ipmid/handler.hpp \
ipmid/message.hpp \
diff --git a/include/ipmid/sessiondef.hpp b/include/ipmid/sessiondef.hpp
new file mode 100644
index 0000000..9fce256
--- /dev/null
+++ b/include/ipmid/sessiondef.hpp
@@ -0,0 +1,47 @@
+/*
+ * Copyright © 2019 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#pragma once
+
+namespace session
+{
+
+static constexpr auto sessionManagerRootPath =
+ "/xyz/openbmc_project/ipmi/session";
+static constexpr auto sessionIntf = "xyz.openbmc_project.Ipmi.SessionInfo";
+static constexpr uint8_t ipmi20VerSession = 0x01;
+static constexpr size_t maxSessionCountPerChannel = 15;
+static constexpr size_t sessionZero = 0;
+static constexpr size_t maxSessionlessCount = 1;
+static constexpr uint8_t invalidSessionID = 0;
+static constexpr uint8_t invalidSessionHandle = 0;
+static constexpr uint8_t maxNetworkInstanceSupported = 4;
+
+// MSB BIT 7 BIT 6 assigned for netipmid instance in session handle.
+static constexpr uint8_t multiIntfaceSessionHandleMask = 0x3F;
+
+// MSB BIT 31-BIT30 assigned for netipmid instance in session ID
+static constexpr uint32_t multiIntfaceSessionIDMask = 0x3FFFFFFF;
+
+enum class State : uint8_t
+{
+ inactive, // Session is not in use
+ setupInProgress, // Session Setup Sequence is progressing
+ active, // Session is active
+ tearDownInProgress, // When Closing Session
+};
+
+} // namespace session
OpenPOWER on IntegriCloud