source: trunk/minix/servers/inet/generic/tcp.h@ 12

Last change on this file since 12 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.5 KB
Line 
1/*
2tcp.h
3
4Copyright 1995 Philip Homburg
5*/
6
7#ifndef TCP_H
8#define TCP_H
9
10#define TCP_MAX_DATAGRAM 8192
11
12#ifndef TCP_MAX_SND_WND_SIZE
13#define TCP_MAX_SND_WND_SIZE (32*1024)
14#endif
15
16#ifndef TCP_MIN_RCV_WND_SIZE
17#define TCP_MIN_RCV_WND_SIZE (4*1024)
18#endif
19
20#ifndef TCP_MAX_RCV_WND_SIZE
21#define TCP_MAX_RCV_WND_SIZE (TCP_MIN_RCV_WND_SIZE + 28*1024)
22#endif
23
24#define TCP_DEF_TOS 0
25#define TCP_DEF_TTL 5 /* hops/seconds */
26#define TCP_DEF_TTL_NEXT 30 /* hops/seconds */
27
28/* An established TCP connection times out if no communication is possible
29 * for TCP_DEF_RT_DEAD clock ticks
30 */
31#ifndef TCP_DEF_RT_DEAD
32#define TCP_DEF_RT_DEAD (20L*60*HZ)
33#endif
34
35#define TCP_DEF_RT_MAX_CONNECT (5L*60*HZ) /* 5 minutes in ticks */
36#define TCP_DEF_RT_MAX_LISTEN (1L*60*HZ) /* 1 minute in ticks */
37#define TCP_DEF_RT_MAX_CLOSING (1L*60*HZ) /* 1 minute in ticks */
38
39/* Minimum and maximum intervals for zero window probes. */
40#define TCP_0WND_MIN (HZ)
41#define TCP_0WND_MAX (5*60*HZ)
42
43#define TCP_DEF_RTT 15 /* initial retransmission time in
44 * ticks
45 */
46#define TCP_RTT_GRAN 5 /* minimal value of the rtt is
47 * TCP_RTT_GRAN * CLOCK_GRAN
48 */
49#define TCP_RTT_MAX (10*HZ) /* The maximum retransmission interval
50 * is TCP_RTT_MAX ticks
51 */
52#define TCP_RTT_SMOOTH 16 /* weight is 15/16 */
53#define TCP_DRTT_MULT 4 /* weight of the deviation */
54#define TCP_RTT_SCALE 256 /* Scaled values for more accuracy */
55
56#ifndef TCP_DEF_KEEPALIVE
57#define TCP_DEF_KEEPALIVE (20L*60*HZ) /* Keepalive interval */
58#endif
59
60#ifndef TCP_DEF_MSS
61#define TCP_DEF_MSS 1400
62#endif
63
64#define TCP_MIN_PATH_MTU 500
65#define TCP_PMTU_INCR_IV (1L*60*HZ) /* 1 minute in ticks */
66#define TCP_PMTU_EN_IV (10L*60*HZ) /* 10 minutes in ticks */
67#define TCP_PMTU_INCR_FRAC 100 /* Add 1% each time */
68#define TCP_PMTU_BLACKHOLE (10*HZ) /* Assume a PMTU blackhole
69 * after 10 seconds.
70 */
71
72#define TCP_DEF_CONF (NWTC_COPY | NWTC_LP_UNSET | NWTC_UNSET_RA | \
73 NWTC_UNSET_RP)
74#define TCP_DEF_OPT (NWTO_NOFLAG)
75
76#define TCP_DACK_RETRANS 3 /* # dup ACKs to start fast retrans. */
77
78struct acc;
79
80void tcp_prep ARGS(( void ));
81void tcp_init ARGS(( void ));
82int tcp_open ARGS(( int port, int srfd,
83 get_userdata_t get_userdata, put_userdata_t put_userdata,
84 put_pkt_t put_pkt, select_res_t select_res ));
85int tcp_read ARGS(( int fd, size_t count));
86int tcp_write ARGS(( int fd, size_t count));
87int tcp_ioctl ARGS(( int fd, ioreq_t req));
88int tcp_cancel ARGS(( int fd, int which_operation ));
89void tcp_close ARGS(( int fd));
90
91#endif /* TCP_H */
92
93/*
94 * $PchId: tcp.h,v 1.17 2005/06/28 14:20:54 philip Exp $
95 */
Note: See TracBrowser for help on using the repository browser.