|
|
DataMuseum.dkPresents historical artifacts from the history of: Regnecentalen RC-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Regnecentalen RC-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T U
Length: 7303 (0x1c87)
Types: TextFile
Notes: Uncompressed file
└─⟦0f0f313e4⟧ Bits:30004764 SW95709I.2F TCP/IP Update 1
└─⟦0f0f313e4⟧ UNIX Filesystem
└─⟦87e63da4d⟧ »SSU.4a/new/usr/include/netinet/tcp_var.h.Z«
└─⟦this⟧
/*
* 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_var.h 2.3 - 90/01/11
*/
#ifndef _h_TCP_VAR
#define _h_TCP_VAR
#ident "@(#)tcp_var.h 2.4 - 90/11/02"
/*
* Kernel variables for tcp.
*/
/*
* Tcp control block, one per tcp; fields:
*/
struct tcpcb {
mblk_t *seg_next; /* sequencing queue */
mblk_t *seg_prev;
mblk_t *t_mblk; /* mblk for this pcb */
short t_state; /* state of this connection */
short t_timer[TCPT_NTIMERS]; /* tcp timers */
short t_rxtshift; /* log(2) of rexmt exp. backoff */
short t_rxtcur; /*current retansmit value*/
short t_dupacks; /*consecutive dup acks recd*/
short t_sflags; /* flags for stream management */
#define TFS_DISCONN 0x01 /* disconnect has been requested */
#define TFS_CLOSED 0x02 /* the stream has been closed - release */
#define TFS_UBLOCKED 0x04 /* upstream has been flow controlled */
#define TFS_SCANNED 0x08 /* has been scanned in tcplrsrv */
#define TFS_DBLOCKED 0x10 /* upstream's write queue blocked */
#define TFS_ESTABLISH 0x20 /* in process of establishing connection */
mblk_t *t_tcpopt; /* tcp options */
u_short t_maxseg; /* maximum segment size */
char t_force; /* 1 if forcing out a byte */
u_char t_flags;
#define TF_ACKNOW 0x01 /* ack peer immediately */
#define TF_DELACK 0x02 /* ack, but try to delay it */
#define TF_NODELAY 0x04 /* don't delay packets to coalesce */
#define TF_NOOPT 0x08 /* don't use tcp options */
#define TF_SENTFIN 0x10 /* have sent FIN */
#define TF_DRAIN 0x20
mblk_t *t_template; /* skeletal packet for transmit */
struct inpcb *t_inpcb; /* back pointer to internet pcb */
/*
* The following fields are used as in the protocol specification.
* See RFC783, Dec. 1981, page 21.
*/
/* send sequence variables */
tcp_seq snd_una; /* send unacknowledged */
tcp_seq snd_nxt; /* send next */
tcp_seq snd_up; /* send urgent pointer */
tcp_seq snd_wl1; /* window update seg seq number */
tcp_seq snd_wl2; /* window update seg ack number */
tcp_seq iss; /* initial send sequence number */
u_short snd_wnd; /* send window */
/* receive sequence variables */
u_short rcv_wnd; /* receive window */
tcp_seq rcv_nxt; /* receive next */
tcp_seq rcv_up; /* receive urgent pointer */
tcp_seq irs; /* initial receive sequence number */
/*
* Additional variables for this implementation.
*/
/* receive variables */
tcp_seq rcv_adv; /* advertised window */
/* retransmit variables */
tcp_seq snd_max; /* highest sequence number sent
* used to recognize retransmits
*/
/* congestion control (for source quench) */
u_short snd_cwnd; /* congestion-controlled window */
u_short snd_ssthresh; /* snd_cwnd size threshhold for
* slow start exponential to
* linear switch */
/* transmit timing stuff
* srtt snf rttvar are stored as fixed point; for convience in smoothing,
* srtt has 3 bits to the right of the binary point, rttvar has 2.
* "Variance" is actually smoothed difference.
*/
short t_idle; /* inactivity time */
short t_rtt; /* round trip time */
u_short max_rcvd; /* most peer has sent into window */
tcp_seq t_rtseq; /* sequence number being timed */
#ifdef OLDHBTCP
long t_srtt; /* smoothed round-trip time */
#else
short t_srtt; /* smoothed round-trip time */
short t_rttvar; /* variance in round trip time*/
#endif /*OLDHBTCP*/
u_short max_sndwnd; /* largest window peer has offered */
/* out-of-band data */
char t_oobflags; /* have some */
char t_iobc; /* input character */
#define TCPOOB_HAVEDATA 0x01
#define TCPOOB_HADDATA 0x02
#define TCPOOB_RFCFORM 0x10 /* follow RFC961 interpretation */
#define TCPOOB_SEGMENT 0x20 /* try to get all data, not just last */
/* this isn't entirely meaningful given */
/* that only the "end" is provided */
};
#define intotcpcb(ip) ((struct tcpcb *) ((mblk_t *)(ip)->inp_ppcb)->b_rptr)
#define sototcpcb(so) (intotcpcb(sotoinpcb(so)))
#ifndef IP_MAXPACKET
#define IP_MAXPACKET 65535
#endif
struct tcpstat {
#ifdef OLDSTAT
int tcps_badsum;
int tcps_badoff;
int tcps_hdrops;
int tcps_badsegs;
int tcps_unack;
#else
/*
* The first three stats are accomodated by the new stat, but the last two are
* not. However, they are never used anyway.
*/
int tcps_connattempt; /* connections initiated */
int tcps_accepts; /* connections accepted */
int tcps_connects; /* connections established */
int tcps_drops; /* connections dropped */
int tcps_conndrops; /* embryonic connections dropped */
int tcps_closed; /* conn. closed (includes drops) */
int tcps_segstimed; /* segs where we tried to get rtt */
int tcps_rttupdated; /* times we succeeded */
int tcps_delack; /* delayed acks sent */
int tcps_timeoutdrop; /* conn. dropped in rxmt timeout */
int tcps_rexmttimeo; /* retransmit timeouts */
int tcps_persisttimeo; /* persist timeouts */
int tcps_keeptimeo; /* keepalive timeouts */
int tcps_keepprobe; /* keepalive probes sent */
int tcps_keepdrops; /* connections dropped in keepalive */
int tcps_sndtotal; /* total packets sent */
int tcps_sndpack; /* data packets sent */
int tcps_sndbyte; /* data bytes sent */
int tcps_sndrexmitpack; /* data packets retransmitted */
int tcps_sndrexmitbyte; /* data bytes retransmitted */
int tcps_sndacks; /* ack-only packets sent */
int tcps_sndprobe; /* window probes sent */
int tcps_sndurg; /* packets sent with URG only */
int tcps_sndwinup; /* window update-only packets sent */
int tcps_sndctrl; /* control (SYN|FIN|RST) packets sent */
int tcps_rcvtotal; /* total packets received */
int tcps_rcvpack; /* packets received in sequence */
int tcps_rcvbyte; /* bytes received in sequence */
int tcps_rcvbadsum; /* packets received with ccksum errs */
int tcps_rcvbadoff; /* packets received with bad offset */
int tcps_rcvshort; /* packets received too short */
int tcps_rcvduppack; /* duplicate-only packets received */
int tcps_rcvdupbyte; /* duplicate-only bytes received */
int tcps_rcvpartduppack; /* packets with some duplicate data */
int tcps_rcvpartdupbyte; /* dup. bytes in part-dup. packets */
int tcps_rcvoopack; /* out-of-order packets received */
int tcps_rcvoobyte; /* out-of-order bytes received */
int tcps_rcvpackafterwin; /* packets with data after window */
int tcps_rcvbyteafterwin; /* bytes rcvd after window */
int tcps_rcvafterclose; /* packets rcvd after "close" */
int tcps_rcvwinprobe; /* rcvd window probe packets */
int tcps_rcvdupack; /* rcvd duplicate acks */
int tcps_rcvacktoomuch; /* rcvd acks for unsent data */
int tcps_rcvackpack; /* rcvd ack packets */
int tcps_rcvackbyte; /* bytes acked by rcvd acks */
int tcps_rcvwinupd; /* rcvd window update packets */
#define tcps_badsum tcps_rcvbadsum
#define tcps_badoff tcps_rcvbadoff
#define tcps_hdrops tcps_rcvshort
#endif /* OLDSTAT */
};
#ifdef KERNEL
extern struct inpcb tcb; /* head of queue of active tcpcb's */
extern struct tcpstat tcpstat; /* tcp statistics */
extern mblk_t *tcp_template();
extern struct tcpcb *tcp_close(), *tcp_drop();
extern struct tcpcb *tcp_timers(), *tcp_disconnect(), *tcp_usrclosed();
#endif
#endif /* _h_TCP_VAR */