# 2.11BSD#431 - /usr/src/sys/netinet/tcp_seq.h

##### Macros

    SEQ_GEQ           X
    SEQ_GT            X
    SEQ_LEQ           X
    SEQ_LT            X
    TCP_ISSINCR       X
    tcp_rcvseqinit    X
    tcp_sendseqinit   X

       1: /*
       2:  * Copyright (c) 1982, 1986 Regents of the University of California.
       3:  * All rights reserved.
       4:  *
       5:  * Redistribution and use in source and binary forms are permitted
       6:  * provided that this notice is preserved and that due credit is given
       7:  * to the University of California at Berkeley. The name of the University
       8:  * may not be used to endorse or promote products derived from this
       9:  * software without specific prior written permission. This software
      10:  * is provided ``as is'' without express or implied warranty.
      11:  *
      12:  *	@(#)tcp_seq.h	7.2 (Berkeley) 12/7/87
      13:  */
      14:
      15: /*
      16:  * TCP sequence numbers are 32 bit integers operated
      17:  * on with modular arithmetic.  These macros can be
      18:  * used to compare such integers.
      19:  */
      20: #define SEQ_LT(a,b)     ((long)((a)-(b)) < 0)
      21: #define SEQ_LEQ(a,b)    ((long)((a)-(b)) <= 0)
      22: #define SEQ_GT(a,b)     ((long)((a)-(b)) > 0)
      23: #define SEQ_GEQ(a,b)    ((long)((a)-(b)) >= 0)
      24:
      25: /*
      26:  * Macros to initialize tcp sequence numbers for
      27:  * send and receive from initial send and receive
      28:  * sequence numbers.
      29:  */
      30: #define tcp_rcvseqinit(tp) \
      31:     (tp)->rcv_adv = (tp)->rcv_nxt = (tp)->irs + 1
      32:
      33: #define tcp_sendseqinit(tp) \
      34:     (tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \
      35:         (tp)->iss
      36:
      37: #define TCP_ISSINCR 128     /* increment for tcp_iss each second */
      38:
      39: #ifdef SUPERVISOR
      40: tcp_seq tcp_iss;        /* tcp initial send seq # */
      41: #endif

#### Defined macros

SEQ_GEQ defined in line 23; never used
SEQ_GT defined in line 22; used 17 times

- in /usr/src/sys/netinet/tcp_input.c line 91, 446, 464, 599, 693-694(2), 766, 775, 790, 996, 1023
- in /usr/src/sys/netinet/tcp_output.c line 132, 236, 303, 348, 378, 415

SEQ_LEQ defined in line 21; used 2 times

- in /usr/src/sys/netinet/tcp_input.c line 445, 720

SEQ_LT defined in line 20; used 7 times

- in /usr/src/sys/netinet/tcp_input.c line 457, 879, 951-952(2)
- in /usr/src/sys/netinet/tcp_output.c line 112, 155, 222

TCP_ISSINCR defined in line 37; used 4 times

- in /usr/src/sys/netinet/tcp_input.c line 419, 600
- in /usr/src/sys/netinet/tcp_timer.c line 106
- in /usr/src/sys/netinet/tcp_usrreq.c line 173

tcp_rcvseqinit defined in line 30; used 2 times

- in /usr/src/sys/netinet/tcp_input.c line 422, 462

tcp_sendseqinit defined in line 33; used 2 times

- in /usr/src/sys/netinet/tcp_input.c line 421
- in /usr/src/sys/netinet/tcp_usrreq.c line 174

#### Usage of this include

tcp_seq.h used 10 times

- in /usr/src/new/crash/inet.c line 27
- in /usr/src/sys/netinet/tcp_debug.c line 41
- in /usr/src/sys/netinet/tcp_input.c line 34
- in /usr/src/sys/netinet/tcp_output.c line 34
- in /usr/src/sys/netinet/tcp_subr.c line 35
- in /usr/src/sys/netinet/tcp_timer.c line 34
- in /usr/src/sys/netinet/tcp_usrreq.c line 35
- in /usr/src/ucb/PORT/systat/netstat.c line 30
- in /usr/src/ucb/netstat/inet.c line 38
- in /usr/src/usr.sbin/trpt/trpt.c line 36

Last modified: 1988-04-28 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1213 |