tcp: Add comment for the keepinit and keepalive related stuffs
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 16 Sep 2011 08:13:23 +0000 (16:13 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 16 Sep 2011 08:13:23 +0000 (16:13 +0800)
sys/netinet/tcp.h
sys/netinet/tcp_timer.h
sys/netinet/tcp_var.h

index 070a0ec..1cd54f9 100644 (file)
@@ -160,11 +160,11 @@ struct tcphdr {
 #define TCP_NOPUSH     0x04    /* don't push last block of write */
 #define TCP_NOOPT      0x08    /* don't use TCP options */
 #define TCP_SIGNATURE_ENABLE    0x10    /* use MD5 digests (RFC2385) */
-#define TCP_KEEPINIT   0x20
+#define TCP_KEEPINIT   0x20    /* set max time to establish connection */
 /* 0x40 unused */
 #define TCP_FASTKEEP   0x80
-#define TCP_KEEPIDLE   0x100
-#define TCP_KEEPINTVL  0x200
-#define TCP_KEEPCNT    0x400
+#define TCP_KEEPIDLE   0x100   /* set time before keepalive probes begin */
+#define TCP_KEEPINTVL  0x200   /* set time between keepalive probes */
+#define TCP_KEEPCNT    0x400   /* set max number of keepalive probes */
 
 #endif
index 93cec22..a74410d 100644 (file)
@@ -149,7 +149,7 @@ struct tcp_callout {
 extern int tcp_keepinit;               /* time to establish connection */
 extern int tcp_keepidle;               /* time before keepalive probes begin */
 extern int tcp_keepintvl;              /* time between keepalive probes */
-extern int tcp_keepcnt;                        /* aximum number of keepalive probes */
+extern int tcp_keepcnt;                        /* maximum number of keepalive probes */
 extern int tcp_delacktime;             /* time before sending a delayed ACK */
 extern int tcp_maxpersistidle;
 extern int tcp_rexmit_min;
index 0583372..b5c4802 100644 (file)
@@ -270,12 +270,12 @@ struct tcpcb {
        u_int32_t       rfbuf_ts;       /* recv buffer autoscaling timestamp */
        int     rfbuf_cnt;              /* recv buffer autoscaling byte count */
 
-       int     t_keepinit;
+       int     t_keepinit;             /* time to establish connection */
 
-       int     t_keepidle;
-       int     t_keepintvl;
-       int     t_keepcnt;
-       int     t_maxidle;
+       int     t_keepidle;             /* time before keepalive probes begin */
+       int     t_keepintvl;            /* time between keepalive probes */
+       int     t_keepcnt;              /* maximum number of keepalive probes */
+       int     t_maxidle;              /* time to drop after starting probes */
 };
 
 #define        IN_FASTRECOVERY(tp)     (tp->t_flags & TF_FASTRECOVERY)