summaryrefslogtreecommitdiffstats
path: root/src/AFC.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/AFC.h')
-rw-r--r--src/AFC.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/AFC.h b/src/AFC.h
index 6b4a0aa..5db865f 100644
--- a/src/AFC.h
+++ b/src/AFC.h
@@ -36,6 +36,18 @@ typedef struct {
36 uint64_t entire_length, this_length, packet_num, operation; 36 uint64_t entire_length, this_length, packet_num, operation;
37} AFCPacket; 37} AFCPacket;
38 38
39#define AFCPacket_to_LE(x) \
40 (x)->entire_length = GUINT64_TO_LE((x)->entire_length); \
41 (x)->this_length = GUINT64_TO_LE((x)->this_length); \
42 (x)->packet_num = GUINT64_TO_LE((x)->packet_num); \
43 (x)->operation = GUINT64_TO_LE((x)->operation);
44
45#define AFCPacket_from_LE(x) \
46 (x)->entire_length = GUINT64_FROM_LE((x)->entire_length); \
47 (x)->this_length = GUINT64_FROM_LE((x)->this_length); \
48 (x)->packet_num = GUINT64_FROM_LE((x)->packet_num); \
49 (x)->operation = GUINT64_FROM_LE((x)->operation);
50
39typedef struct { 51typedef struct {
40 uint64_t filehandle, size; 52 uint64_t filehandle, size;
41} AFCFilePacket; 53} AFCFilePacket;