Lines Matching +full:multi +full:- +full:function
8 ## High-Level Overview
18 /------------------\
19 /----------------------------\ | |
20 | KCS/BT - Host | <-All IPMI cmds-> | |
22 \----------------------------/ | IPMI Daemon |
25 /-----------------------------\ | |
26 | LAN - RMCP+ | | |
27 | /--------------------------\| | |
28 | |*Process the Session and || <-All IPMI cmds-> | |
31 | \--------------------------/| | |
32 \-----------------------------/ \------------------/
36 /-------------------------\ | |
37 | Active session/SOL Objs | <---------Query the session-/ |
38 | - Properties | and SOL data via Dbus |
39 \-------------------------/ |
41 ---------------------\
42 | D-Bus services |
43 | ------------------ |
46 ---------------------/
55 byte:LUN - LUN from netFn/LUN pair (0-3, as per the IPMI spec)
56 byte:netFn - netFn from netFn/LUN pair (as per the IPMI spec)
57 byte:cmd - IPMI command ID (as per the IPMI spec)
58 array<byte>:data - optional command data (as per the IPMI spec)
59 dict<string:variant>:options - optional additional meta-data
60 "userId":int - IPMI user ID of caller (0 for session-less channels)
61 "privilege": enum:privilege - ADMIN, USER, OPERATOR, CALLBACK;
68 byte:CC - IPMI completion code
69 array<byte>:data - optional response data
73 fields from whatever transport format (RMCP+, IPMB, KCS, etc.) For session-based
77 privilge information, and encodes them in a D-Bus method call to send to the
82 back into a D-Bus response message and sent back to the calling channel's
83 bridge. The bridge will then re-package the response into its transport protocol
86 The next part is to provide a higher-level, strongly-typed, modern C++ mechanism
95 For session-less channels (like BT, KCS, and IPMB), the only privilege check
102 function. If the requested privilege is less than or equal to the required
111 the opportunity to return any valid IPMI completion code. Any non-zero
120 session and SOL are exposed in D-Bus, which ipmid can query and respond to
124 compiler-generated code with variadic templates at handler registration time.
125 The registration function is a templated function that allows any type of
142 message::Response::ptr response = request->makeResponse();
145 ipmi::Cc unpackError = request->unpack(unpackArgs);
148 response->cc = unpackError;
152 response->cc = std::get<0>(result);
154 response->pack(*payload);
216 getSdBus()->yield_method_call(*context->yield, ...);
245 multiple in-flight calls that are waiting on another D-Bus call to return. With
248 getSdBus() function provides yield_method_call() which is an asynchronous D-Bus
251 multi-threaded. Since many of the resources used in IPMI handlers are actually
252 D-Bus objects, this is not likely a common issue because of the serialization
253 that happens via the D-Bus calls.
260 is requesting. In the example, we are assuming that the non-full-byte integers
261 are packed bits in the message in most-significant-bit first order (same order
267 - standard integer types (`int8_t`, `uint16_t`, `uint32_t`, `int`, `long`, etc.)
268 - `bool` (extracts a single bit, same as `uint1_t`)
269 - multi-precision integers (`uint<N>`)
270 - `std::bitset<N>`
271 - `std::optional<T>` - extracts T if there are enough remaining bits/bytes
272 - `std::array<T, N>` - extracts N elements of T if possible
273 - `std::vector<T>` - extracts elements of T from the remaining bytes
274 - any additional types can be created by making a pack/unpack template
276 For partial byte types, the least-significant bits of the next full byte are
278 written, it makes the code simple. Multi-byte fields are extracted as LSByte
279 first (little-endian) to match the IPMI specification.
282 least-significant bit first order. As each byte fills up, the full byte gets
297 static_assert(N <= (details::bitStreamSize - CHAR_BIT));
302 return -1;
304 fixed_uint_t<details::bitStreamSize> bitmask = ((1 << count) - 1);
307 p.bitCount -= count;
317 manually unpacked. This is helpful for multi-function commands like Set LAN