home *** CD-ROM | disk | FTP | other *** search
- /*
- * $Header: /ax/networking:include/netinet/tcp_seq.h:networking 1.1 $
- * $Source: /ax/networking:include/netinet/tcp_seq.h: $
- *
- * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
- *
- * $Log: tcp_seq.h,v $
- * Revision 1.1 95/01/11 10:17:03 kwelton
- * Initial revision
- *
- * Revision 1.3 88/06/17 20:27:53 beta
- * Acorn Unix initial beta version
- *
- */
- /* @(#)tcp_seq.h 1.1 87/07/01 3.2/4.3NFSSRC */
- /*
- * Copyright (c) 1982, 1986 Regents of the University of California.
- * All rights reserved. The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
- *
- * @(#)tcp_seq.h 7.1 (Berkeley) 6/5/86
- */
-
- /*
- * TCP sequence numbers are 32 bit integers operated
- * on with modular arithmetic. These macros can be
- * used to compare such integers.
- */
- #define SEQ_LT(a,b) ((int)((a)-(b)) < 0)
- #define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0)
- #define SEQ_GT(a,b) ((int)((a)-(b)) > 0)
- #define SEQ_GEQ(a,b) ((int)((a)-(b)) >= 0)
-
- /*
- * Macros to initialize tcp sequence numbers for
- * send and receive from initial send and receive
- * sequence numbers.
- */
- #define tcp_rcvseqinit(tp) \
- (tp)->rcv_adv = (tp)->rcv_nxt = (tp)->irs + 1
-
- #define tcp_sendseqinit(tp) \
- (tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \
- (tp)->iss
-
- #define TCP_ISSINCR (125*1024) /* increment for tcp_iss each second */
-
- #ifdef KERNEL
- tcp_seq tcp_iss; /* tcp initial send seq # */
- #endif
-
- /* EOF tcp_seq.h */
-