Show
Ignore:
Timestamp:
06/03/10 22:43:33 (2 years ago)
Author:
mwhitworth
Message:

Add to network stack.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/branches/netchannel/user/sdk/network/seq.h

    r2088 r2099  
    22#define TCP_SEQ_H 
    33 
    4 #define SeqBefore(a, b) (((long)(a - b)) < 0) 
    5 #define SeqBeforeEq(a, b) (((long)(a - b)) <= 0) 
    6 #define SeqAfter(a, b) (((long)(a - b)) > 0) 
    7 #define SeqAfterEq(a, b) (((long)(a - b)) >= 0) 
     4#define SeqBefore(a, b) (((long)((a) - (b))) < 0) 
     5#define SeqBeforeEq(a, b) (((long)((a) - (b))) <= 0) 
     6#define SeqAfterEq(a, b) (((long)((b) - (a))) <= 0) 
    87#define SeqBetween(a, b, c) (((c) - (b)) >= ((a) - (b))) 
    98 
     9static inline ulong SeqAfter(ulong seq1, ulong seq2) 
     10{ 
     11        return (long)(seq2-seq1) < 0; 
     12} 
     13 
    1014#endif