summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Move util.cpp/util.hpp to libipmidVernon Mauery2019-03-252-0/+309
| | | | | | | | | | | | | | | | These are functions that are used widely by ipmid providers, so it makes sense to put them in libipmi.so (the library that all providers must link against). Tested-by: use nm to inspect the binaries to see that the symbols are in the expected library. arm-openbmc-linux-gnueabi-nm libipmid.so.0.0.0 \ | grep getDbusObject 0001063c T _ZN4ipmi13getDbusObjectERN9sdbusplus.... Change-Id: I1221f807f2711c5301c5574623564ea1ae48a437 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Add user context parameter to legacy ipmi handler registrationVernon Mauery2019-03-211-4/+7
| | | | | | | | | This part was originally omitted, but needed by some external provider libraries. This will more closely mimic the behavior of ipmid prior to the architecture update. Change-Id: I5db35222e268a117480285c700d88206d6505d92 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Add generic signal handling API to work with boost::asioVernon Mauery2019-03-201-0/+35
| | | | | | | | | | | | This allows providers or the main application to handle POSIX signals using a callback chain. Each handler can return continueExecution or breakExecution to stop the signal handling chain or allow it to continue. Each handler is registered with a priority and upon reciept of a signal, each handler is executed in priority order until the end of the list is reached or one returns with breakExecution. Change-Id: Idd83625eb1a2d3bdafc92bdd839e0d6386177ff2 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* make utility.hpp available for external things that include ipmid/api.hppVernon Mauery2019-03-191-0/+1
| | | | | Change-Id: Iafe6827fa545d72666994bb68b5972cde4d0a1ff Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Change linkage of ipmid_get_sdbus_plus_handler() to libipmid.soVernon Mauery2019-03-191-3/+3
| | | | | | | | | | | | | | ipmid_get_sdbus_plus_handler() was re-added to be a part of systemintfcmds where it was used. This moves it to libipmid.so because that is where symbols used by both ipmid and the providers should be. Because ipmid_get_sdbus_plus_handler() relies on the io service and the main sdbus::asio::connection is also right there, this moves those symbols to libipmid as well to keep coherent. Change-Id: Ib125a0c217c8bcf47a8a4bd0c557eb69e928245b Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* errorResponse must not pack completion code in data payloadVernon Mauery2019-03-151-3/+3
| | | | | | | | | | | | | Until the response goes back out onto D-Bus, the completion code is held in a separate part of the Response object. The D-Bus response has a separate field for the completion code as well, reserving a byte array for response data only. This fixes the ipmitool error message 'Bad response length, len=1' when it attempts to query the PICMG capabilities. Change-Id: Iff0c3cb2e46a20e52229265eebb0995878a41714 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Add back an interface used by an external providerVernon Mauery2019-02-271-1/+3
| | | | | | | | | The move to the new API removed the ipmid_get_sdbus_plus_handler interface because it looked like it was self-contained in the executable, not realizing it was needed by an external provider. Change-Id: I75bb898294cc59cae7d291f7a6a6ed1e61d62903 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* ipmid: Add command filter mechanismVernon Mauery2019-02-253-0/+131
| | | | | | | | | | | | | | | Every ipmi command will pass through a filter prior to execution by the registered handler. The filter consists of all registered filter handlers that all must either return an IPMI error code or allow the command to be executed. If any of the filter handlers return an error code, the remaining handlers will not get a chance to run. Each handler, executed in registered priority order, can be passed the full message, or just the context (metadata describing the command, netfn, cmd, etc.) Change-Id: I3c48f19ebae0d24344b15fbcd2b940a32f8511d7 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* ipmid: Add in Native OEM and Group OEM supportVernon Mauery2019-02-252-0/+185
| | | | | | | | | | Add full support for the IPMI OEM NetFn and the Group OEM support as defined in the IPMI 2.0 specification. For now the legacy OEM router mechanism is still supported. Change-Id: I8cc999489000c6e0daf5aad3579838e6f499ba47 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* ipmid: Rewrite ipmid to use the new architectureVernon Mauery2019-02-251-4/+0
| | | | | | | | | | | | | New architecture highlights: * The new registration detects handler type for argument unpacking. * Upon completion the response is automatically packed. * Handlers can make use of the new async/yield sdbusplus mechanism. * The queue exports a new dbus interface for method-based IPMI calls. * The legacy handler registration is still supported for now. * The legacy dbus interface is still supported for now. Change-Id: Iae8342d9771ccebd3a0834e35597c14be4cc39cf Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* ipmid: Compiler-generated unpacking and packing of messagesVernon Mauery2019-02-259-0/+2488
| | | | | | | | | | | | | handler.hpp has the templated wrapping bits for ipmi command handler callbacks implemented. message.hpp has the serialization/deserialization of the ipmi data stream into packed tuples for functions. message/pack.hpp and message/unpack.hpp contain the actual serialization and deserialization of types. Change-Id: If997f8768c8488ab6ac022526a5ef9a1bce57fcb Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* include: Makefile_am: force symlink creationPatrick Venture2019-02-201-6/+6
| | | | | | | | | Force symlink creation. In the event, the daemon is being built and installed when already present, should force creation of symlinks and not fail on this case. Change-Id: Ic2cf84c36422a3be208a18a07daacfc6c587162b Signed-off-by: Patrick Venture <venture@google.com>
* Create libipmid and libipmid-hostWilliam A. Kennington III2019-02-077-0/+359
This starts a transition to common ipmid libraries that providers can link against. It will allow for a cleaner separation between common ipmid functionality and daemon type specific code. This is needed so we can resolve all of the symbols in the providers at link time instead of discovering bad linkage by building and running a full ipmi daemon. In future commits libraries will be packaged for libipmid and libipmid-host which provide all of the symbols used by the current set of ipmid providers. This is the first step, it just separates and renames the headers. Legacy symlinks are still kept around for compatability. It also adds stub libraries so that external users can start linking as intended. Change-Id: I6bbd7a146362012d26812a7b039d1c4075862cbd Signed-off-by: William A. Kennington III <wak@google.com>
OpenPOWER on IntegriCloud