你可以看到所有系统设置的tcp值
$ sysctl net.inet.tcp
从tcp_var.h,tcp_subr.c和tcp_timer.c解释:
- net.inet.tcp.keepidle =保持空闲计时器
- net.inet.tcp.keepintvl =发送keepalives的时间间隔
- net.inet.tcp.keepinit =build立syn的超时时间
- net.inet.tcp.mssdflt =默认的TCP最大分段大小
- net.inet.tcp.v6mssdflt = IPv6的默认TCP最大段大小
- net.inet.tcp.minmss =最小TCP最大分段大小
- net.inet.tcp.minmssoverload =允许在MINMSS大小下每秒的TCP段数
- net.inet.tcp.rfc1323 =启用rfc1323(高性能TCP)扩展
- net.inet.tcp.rfc1644 =启用rfc1644(TTCP)扩展
- net.inet.tcp.do_tcpdrain =在mbufs低时启用tcp_drain例程以获得额外的帮助
- net.inet.tcp.pcbcount =活动PCB的数量
- net.inet.tcp.icmp_may_rst =某些ICMP不可达消息可能中止SYN_SENT中的连接
- net.inet.tcp.strict_rfc1948 =确定是否完全遵循RFC1948
- net.inet.tcp.isn_reseed_interval = ISN秘密重新发送之间的秒数
- net.inet.tcp.background_io_enabled =后台IO已启用
- net.inet.tcp.rtt_min =允许的最小rtt值
- net.inet.tcp.randomize_ports =随机化TCP端口号
- net.inet.tcp.tcbhashsize = TCP控制块散列表的大小
- net.inet.tcp.msl =最大段寿命
- net.inet.tcp.always_keepalive =在所有TCP连接上假设SO_KEEPALIVE
- net.inet.tcp.broken_peer_syn_rxmit_thres = TCP在其余尝试期间禁用rfc1323和rfc1644之前重新传输的SYN的数量
- net.inet.tcp.pmtud_blackhole_detection =pathMTU发现黑洞检测
- net.inet.tcp.pmtud_blackhole_mss =pathMTU发现黑洞检测降低了MSS
我相信默认情况下,如果设置了SO_KEEPALIVE,那么在连接closures之前会发送8个keepalive。 时间以毫秒为单位。