summaryrefslogtreecommitdiffstats
path: root/include/ipmid
diff options
context:
space:
mode:
authorSuryakanth Sekar <suryakanth.sekar@linux.intel.com>2019-06-12 20:44:10 +0530
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-06-21 22:29:30 +0000
commit1a4beed99d47d92e71dca2e9c198c69a602dc324 (patch)
tree62dc6a076128abfe6141c1ed39d900676699941c /include/ipmid
parentb90a53280c74e8c65e8dc58c8964d93a08cfd65e (diff)
downloadphosphor-host-ipmid-1a4beed99d47d92e71dca2e9c198c69a602dc324.tar.gz
phosphor-host-ipmid-1a4beed99d47d92e71dca2e9c198c69a602dc324.zip
Defining session const for multi net session mgmt
This session const will be used in multi session management and session commands and replace the existing session const used into lowercamel case Signed-off-by: Suryakanth Sekar <suryakanth.sekar@linux.intel.com> Change-Id: I76725acdf5d3d002f82a1076509ed37d668d01d3
Diffstat (limited to 'include/ipmid')
-rw-r--r--include/ipmid/sessiondef.hpp47
1 files changed, 47 insertions, 0 deletions
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