opendir change: refinement
[minix.git] / servers / inet / generic / tcp.h
blob7b96d44e13069e85ee9b456e30ea1fd940b4012e
1 /*
2 tcp.h
4 Copyright 1995 Philip Homburg
5 */
7 #ifndef TCP_H
8 #define TCP_H
10 #define TCP_MAX_DATAGRAM 8192
12 #ifndef TCP_MAX_SND_WND_SIZE
13 #define TCP_MAX_SND_WND_SIZE (32*1024)
14 #endif
16 #ifndef TCP_MIN_RCV_WND_SIZE
17 #define TCP_MIN_RCV_WND_SIZE (4*1024)
18 #endif
20 #ifndef TCP_MAX_RCV_WND_SIZE
21 #define TCP_MAX_RCV_WND_SIZE (TCP_MIN_RCV_WND_SIZE + 28*1024)
22 #endif
24 #define TCP_DEF_TOS 0
25 #define TCP_DEF_TTL 5 /* hops/seconds */
26 #define TCP_DEF_TTL_NEXT 30 /* hops/seconds */
28 /* An established TCP connection times out if no communication is possible
29 * for TCP_DEF_RT_DEAD clock ticks
31 #ifndef TCP_DEF_RT_DEAD
32 #define TCP_DEF_RT_DEAD (20L*60*HZ)
33 #endif
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 */
39 /* Minimum and maximum intervals for zero window probes. */
40 #define TCP_0WND_MIN (HZ)
41 #define TCP_0WND_MAX (5*60*HZ)
43 #define TCP_DEF_RTT 15 /* initial retransmission time in
44 * ticks
46 #define TCP_RTT_GRAN 5 /* minimal value of the rtt is
47 * TCP_RTT_GRAN * CLOCK_GRAN
49 #define TCP_RTT_MAX (10*HZ) /* The maximum retransmission interval
50 * is TCP_RTT_MAX ticks
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 */
56 #ifndef TCP_DEF_KEEPALIVE
57 #define TCP_DEF_KEEPALIVE (20L*60*HZ) /* Keepalive interval */
58 #endif
60 #ifndef TCP_DEF_MSS
61 #define TCP_DEF_MSS 1400
62 #endif
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.
72 #define TCP_DEF_CONF (NWTC_COPY | NWTC_LP_UNSET | NWTC_UNSET_RA | \
73 NWTC_UNSET_RP)
74 #define TCP_DEF_OPT (NWTO_NOFLAG)
76 #define TCP_DACK_RETRANS 3 /* # dup ACKs to start fast retrans. */
78 struct acc;
80 void tcp_prep ARGS(( void ));
81 void tcp_init ARGS(( void ));
82 int 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 ));
85 int tcp_read ARGS(( int fd, size_t count));
86 int tcp_write ARGS(( int fd, size_t count));
87 int tcp_ioctl ARGS(( int fd, ioreq_t req));
88 int tcp_cancel ARGS(( int fd, int which_operation ));
89 void tcp_close ARGS(( int fd));
91 #endif /* TCP_H */
94 * $PchId: tcp.h,v 1.17 2005/06/28 14:20:54 philip Exp $