summaryrefslogtreecommitdiff
path: root/network.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-06-13 09:30:15 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-06-13 09:30:15 -0400
commitd4aafb057f9ddd9234d112ea2a2d711b20f28711 (patch)
tree613f44f36c3f1d14418611c9583d9ede0a20f87d /network.h
parent160275478437d8b4e5c45929f9e864d7a6c93ec3 (diff)
Changed the order of the struct definitions in
`network.h`. It wouldn't compile due to them not being defined eariler, and I don't want to do prototyping.
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