Annotation of 43BSDReno/sys/netinet/tcp_seq.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1982, 1986 Regents of the University of California.
        !             3:  * All rights reserved.
        !             4:  *
        !             5:  * Redistribution is only permitted until one year after the first shipment
        !             6:  * of 4.4BSD by the Regents.  Otherwise, redistribution and use in source and
        !             7:  * binary forms are permitted provided that: (1) source distributions retain
        !             8:  * this entire copyright notice and comment, and (2) distributions including
        !             9:  * binaries display the following acknowledgement:  This product includes
        !            10:  * software developed by the University of California, Berkeley and its
        !            11:  * contributors'' in the documentation or other materials provided with the
        !            12:  * distribution and in all advertising materials mentioning features or use
        !            13:  * of this software.  Neither the name of the University nor the names of
        !            14:  * its contributors may be used to endorse or promote products derived from
        !            15:  * this software without specific prior written permission.
        !            16:  * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
        !            17:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
        !            18:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
        !            19:  *
        !            20:  *     @(#)tcp_seq.h   7.4 (Berkeley) 6/28/90
        !            21:  */
        !            22: 
        !            23: /*
        !            24:  * TCP sequence numbers are 32 bit integers operated
        !            25:  * on with modular arithmetic.  These macros can be
        !            26:  * used to compare such integers.
        !            27:  */
        !            28: #define        SEQ_LT(a,b)     ((int)((a)-(b)) < 0)
        !            29: #define        SEQ_LEQ(a,b)    ((int)((a)-(b)) <= 0)
        !            30: #define        SEQ_GT(a,b)     ((int)((a)-(b)) > 0)
        !            31: #define        SEQ_GEQ(a,b)    ((int)((a)-(b)) >= 0)
        !            32: 
        !            33: /*
        !            34:  * Macros to initialize tcp sequence numbers for
        !            35:  * send and receive from initial send and receive
        !            36:  * sequence numbers.
        !            37:  */
        !            38: #define        tcp_rcvseqinit(tp) \
        !            39:        (tp)->rcv_adv = (tp)->rcv_nxt = (tp)->irs + 1
        !            40: 
        !            41: #define        tcp_sendseqinit(tp) \
        !            42:        (tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \
        !            43:            (tp)->iss
        !            44: 
        !            45: #define        TCP_ISSINCR     (125*1024)      /* increment for tcp_iss each second */
        !            46: 
        !            47: #ifdef KERNEL
        !            48: tcp_seq        tcp_iss;                /* tcp initial send seq # */
        !            49: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.