summaryrefslogtreecommitdiffstats
path: root/message_parsers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the payload with authenticated field in the headerTom Joseph2019-02-121-0/+2
| | | | | Change-Id: I2159e6c9b59b13962b387043572d25e07ddad9cb Signed-off-by: Tom Joseph <tomjoseph@in.ibm.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 session instead of shared_ptr+referencesVernon Mauery2018-11-211-5/+7
| | | | | | | | | | session objects were being created and held by shared_ptr objects and then shared via reference. This is dangerous and sidesteps the whole point of a shared_ptr, which is to share reference-counted ownership. This replaces the usage with a shared_ptr, which shows shared ownership. Change-Id: Ie22d812a6d260d606201eca6a9011e773c89e487 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* netipmid: use shared_ptr on messages instead of unique_ptr+referencesVernon Mauery2018-11-211-34/+37
| | | | | | | | | | 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: use std::shared_ptr instead of weak_ptr/lockVernon Mauery2018-11-061-12/+8
| | | | | | | | | | | | | 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-021-47/+42
| | | | | | | | 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>
* Implement encryptPayload and invoke it when flattening the packetTom Joseph2017-02-241-6/+29
| | | | | Change-Id: I85346e5ae47b81abef62a73ade3584cbf5a2df35 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Implement decryptPayload and invoke it when unflattening the packetTom Joseph2017-02-241-3/+27
| | | | | Change-Id: I52b283c9390e43c89b84d0617cebaf4938dad881 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Modify the addIntegrityData to pass the payload lengthTom Joseph2017-02-241-6/+8
| | | | | Change-Id: Ie04dec8866fc7116b5827ad691975e7e417ec684 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Modify the verifyPacketIntegrity to pass the Payload lengthTom Joseph2017-02-241-4/+5
| | | | | Change-Id: I952a8f5d6b953b98e727c5680bd964960ca9db4e Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Correct the calculation of integrity pad lengthTom Joseph2017-02-151-2/+2
| | | | | Change-Id: I34a4ab1adc7a0c510017edea20474008edaf8198 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Astyle changes in message_parsers.cppTom Joseph2017-02-101-6/+6
| | | | | Change-Id: Ib45da999aacb2763da43aaa2e40dc5a5c05ddfda Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Fix compilation errors for x86-64 SDKTom Joseph2017-02-091-1/+1
| | | | | Change-Id: Ia515f3bb6687a1bfc1c37fb33e37602ab9d91950 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Message parser changes to support Integrity AlgoTom Joseph2017-01-171-0/+91
| | | | | | | | | | | The unflatten logic of IPMI 2.0 parser is modified to support verification of integrity data and flatten logic is modified to support adding integrity data. Resolves openbmc/openbmc#869 Change-Id: I0553b12bcd17075d72e46120eeec5e524a5be420 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Minor cleanup of Message parserTom Joseph2017-01-161-9/+9
| | | | | Change-Id: Ib81f6bbe52ec1ac77be6c619c89c640c20799699 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Message parser for parsing IPMI messageTom Joseph2016-12-161-0/+223
IPMI message parser is responsible for parsing IPMI messages. There is parser for IPMI 1.5 messages and IPMI 2.0 messages. Change-Id: I24ebb6907abb56bcc25297eee75c06e6cde8355b Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
OpenPOWER on IntegriCloud