44 #include <sys/cpuvar.h>
45 #include <sys/clock_impl.h> /* For LBOLT_FASTPATH{,64} */
46 #include <inet/optcom.h>
47 #include <inet/tcp.h>
48 #include <inet/tunables.h>
49
50 #define TCP_MOD_ID 5105
51
52 extern struct qinit tcp_sock_winit;
53 extern struct qinit tcp_winit;
54
55 extern sock_downcalls_t sock_tcp_downcalls;
56
57 /*
58 * Note that by default, the _snd_lowat_fraction tunable controls the value of
59 * the transmit low water mark. TCP_XMIT_LOWATER (and thus the _xmit_lowat
60 * property) is only used if the administrator has disabled _snd_lowat_fraction
61 * by setting it to 0.
62 */
63 #define TCP_XMIT_LOWATER 4096
64 #define TCP_XMIT_HIWATER 128000
65 #define TCP_RECV_LOWATER 2048
66 #define TCP_RECV_HIWATER 1048576
67
68 /*
69 * Bind hash list size and has function. It has to be a power of 2 for
70 * hashing.
71 */
72 #define TCP_BIND_FANOUT_SIZE 1024
73 #define TCP_BIND_HASH(lport) (ntohs(lport) & (TCP_BIND_FANOUT_SIZE - 1))
74
75 /*
76 * This implementation follows the 4.3BSD interpretation of the urgent
77 * pointer and not RFC 1122. Switching to RFC 1122 behavior would cause
78 * incompatible changes in protocols like telnet and rlogin.
79 */
80 #define TCP_OLD_URP_INTERPRETATION 1
81
82 /* TCP option length */
83 #define TCPOPT_NOP_LEN 1
84 #define TCPOPT_MAXSEG_LEN 4
85 #define TCPOPT_WS_LEN 3
86 #define TCPOPT_REAL_WS_LEN (TCPOPT_WS_LEN+1)
|
44 #include <sys/cpuvar.h>
45 #include <sys/clock_impl.h> /* For LBOLT_FASTPATH{,64} */
46 #include <inet/optcom.h>
47 #include <inet/tcp.h>
48 #include <inet/tunables.h>
49
50 #define TCP_MOD_ID 5105
51
52 extern struct qinit tcp_sock_winit;
53 extern struct qinit tcp_winit;
54
55 extern sock_downcalls_t sock_tcp_downcalls;
56
57 /*
58 * Note that by default, the _snd_lowat_fraction tunable controls the value of
59 * the transmit low water mark. TCP_XMIT_LOWATER (and thus the _xmit_lowat
60 * property) is only used if the administrator has disabled _snd_lowat_fraction
61 * by setting it to 0.
62 */
63 #define TCP_XMIT_LOWATER 4096
64 #define TCP_XMIT_HIWATER 49152
65 #define TCP_RECV_LOWATER 2048
66 #define TCP_RECV_HIWATER 128000
67
68 /*
69 * Bind hash list size and has function. It has to be a power of 2 for
70 * hashing.
71 */
72 #define TCP_BIND_FANOUT_SIZE 1024
73 #define TCP_BIND_HASH(lport) (ntohs(lport) & (TCP_BIND_FANOUT_SIZE - 1))
74
75 /*
76 * This implementation follows the 4.3BSD interpretation of the urgent
77 * pointer and not RFC 1122. Switching to RFC 1122 behavior would cause
78 * incompatible changes in protocols like telnet and rlogin.
79 */
80 #define TCP_OLD_URP_INTERPRETATION 1
81
82 /* TCP option length */
83 #define TCPOPT_NOP_LEN 1
84 #define TCPOPT_MAXSEG_LEN 4
85 #define TCPOPT_WS_LEN 3
86 #define TCPOPT_REAL_WS_LEN (TCPOPT_WS_LEN+1)
|