summaryrefslogtreecommitdiffstats
path: root/comm_module.cpp
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2018-10-12 13:20:49 -0700
committerVernon Mauery <vernon.mauery@linux.intel.com>2018-11-02 15:44:15 -0700
commit9e801a2b5b36acd307606af5eafdb885dfe8daee (patch)
tree87d6cdef2c9008d76e9a99784e83f2b3af90ebc0 /comm_module.cpp
parentf6110552bd0e940efe51eb11c0415bebb2ab883f (diff)
downloadphosphor-net-ipmid-9e801a2b5b36acd307606af5eafdb885dfe8daee.tar.gz
phosphor-net-ipmid-9e801a2b5b36acd307606af5eafdb885dfe8daee.zip
netipmid: apply clang-format rules
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>
Diffstat (limited to 'comm_module.cpp')
-rw-r--r--comm_module.cpp86
1 files changed, 39 insertions, 47 deletions
diff --git a/comm_module.cpp b/comm_module.cpp
index d780e21..a58ca5d 100644
--- a/comm_module.cpp
+++ b/comm_module.cpp
@@ -1,10 +1,5 @@
#include "comm_module.hpp"
-#include <algorithm>
-#include <cstring>
-#include <iomanip>
-#include <iostream>
-
#include "command/channel_auth.hpp"
#include "command/open_session.hpp"
#include "command/rakp12.hpp"
@@ -14,63 +9,60 @@
#include "main.hpp"
#include "session.hpp"
+#include <algorithm>
+#include <cstring>
+#include <iomanip>
+#include <iostream>
+
namespace command
{
void sessionSetupCommands()
{
- static const command::CmdDetails commands[] =
- {
+ static const command::CmdDetails commands[] = {
// Open Session Request/Response
- {
- {
- (static_cast<uint32_t>
- (message::PayloadType::OPEN_SESSION_REQUEST) << 16)
- },
- &openSession, session::Privilege::HIGHEST_MATCHING, true
- },
+ {{(static_cast<uint32_t>(message::PayloadType::OPEN_SESSION_REQUEST)
+ << 16)},
+ &openSession,
+ session::Privilege::HIGHEST_MATCHING,
+ true},
// RAKP1 & RAKP2 Message
- {
- {(static_cast<uint32_t>(message::PayloadType::RAKP1) << 16)},
- &RAKP12, session::Privilege::HIGHEST_MATCHING, true
- },
+ {{(static_cast<uint32_t>(message::PayloadType::RAKP1) << 16)},
+ &RAKP12,
+ session::Privilege::HIGHEST_MATCHING,
+ true},
// RAKP3 & RAKP4 Message
- {
- {(static_cast<uint32_t>(message::PayloadType::RAKP3) << 16)},
- &RAKP34, session::Privilege::HIGHEST_MATCHING, true
- },
+ {{(static_cast<uint32_t>(message::PayloadType::RAKP3) << 16)},
+ &RAKP34,
+ session::Privilege::HIGHEST_MATCHING,
+ true},
// Get Channel Authentication Capabilities Command
- {
- {
- (static_cast<uint32_t>(message::PayloadType::IPMI) << 16) |
- static_cast<uint16_t>(command::NetFns::APP) | 0x38
- },
- &GetChannelCapabilities,
- session::Privilege::HIGHEST_MATCHING, true
- },
+ {{(static_cast<uint32_t>(message::PayloadType::IPMI) << 16) |
+ static_cast<uint16_t>(command::NetFns::APP) | 0x38},
+ &GetChannelCapabilities,
+ session::Privilege::HIGHEST_MATCHING,
+ true},
// Set Session Privilege Command
- {
- {
- (static_cast<uint32_t>(message::PayloadType::IPMI) << 16) |
- static_cast<uint16_t>(command::NetFns::APP) | 0x3B
- },
- &setSessionPrivilegeLevel, session::Privilege::USER, false
- },
+ {{(static_cast<uint32_t>(message::PayloadType::IPMI) << 16) |
+ static_cast<uint16_t>(command::NetFns::APP) | 0x3B},
+ &setSessionPrivilegeLevel,
+ session::Privilege::USER,
+ false},
// Close Session Command
- {
- {
- (static_cast<uint32_t>(message::PayloadType::IPMI) << 16) |
- static_cast<uint16_t>(command::NetFns::APP) | 0x3C
- },
- &closeSession, session::Privilege::CALLBACK, false
- },
+ {{(static_cast<uint32_t>(message::PayloadType::IPMI) << 16) |
+ static_cast<uint16_t>(command::NetFns::APP) | 0x3C},
+ &closeSession,
+ session::Privilege::CALLBACK,
+ false},
};
for (auto& iter : commands)
{
- std::get<command::Table&>(singletonPool).registerCommand(
- iter.command, std::make_unique<command::NetIpmidEntry>
- (iter.command, iter.functor, iter.privilege, iter.sessionless));
+ std::get<command::Table&>(singletonPool)
+ .registerCommand(iter.command,
+ std::make_unique<command::NetIpmidEntry>(
+ iter.command, iter.functor, iter.privilege,
+ iter.sessionless));
}
}
OpenPOWER on IntegriCloud