diff options
Diffstat (limited to 'src/AFC.h')
-rw-r--r-- | src/AFC.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -36,6 +36,18 @@ typedef struct { uint64_t entire_length, this_length, packet_num, operation; } AFCPacket; +#define AFCPacket_to_LE(x) \ + (x)->entire_length = GUINT64_TO_LE((x)->entire_length); \ + (x)->this_length = GUINT64_TO_LE((x)->this_length); \ + (x)->packet_num = GUINT64_TO_LE((x)->packet_num); \ + (x)->operation = GUINT64_TO_LE((x)->operation); + +#define AFCPacket_from_LE(x) \ + (x)->entire_length = GUINT64_FROM_LE((x)->entire_length); \ + (x)->this_length = GUINT64_FROM_LE((x)->this_length); \ + (x)->packet_num = GUINT64_FROM_LE((x)->packet_num); \ + (x)->operation = GUINT64_FROM_LE((x)->operation); + typedef struct { uint64_t filehandle, size; } AFCFilePacket; |