add whiteout inode number
[unix-history] / usr / src / sys / netinet / tcp_seq.h
CommitLineData
8ae0e4b4 1/*
e7a3707f
KB
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
8ae0e4b4 4 *
dbf0c423 5 * %sccs.include.redist.c%
2b6b6284 6 *
e7a3707f 7 * @(#)tcp_seq.h 8.1 (Berkeley) %G%
8ae0e4b4 8 */
5c3c035b
BJ
9
10/*
11 * TCP sequence numbers are 32 bit integers operated
12 * on with modular arithmetic. These macros can be
13 * used to compare such integers.
14 */
15#define SEQ_LT(a,b) ((int)((a)-(b)) < 0)
16#define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0)
17#define SEQ_GT(a,b) ((int)((a)-(b)) > 0)
18#define SEQ_GEQ(a,b) ((int)((a)-(b)) >= 0)
19
20/*
21 * Macros to initialize tcp sequence numbers for
22 * send and receive from initial send and receive
23 * sequence numbers.
24 */
25#define tcp_rcvseqinit(tp) \
678bbab1 26 (tp)->rcv_adv = (tp)->rcv_nxt = (tp)->irs + 1
5c3c035b
BJ
27
28#define tcp_sendseqinit(tp) \
29 (tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \
30 (tp)->iss
31
875dfa99 32#define TCP_ISSINCR (125*1024) /* increment for tcp_iss each second */
5c3c035b
BJ
33
34#ifdef KERNEL
35tcp_seq tcp_iss; /* tcp initial send seq # */
36#endif