全方位资讯网!

环球ug官网:SPARC/Solaris 8下快速终结TCP有限状态机的TIME_WAIT状态

来源:熏悦萄 发布时间:2020-09-17 浏览次数:

SPARC/Solaris 8下【快】速 <终结tcp有> 限〖状〗态「机」的TIME_WAIT状【态
 
2006】年10月14「日 12:56 ChinaByte  
 

  1987年10」月1【日(】可真够早{的)cdjohns@nswc-g.arpa提供了一}个shell script,用于

  SunOS 4.x系统“下快速”终“结TCP”有限『状』态(机)的TIME_WAIT「状」态。很奇 <怪,这个> 剧本并【未

  】获得『人』们的足(够)重‘视并’普及 流传,[直]到SunOS 4.x 退 出[历史舞台,]它也就销 声 匿[迹]了。

   昨天被backend〖从故纸堆〗里“翻”了出《来,》我【们就】乘隙 <移植> 到SPARC/Solaris 8下来。

  /usr/include/netinet里 的[文]件 多(是)为「用户」空{间}编 <程> 准“备”的,/usr/include/inet <里< p>

  的文>件(多是为内)核{空间}编程筹备的。{下面内}容{取}自SPARC/Solaris 8

  --------------------------------------------------------------------------

  /*

  * /usr/include/inet/tcp.h

  */

  /*

  * TCP states

  */

  ,define TCPS_CLOSED -6

  ,define TCPS_IDLE -5 /* idle (opened, but not bound) */

  ,define TCPS_BOUND -4 /* bound, ready to connect or accept */

  ,define TCPS_LISTEN -3 /* listening for connection */

  ,define TCPS_SYN_SENT -2 /* active, have sent syn */

  ,define TCPS_SYN_RCVD -1 /* have received syn (and sent ours) */

  /*

  * states < TCPS_ESTABLISHED are those where connections not established

  */

  ,define TCPS_ESTABLISHED 0 /* established */

  ,define TCPS_CLOSE_WAIT 1 /* rcvd fin, waiting for close */

  /*

  * states > TCPS_CLOSE_WAIT are those where user has closed

  */

  ,define TCPS_FIN_WAIT_1 2 /* have closed and sent fin */

  ,define TCPS_CLOSING 3 /* closed, xchd FIN, await FIN ACK */

  ,define TCPS_LAST_ACK 4 /* had fin and close; await FIN ACK */

  /*

  * states > TCPS_CLOSE_WAIT && < TCPS_FIN_WAIT_2 await ACK of FIN

  */

  ,define TCPS_FIN_WAIT_2 5 /* have closed, fin is acked */

  ,define TCPS_TIME_WAIT 6 /* in 2*msl quiet wait after close */

  ,if (defined(_KERNEL) || defined(_KMEMUSER))

  /*

  * If the information represented by the field is required even in the

  * TIME_WAIT state, it must be part of tcpb_t. Otherwise it must be part

  * of tcp_t. In other words, the tcp_t captures the information that is

  * not required, after a connection has entered the TIME_WAIT state.

  */

  typedef struct tcp_base_s

发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片