From 82b4df67514f258976152031fce44b9dfe249435 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 15 Dec 2006 23:28:23 +0000 Subject: Make code endianess save --- trackerlogic.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'trackerlogic.h') diff --git a/trackerlogic.h b/trackerlogic.h index 44bd744..1bd7228 100644 --- a/trackerlogic.h +++ b/trackerlogic.h @@ -39,13 +39,16 @@ typedef struct { } ot_vector; typedef struct { - ot_ip ip; - ot_dword port_flags; + ot_byte data[8]; } ot_peer; static const ot_byte PEER_FLAG_SEEDING = 0x80; static const ot_byte PEER_FLAG_COMPLETED = 0x40; static const ot_byte PEER_FLAG_STOPPED = 0x20; +#define OT_SETIP( peer, ip ) MEMMOVE((peer),(ip),4); +#define OT_SETPORT( peer, port ) MEMMOVE((peer),(port),2); +#define OT_FLAG(peer) (((ot_byte*)(peer))[6]) + typedef struct { ot_time base; unsigned long seed_count[ OT_POOLS_COUNT ]; -- cgit v1.2.3