1: /*
2: * Copyright (c) 1982, 1986 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: *
6: * @(#)tcp_seq.h 7.1 (Berkeley) 6/5/86
7: */
8:
9: /*
10: * TCP sequence numbers are 32 bit integers operated
11: * on with modular arithmetic. These macros can be
12: * used to compare such integers.
13: */
14: #define SEQ_LT(a,b) ((int)((a)-(b)) < 0)
15: #define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0)
16: #define SEQ_GT(a,b) ((int)((a)-(b)) > 0)
17: #define SEQ_GEQ(a,b) ((int)((a)-(b)) >= 0)
18:
19: /*
20: * Macros to initialize tcp sequence numbers for
21: * send and receive from initial send and receive
22: * sequence numbers.
23: */
24: #define tcp_rcvseqinit(tp) \
25: (tp)->rcv_adv = (tp)->rcv_nxt = (tp)->irs + 1
26:
27: #define tcp_sendseqinit(tp) \
28: (tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \
29: (tp)->iss
30:
31: #define TCP_ISSINCR (125*1024) /* increment for tcp_iss each second */
32:
33: #ifdef KERNEL
34: tcp_seq tcp_iss; /* tcp initial send seq # */
35: #endif
Defined macros
SEQ_GT
defined in line
16; used 14 times
- in /usr/src/sys/netinet/tcp_input.c line
81,
416,
432,
586-587(2),
619,
627,
779,
803
- in /usr/src/sys/netinet/tcp_output.c line
137,
286,
329,
357,
383
Usage of this include