summaryrefslogtreecommitdiffstats
path: root/command
Commit message (Collapse)AuthorAgeFilesLines
* style: cppcheck cleanupPatrick Venture2018-11-081-2/+1
| | | | | | | | | | | | | | | | | | | [command/guid.cpp:37]: (style) The scope of the variable 'rc' can be reduced. [socket_channel.hpp:44]: (performance) Variable 'timeout' is assigned in constructor body. Consider performing initialization in initialization list. [sd_event_loop.cpp:107]: (style) The scope of the variable 'instance' can be reduced. [sd_event_loop.cpp:108]: (style) The scope of the variable 'rc' can be reduced. [sd_event_loop.cpp:142]: (style) The scope of the variable 'instance' can be reduced. [sd_event_loop.cpp:304]: (style) The scope of the variable 'rc' can be reduced. Change-Id: Id090cb217ea7ed9019f1b8d39ebebd6bb73113b1 Signed-off-by: Patrick Venture <venture@google.com>
* netipmid: use std::shared_ptr instead of weak_ptr/lockVernon Mauery2018-11-066-30/+22
| | | | | | | | | | | | | All of the instances of getSession and startSession were assigning the result to a local shared_ptr via lock on the weak_ptr. It doesn't make sense to demote the shared_ptr (from the sessionsMap) to a weak_ptr via the return, only to promote to a shared_ptr again via lock. Tested-by: running ipmitool -H a.b.c.d -P 0penBmc -I lanplus mc info Sessions start and stop, same as before. Change-Id: Ic10779285891d73ee51115f16ed0000b38d1c52a Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: apply clang-format rulesVernon Mauery2018-11-0216-372/+386
| | | | | | | | Lots of whitespace change. Let clang-format do its job and keep the code looking nice. Change-Id: Idfcad1a99cab8170d55a06163de8ad3f420b68b7 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Support username for IPMI default user accountTom Joseph2018-04-233-5/+41
| | | | | | | | | | | | | The current support in IPMI is for the nameless account, which has no username and only password associated with the account. In ipmitool for the nameless account -U option is not needed. There are management scripts which take a parameter for -U option and fails if -U option is not supported by ipmitool option. This patch is to support "admin" username for the default account. Once full fledged user account management is in place, this change can be removed. Change-Id: Idad73c0d04f189af66f2365424a68a637fe0e476 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Implement get payload instance info commandTom Joseph2018-04-112-0/+69
| | | | | | | Resolves openbmc/openbmc#2892 Change-Id: Id5f95df64bcdc97646f11d6d3630eead062c4193 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Support SOL parameter channel numberTom Joseph2018-04-041-1/+6
| | | | | | | | | | | | Even though channel number is an optional parameter, the ipmitool shows in the output the channel as 14(0x0e). 0x0e is reserved to indicate in the command, the channel on which the command is received. So the default channel number 1 is returned. Resolves openbmc/openbmc#2959 Change-Id: Ifd069886d4ea8e9ba5c90ca015be39ebdece413d Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Patch #2 Reducing IPMI logging footprintNagaraju Goruganti2018-04-025-21/+0
| | | | | | | | | | net-ipmid is noisy in terms of journal logging. A small step towards cleaning that up. Partially Resolves openbmc/openbmc#2507 Change-Id: I78e0286fb37086373c86dca276c0948f4595cb0a Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
* Add support for cipher suite 17Vernon Mauery2017-12-081-0/+7
| | | | | | | | | cipher suite 17 uses RAKP_HMAC_SHA256 for authentication and RAKP_HMAC_SHA256_128 for integrity. This adds those in and fixes up the lookups so the stack knows about the new algorithms. Change-Id: Icdc66563d08060fc0e541ceaf3bee9dd5f89fdb2 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Prepare for adding RMCP+ cipher suite 17Vernon Mauery2017-12-073-10/+13
| | | | | | | | | | In many places, there are baked-in assumptions about algorithms that tie the session initiation to cipher suite 3. This commit teases out those assumptions and prepares for the next patch that actually adds in the new authentication and integrity algorithms to support cipher suite 17. Change-Id: I2ee3672a7c503b89c5ff0aba30cf7a4601e24d04 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* explicit use of std::vector instead of buffer/BufferVernon Mauery2017-12-051-1/+1
| | | | | | | | | | There were several scoped 'using buffer = std::vector<uint8_t>;' in header files. This consolidates the code base to use std::vector<uint8_t> instead of buffer or Buffer. This makes the code easier to read and debug. Change-Id: I918a0f6ca9b8e4b9d331175dccff45cbf4c8379d Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Spelling fixesGunnar Mills2017-10-251-1/+1
| | | | | | | | | Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2. Change-Id: I951ec38ae08ba0b20733dce1300546f4a7541eff Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Cache system GUID in netipmidTom Joseph2017-09-114-20/+58
| | | | | | | | | | | | | | | | GUID is used in the IPMI session setup steps RAKP12 and RAKP34. The GUID is read from the DBUS property. It is observed that when the host is booting, reading the GUID takes a significant delay and the session setup fails with ipmitool. Since GUID doesn't change for a machine, it is safe to cache GUID in the netipmid and speed up the session setup. Resolves openbmc/openbmc#1812 Resolves openbmc/openbmc#2245 Resolves openbmc/openbmc#2246 Change-Id: I78c993b3e5ef8b6764457c8fdb3ecb985b965c0c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* sol: Handle deactivate payload correctly when session is closedTom Joseph2017-08-141-2/+17
| | | | | | | | Resolves openbmc/openbmc#1781 Resolves openbmc/openbmc#2053 Change-Id: Iabb61fc510d33a4132e7ad07184eb8847301b686 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Correct doxygen syntax in phosphor-net-ipmidTom Joseph2017-05-236-27/+27
| | | | | | | Resolves openbmc/openbmc#1147 Change-Id: I57ab1b09ec1bf308cc3d97cd30b2d18564beb38b Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add support for Get SOL configuration parameters command.Tom Joseph2017-05-082-0/+129
| | | | | Change-Id: I711cbcd66caea7939d7604551ea4d80a1576244e Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add support for Set SOL Configuration parameters command.Tom Joseph2017-05-082-0/+210
| | | | | Change-Id: I82618bc21c426e37f0110b11aeba9855e588bb6c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Allow SOL activation only if SOL is enabled.Tom Joseph2017-05-081-0/+6
| | | | | Change-Id: Id5de2417b2cddd7711179c2516d5557983ace78e Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Change the signature of the command handler functions.Tom Joseph2017-04-2514-35/+38
| | | | | | | Resolves openbmc/openbmc#857 Change-Id: I0b7ca6665dd89629838a238d77aff67fec1818c7 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add command handler for Payload activation status command.Tom Joseph2017-04-252-1/+103
| | | | | Change-Id: I12d9f5ff759042295654daef638fd30153f44ce0 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add handler for Deactivate payload command.Tom Joseph2017-04-252-0/+123
| | | | | Change-Id: I6d01757b7b526ad15b1c059506603b5921e30473 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add command handler for Activate payload command.Tom Joseph2017-04-252-0/+202
| | | | | Change-Id: I95d2d82409dabde7139871c7d62d5b5106c1c4d8 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add command handler for SOL activating command.Tom Joseph2017-04-252-0/+61
| | | | | Change-Id: I81094330b3fa7f320bd4518cabcfb8fc5b75411c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add handler function for incoming SOL payload.Tom Joseph2017-04-252-0/+79
| | | | | Change-Id: I1bdff462ef43281332c6b8c2d61028bc0d9f87b0 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Validate Integrity Algorithm in Open Session Request commandTom Joseph2017-02-241-4/+2
| | | | | Change-Id: I54106099fbbe50156529644eaadd65dc1db7e141 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Set the Confidentiality Algo in the RAKP34 commandTom Joseph2017-02-241-0/+23
| | | | | Change-Id: I7601b2fd35bedd0145533c5742ef4c848055eefd Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Validate Confidentiality Algo in Open Session requestTom Joseph2017-02-241-1/+2
| | | | | Change-Id: I208e09926a18e215212564eca3203094015724c9 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Authentication Algo keeps record of the Confidentiality algoTom Joseph2017-02-241-1/+2
| | | | | | | | | The confidentiality algo negotiated during Open Session Request would be stored in the Authentication algorithm and is activated once the session setup is successful. Change-Id: I4d5efd71a992dd0cf505bcf7a6d9ebb394bcb880 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Refactor the RAKP34 implementationTom Joseph2017-02-101-12/+23
| | | | | | | | Refactor the code to apply integrity algorithm to a separate function. Change-Id: I438165dd6fb4962084b319bbdcd53c47e0fc659f Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Set the Integrity Algo once the Session setup succeedsTom Joseph2017-01-171-0/+13
| | | | | Change-Id: I5c6122b89c345d71e081aadb50c968344b5c697b Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Validate Integrity Algo in Open Session requestTom Joseph2017-01-171-2/+6
| | | | | Change-Id: I75de159fafd42a677b646ae6e2c5605872ebc8f3 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Session Commands ImplementationTom Joseph2017-01-092-0/+197
| | | | | | | | Implements Set Session Privilege Command and Close Session command. Change-Id: I18aeee7bcae48db3eb8a61292c9333ca2304dcf1 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* RAKP Message 3 & RAKP Message 4 ImplementationTom Joseph2017-01-022-0/+273
| | | | | Change-Id: I0206a04fec2531e5c5dfee8677d4a2b6942022f7 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* RAKP Message 1 & RAKP Message 2 ImplementationTom Joseph2017-01-022-0/+227
| | | | | Change-Id: Ibe7309651d022de6bd6c7b561493fd085d0e27c0 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Open Session Request/Response ImplementationTom Joseph2016-12-162-0/+273
| | | | | Change-Id: I2726f52c8eb331575677fb0e6a52943a2c5f5865 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Get Channel Authentication Capabilities ImplementationTom Joseph2016-12-162-0/+178
| | | | | Change-Id: Id8fa42814fe210ca8f9dbb14de746c66e391d334 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Implementation to read System UUID from Chassis DBUS objectTom Joseph2016-12-162-0/+100
Implementation for reading system UUID which would be consumed by RAKP12, RAKP34 and System GUID commands. Change-Id: Ibee1c398368f67055cdba2a0f4d16c981e38c035 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
OpenPOWER on IntegriCloud