diff options
author | erdgeist <> | 2006-12-15 23:28:23 +0000 |
---|---|---|
committer | erdgeist <> | 2006-12-15 23:28:23 +0000 |
commit | 82b4df67514f258976152031fce44b9dfe249435 (patch) | |
tree | 24c08fc00c17a53bbb775fc3aed916b0aff1b727 /trackerlogic.h | |
parent | 9e93e6b6e18971811d706e16bdaa0c2a33829a65 (diff) |
Make code endianess save
Diffstat (limited to 'trackerlogic.h')
-rw-r--r-- | trackerlogic.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/trackerlogic.h b/trackerlogic.h index 44bd744..1bd7228 100644 --- a/trackerlogic.h +++ b/trackerlogic.h | |||
@@ -39,13 +39,16 @@ typedef struct { | |||
39 | } ot_vector; | 39 | } ot_vector; |
40 | 40 | ||
41 | typedef struct { | 41 | typedef struct { |
42 | ot_ip ip; | 42 | ot_byte data[8]; |
43 | ot_dword port_flags; | ||
44 | } ot_peer; | 43 | } ot_peer; |
45 | static const ot_byte PEER_FLAG_SEEDING = 0x80; | 44 | static const ot_byte PEER_FLAG_SEEDING = 0x80; |
46 | static const ot_byte PEER_FLAG_COMPLETED = 0x40; | 45 | static const ot_byte PEER_FLAG_COMPLETED = 0x40; |
47 | static const ot_byte PEER_FLAG_STOPPED = 0x20; | 46 | static const ot_byte PEER_FLAG_STOPPED = 0x20; |
48 | 47 | ||
48 | #define OT_SETIP( peer, ip ) MEMMOVE((peer),(ip),4); | ||
49 | #define OT_SETPORT( peer, port ) MEMMOVE((peer),(port),2); | ||
50 | #define OT_FLAG(peer) (((ot_byte*)(peer))[6]) | ||
51 | |||
49 | typedef struct { | 52 | typedef struct { |
50 | ot_time base; | 53 | ot_time base; |
51 | unsigned long seed_count[ OT_POOLS_COUNT ]; | 54 | unsigned long seed_count[ OT_POOLS_COUNT ]; |