Date: Thu, 19 Jun 2008 23:59:32 GMT From: Rui Paulo <rpaulo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 143797 for review Message-ID: <200806192359.m5JNxWd9091823@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=143797 Change 143797 by rpaulo@rpaulo_epsilon on 2008/06/19 23:59:29 Fix the CLOSING case. Affected files ... .. //depot/projects/soc2008/rpaulo-tcpad/handler.c#11 edit Differences ... ==== //depot/projects/soc2008/rpaulo-tcpad/handler.c#11 (text+ko) ==== @@ -23,7 +23,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/soc2008/rpaulo-tcpad/handler.c#10 $ + * $P4: //depot/projects/soc2008/rpaulo-tcpad/handler.c#11 $ */ #include <stdio.h> @@ -142,14 +142,15 @@ } if (cp->t_state == TCPS_ESTABLISHED && rcp->t_state == TCPS_FIN_WAIT_1) { - printf("first ack\n"); + DPRINTF("first ack\n"); cp->t_state = TCPS_CLOSE_WAIT; rcp->t_state = TCPS_FIN_WAIT_2; } if (cp->t_state == TCPS_LAST_ACK || cp->t_state == TCPS_CLOSING) { cp->t_state = TCPS_TIME_WAIT; - printf("connection down\n"); + DPRINTF("connection down\n"); + dumper_error(p, "a.cap", cp->pktshead); } } else if ((tcp->th_flags & TH_FLAGS) == (TH_FIN|TH_ACK)) { if (cp == NULL || rcp == NULL) @@ -163,11 +164,12 @@ } if (cp->t_state == TCPS_CLOSE_WAIT && rcp->t_state == TCPS_FIN_WAIT_2) { - printf("last_ack\n"); + DPRINTF("last_ack\n"); cp->t_state = TCPS_TIME_WAIT; rcp->t_state = TCPS_LAST_ACK; } - if (cp->t_state == TCPS_FIN_WAIT_1) { + if (rcp->t_state == TCPS_FIN_WAIT_1) { + DPRINTF("closing\n"); cp->t_state = TCPS_CLOSING; } } else if ((tcp->th_flags & TH_FLAGS) == (TH_RST|TH_ACK)) {help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806192359.m5JNxWd9091823>
