aboutsummaryrefslogtreecommitdiff
path: root/include/stick10_commands_0.8.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stick10_commands_0.8.h')
-rw-r--r--include/stick10_commands_0.8.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/stick10_commands_0.8.h b/include/stick10_commands_0.8.h
index e880c0a..f0e28a6 100644
--- a/include/stick10_commands_0.8.h
+++ b/include/stick10_commands_0.8.h
@@ -75,7 +75,23 @@ namespace nitrokey {
}
} __packed;
- typedef Transaction<command_id(), struct CommandPayload, struct EmptyPayload>
+
+ struct ResponsePayload {
+ union {
+ uint8_t data[40];
+ } __packed;
+
+ bool isValid() const { return true; }
+ std::string dissect() const {
+ std::stringstream ss;
+ ss << "data:" << std::endl
+ << ::nitrokey::misc::hexdump((const char *) (&data), sizeof data);
+ return ss.str();
+ }
+ } __packed;
+
+
+ typedef Transaction<command_id(), struct CommandPayload, struct ResponsePayload>
CommandTransaction;
};