summaryrefslogtreecommitdiffstats
path: root/sol
Commit message (Collapse)AuthorAgeFilesLines
* netipmid: move sol timers to asioVernon Mauery2019-02-013-45/+154
| | | | | | | | | The IPMI SOL console was using sd_event-based timers directly (without any abstraction). This moves to a much higher level abstraction that is very easy to use: asio timers. Change-Id: Id5df76a1918cdfae420e01884d664234810b7abd Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: move sol console sockets to asioVernon Mauery2019-02-012-95/+86
| | | | | | | | Rewrite the SOL console sockets use boost::asio. This reduces code size and ties better into the main asio io loop. Change-Id: Ia79b9aa3fa3c7ce1ddd9b609b032160a88394f8c Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* phosphor-net-ipmid: connect with the correct sockaddr sizeVernon Mauery2018-12-191-1/+3
| | | | | | | | | | | | | | | | | | | | Abstract unix sockets start with the nul-charater, but are not nul terminated. In fact, the nul-character has no meaning in the path. According to the man page unix(7), abstract: an abstract socket address is distinguished (from a pathname socket) by the fact that sun_path[0] is a null byte ('\0'). The socket's address in this namespace is given by the additional bytes in sun_path that are covered by the specified length of the address structure. (Null bytes in the name have no special significance.) This means that when calling bind/connect, the size of the sockaddr structure is not sizeof(sockaddr_un), it is sizeof(sockaddr_un) - sizeof(sun_path) + (path_len) Change-Id: I61f967d9215afb00e9e5c22f535f5c252b41d3af Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: use std::shared_ptr instead of weak_ptr/lockVernon Mauery2018-11-061-2/+1
| | | | | | | | | | | | | 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-025-456/+455
| | | | | | | | 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 SOL parameter channel numberTom Joseph2018-04-041-0/+10
| | | | | | | | | | | | 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>
* explicit use of std::vector instead of buffer/BufferVernon Mauery2017-12-055-10/+9
| | | | | | | | | | 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>
* netipmid: Support usesolkeepalive optionTom Joseph2017-08-211-0/+8
| | | | | | | | | | | | | | ipmitool keeps SOL session active by sending Get Device ID command or using SOL packet to keep the session active. We are adding support for keeping the SOL session active by using SOL packet in which case ipmitool would send a SOL payload with no character data and a valid SOL sequence number, the BMC would respond with acknowledgement for that sequence number. Resolves openbmc/openbmc#2101 Change-Id: Ia10e622e761e0de3530e3cc8bc2148a477ffd4ba Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Cleanup the console buffer on stopping the SOL payload.Tom Joseph2017-08-011-0/+2
| | | | | | | Resolves openbmc/openbmc#1811 Change-Id: I45c7f9379e4df28733f55fbe4830573d0fe09c14 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add SOL configuration parameters to SOL Managers.Tom Joseph2017-05-081-0/+50
| | | | | | | | | Add Set In Progress, SOL Enable, Force SOL Payload Encryption, Force SOL Payload Authentication and SOL Privilege Level SOL Configuration parameters as SOL Manager properties. Change-Id: Ic8c2f172df8ce92e2ef5675493e2843824746b47 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Change accumulateInterval and retryInterval to std::chrono units.Tom Joseph2017-05-082-24/+16
| | | | | Change-Id: I5e1234ee141323a1feb6460a9424226f96bc7522 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Correct the parameters for SOLContext constructor.Tom Joseph2017-05-081-1/+1
| | | | | Change-Id: I3643e6b55d195f255815fa47adf02a5db0da6838 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Remove hostConsole fd from the event loop.Tom Joseph2017-05-082-9/+11
| | | | | | | | The fd is registered in the sd_event_loop, so as part of cleanup of the customFD the fd is removed from the event loop. Change-Id: Idfc07375ae330c82755fb1d08c8f181410cf917f Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add function to send outbound SOL payloadTom Joseph2017-04-251-0/+5
| | | | | Change-Id: I63213034110c0a550b43e1cbc0115b1312821e3d Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add resendPayload functionTom Joseph2017-04-241-0/+8
| | | | | | | Resolves openbmc/openbmc#856 Change-Id: I957ce889500840c067e97537e825571cfb77e1c4 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Implement API to send SOL payload when console data is availableTom Joseph2017-04-241-0/+33
| | | | | Change-Id: I7869d389b589c59e0c76000da9bfd72b9e67c064 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Implement API to prepare response for inbound SOL payloadTom Joseph2017-04-241-3/+43
| | | | | Change-Id: Ied9811e7e3176c5edf99fa299549ea1d14e9555f Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Implement API to handle inbound SOL PayloadTom Joseph2017-04-242-0/+197
| | | | | Change-Id: I4bcb98568d84ba384ac11b7777d936c7d5fc124e Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Implement API to stop a payload instanceTom Joseph2017-04-241-0/+21
| | | | | Change-Id: I8cf7a85f651e5a4377f8e64cbb32932f452a234e Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Add API to start a SOL payload instanceTom Joseph2017-04-241-0/+37
| | | | | Change-Id: I3c87936350c9e3d7c4eb97b4c720295652aff9c4 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Implement function to write to host console socketTom Joseph2017-04-241-0/+34
| | | | | Change-Id: I92b9550d9b6d458bbafebfff08552db5b2ab78e6 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Implement Host Console socket InitTom Joseph2017-04-241-0/+44
| | | | | | | This API would initialise the host console socket file descriptor Change-Id: Ied7bdc1c4fbee060ec693d8bab3c7bade6edf365 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Defintion of SOL ManagerTom Joseph2017-04-241-0/+215
| | | | | | | | | | The SOL Manager class is responsible for managing SOL instances and configuration parameters. It provides interfaces to start and stop SOL payload instances and get handle to context object. It also provides API to write to the host console socket. Change-Id: Iea51832398d81c8ddf6fadcbb8b7e6735a3b4ebc Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Definition for SOL Context ClassTom Joseph2017-04-241-0/+189
| | | | | | | | | | SOL context class provides interfaces for operations on a SOL payload instance, to send data to a remote console and receive SOL payload from a remote console, retry SOL payload. It manages the sequence numbers related to the SOL and the retry count. Change-Id: If3926a98bf9435779f4d6d7d564f48c576bf1f24 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Implement Host Console BufferTom Joseph2017-04-241-0/+74
Implement host console buffer to buffer host data and provide interfaces to read the buffer, write to the buffer and erase the buffer Change-Id: I67bec738dee6fa3b22c30aaefe5056edf4fb937c Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
OpenPOWER on IntegriCloud