summaryrefslogtreecommitdiffstats
path: root/message_handler.hpp
Commit message (Collapse)AuthorAgeFilesLines
* netipmid: make Handler asynchronousVernon Mauery2019-02-251-34/+60
| | | | | | | | | | | | | | | | | | | | | | The dbus call to the main ipmid queue was up to this point synchronous, which means it blocks all other networking and execution until the main queue returns (which may be on the order of seconds for some commands). This is an unacceptable delay, especially when this queue is responsible for timely updates of SOL traffic. This turns the call into an asynchronous one by leveraging shared pointers and an optional action on destruction. So as long as a reference to the Handler object exists, it will live on, waiting to send its response. Once the async dbus call has returned and set the reply in the Handler, it will drop the reference to the shared pointer and the destructor will send out the response over the channel. Tested-by: Run multiple sessions at the same time while monitoring dbus traffic. See that the requests and responses may be interleaved instead of serial. Change-Id: I16fca8dc3d13624eeb1592ec36d1a9af6575f115 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: consolidate message-related things in message.hppVernon Mauery2019-02-041-49/+4
| | | | | | | | | The message::Handler class was directly manipulating a bunch of stuff on behalf of the message::Message class. This change moves more of the changes into the message::Message class so it can manage its own data. Change-Id: I5d31f6c3c5760207408238d048853e36a60c73e0 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: replace std::cerr with phosphor::logging callsVernon Mauery2018-12-191-1/+0
| | | | | | | | This is part of a cleanup and standardization effort of code to get existing code up to date. Change-Id: I0c982ef8d7afa2f56a9cd204bb8ac3112769641c Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: use shared_ptr on messages instead of unique_ptr+referencesVernon Mauery2018-11-211-7/+8
| | | | | | | | | | Messages were being created and held by unique_ptr objects and then shared via reference. This is dangerous and sidesteps the whole point of a unique_ptr, which is to enforce single ownership. This replaces the usage with a shared_ptr, which denotes shared ownership. Change-Id: I19ed2693f5a0f5ce47d720ed255fa05bdf3844f8 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: apply clang-format rulesVernon Mauery2018-11-021-128/+129
| | | | | | | | 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>
* 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>
* Correct doxygen syntax in phosphor-net-ipmidTom Joseph2017-05-231-5/+5
| | | | | | | Resolves openbmc/openbmc#1147 Change-Id: I57ab1b09ec1bf308cc3d97cd30b2d18564beb38b Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Throw exception instead of returning error code from send function.Tom Joseph2017-04-251-8/+5
| | | | | Change-Id: I87d2805dfb7f8757c0366600d8937023edddf54a Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add function to send unsolicited IPMI payload to remote console.Tom Joseph2017-04-251-0/+14
| | | | | Change-Id: Ifd9c711c16a6640d36d6247a7c3b46a7db1c6596 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add function to send outbound SOL payloadTom Joseph2017-04-251-0/+8
| | | | | Change-Id: I63213034110c0a550b43e1cbc0115b1312821e3d Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Make the default value of session header to IPMI2.0 header.Tom Joseph2017-04-251-2/+1
| | | | | Change-Id: Ib6106198d8ecf89fb1224020144df0b209040cb7 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Provide API to set socket channel in session object.Tom Joseph2017-04-251-1/+4
| | | | | Change-Id: I7d9620c4a34bb8bb85ed6f60ac8b2032355087f6 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Modify constructor for message handler class.Tom Joseph2017-04-251-4/+7
| | | | | Change-Id: I5ab63b4a20654a69074a692daec85b234497bb5a Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Copy the IPMI input message details to output messageTom Joseph2017-01-161-1/+0
| | | | | | | | Copy the encrytion,authentication and bmc session id from the IPMI input message to output IPMI message. Change-Id: I16e3adaad4e0c4ce3f2a9ad48c327d5b0bb0be9b Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add Message HandlerTom Joseph2016-12-161-0/+119
IPMI message Handler encapsulates the operations with respective to each IPMI message.The routines are there to read the message, execute the command and send the response. Change-Id: I607416f723510326748b3eba73f3a6557c40dd06 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
OpenPOWER on IntegriCloud