summaryrefslogtreecommitdiffstats
path: root/include/ipmid/sessiondef.hpp
diff options
context:
space:
mode:
authorRajashekar Gade Reddy <raja.sekhar.reddy.gade@linux.intel.com>2019-11-13 17:13:05 +0530
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-11-19 16:24:40 +0000
commit4d22640a64b74c11b2cbdadc88d0ffd60d09e274 (patch)
treefa4bc20c5c1666bccd9daca82a340d7928f7eaa1 /include/ipmid/sessiondef.hpp
parenta7f81cc62224a2c3ec4d864f8a035032f7133e2a (diff)
downloadphosphor-host-ipmid-4d22640a64b74c11b2cbdadc88d0ffd60d09e274.tar.gz
phosphor-host-ipmid-4d22640a64b74c11b2cbdadc88d0ffd60d09e274.zip
Added sessionId context in host-ipmid, used by GetSessionInfo
SessionId is now passed to host-ipmid context along with userid and privilege information. This will enable certain commands to know the current sessionid Added option to get current session info in get session info command. With this change, we can get the current session info by passing sessionIndex as zero in get session info command via lan interface and the same via host interface will return an error, beacuse no session will be created for host interface. Tested: ipmitool -I lanplus -U <user> -P <password> -H <lan1_ip> raw 6 0x3d <Zero> Response : gives currents session info ipmitool -I lanplus -U <user> -P <password> -H <lan2_ip> raw 6 0x3d <Zero> Response : gives currents session info //host interface ipmitool raw 6 0x3d 0 Response: 0xCC // invalid field in the request //This command shows info of all sessions, which includes current session info as well. ipmitool -I lanplus -U <user> -P <password> -H <lan1_ip> session info all session handle : 129 slot count : 45 active sessions : 1 user id : 1 privilege level : ADMINISTRATOR session type : IPMIv1.5 channel number : 0x03 console ip : 0.0.0.0 console mac : 00:00:00:00:00:00 console port : 52670 session handle : 0 slot count : 45 active sessions : 1 //This command shows info of all sessions, which includes current session info as well. ipmitool -I lanplus -U <user> -P <password> -H <lan2_ip> session info all session handle : 0 slot count : 45 active sessions : 1 session handle : 1 slot count : 45 active sessions : 1 user id : 1 privilege level : ADMINISTRATOR session type : IPMIv1.5 channel number : 0x01 console ip : 0.0.0.0 console mac : 00:00:00:00:00:00 console port : 57622 //host interface ipmitool session info all session handle : 0 slot count : 45 active sessions : 0 session handle : 0 slot count : 45 active sessions : 0 Tested other postive and negative test cases for get session info command in Lan1, Lan2 and host interfaces. All are working fine. Signed-off-by: Rajashekar Gade Reddy <raja.sekhar.reddy.gade@linux.intel.com> Change-Id: I9fb1ef12693e4c0da3661ffdf21eec248b48b5b4
Diffstat (limited to 'include/ipmid/sessiondef.hpp')
-rw-r--r--include/ipmid/sessiondef.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ipmid/sessiondef.hpp b/include/ipmid/sessiondef.hpp
index 7802fb9..ac63f8f 100644
--- a/include/ipmid/sessiondef.hpp
+++ b/include/ipmid/sessiondef.hpp
@@ -32,6 +32,7 @@ static constexpr uint8_t defaultSessionHandle = 0xFF;
static constexpr uint8_t maxNetworkInstanceSupported = 4;
static constexpr uint8_t ccInvalidSessionId = 0x87;
static constexpr uint8_t ccInvalidSessionHandle = 0x88;
+static constexpr uint8_t searchCurrentSession = 0;
static constexpr uint8_t searchSessionByHandle = 0xFE;
static constexpr uint8_t searchSessionById = 0xFF;
// MSB BIT 7 BIT 6 assigned for netipmid instance in session handle.
OpenPOWER on IntegriCloud