summaryrefslogtreecommitdiff
path: root/network.h
diff options
context:
space:
mode:
Diffstat (limited to 'network.h')
-rw-r--r--network.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/network.h b/network.h
index c2d8d13..2387c8b 100644
--- a/network.h
+++ b/network.h
@@ -15,9 +15,10 @@ typedef struct packet packet;
typedef struct cmd cmd;
typedef struct cmd_header cmd_header;
-struct packet {
- uint32_t size; /* Size of packet, in bytes. */
- cmd cmd; /* Command. */
+struct cmd_header {
+ uint32_t size; /* Size of command, in bytes, including command header. */
+ uint16_t magic; /* Magic Number. Must always be 0x1488. */
+ uint16_t id; /* Command ID. */
};
struct cmd {
@@ -25,10 +26,9 @@ struct cmd {
uint8_t *data; /* Command data. */
};
-struct cmd_header {
- uint32_t size; /* Size of command, in bytes, including command header. */
- uint16_t magic; /* Magic Number. Must always be 0x1488. */
- uint16_t id; /* Command ID. */
+struct packet {
+ uint32_t size; /* Size of packet, in bytes. */
+ cmd cmd; /* Command. */
};
#endif