default ttl 30 => 60
[unix-history] / usr / src / sys / netinet / tcp_debug.c
index e6491b4..75537e0 100644 (file)
@@ -1,32 +1,49 @@
-/*     tcp_debug.c     4.9     83/02/10        */
+/*
+ * Copyright (c) 1982, 1986 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *     @(#)tcp_debug.c 7.3 (Berkeley) %G%
+ */
 
 
-#include "../h/param.h"
-#include "../h/systm.h"
-#include "../h/mbuf.h"
-#include "../h/socket.h"
-#include "../h/socketvar.h"
+#include "param.h"
+#include "systm.h"
+#include "mbuf.h"
+#include "socket.h"
+#include "socketvar.h"
 #define PRUREQUESTS
 #define PRUREQUESTS
-#include "../h/protosw.h"
-#include "../h/errno.h"
+#include "protosw.h"
+#include "errno.h"
 
 #include "../net/route.h"
 #include "../net/if.h"
 
 
 #include "../net/route.h"
 #include "../net/if.h"
 
-#include "../netinet/in.h"
-#include "../netinet/in_pcb.h"
-#include "../netinet/in_systm.h"
-#include "../netinet/ip.h"
-#include "../netinet/ip_var.h"
-#include "../netinet/tcp.h"
+#include "in.h"
+#include "in_pcb.h"
+#include "in_systm.h"
+#include "ip.h"
+#include "ip_var.h"
+#include "tcp.h"
 #define TCPSTATES
 #define TCPSTATES
-#include "../netinet/tcp_fsm.h"
-#include "../netinet/tcp_seq.h"
+#include "tcp_fsm.h"
+#include "tcp_seq.h"
 #define        TCPTIMERS
 #define        TCPTIMERS
-#include "../netinet/tcp_timer.h"
-#include "../netinet/tcp_var.h"
-#include "../netinet/tcpip.h"
+#include "tcp_timer.h"
+#include "tcp_var.h"
+#include "tcpip.h"
 #define        TANAMES
 #define        TANAMES
-#include "../netinet/tcp_debug.h"
+#include "tcp_debug.h"
 
 int    tcpconsdebug = 0;
 /*
 
 int    tcpconsdebug = 0;
 /*
@@ -68,6 +85,9 @@ tcp_trace(act, ostate, tp, ti, req)
 
        case TA_INPUT:
        case TA_OUTPUT:
 
        case TA_INPUT:
        case TA_OUTPUT:
+       case TA_DROP:
+               if (ti == 0)
+                       break;
                seq = ti->ti_seq;
                ack = ti->ti_ack;
                len = ti->ti_len;
                seq = ti->ti_seq;
                ack = ti->ti_ack;
                len = ti->ti_len;
@@ -82,13 +102,13 @@ tcp_trace(act, ostate, tp, ti, req)
                        printf("[%x..%x)", seq, seq+len);
                else
                        printf("%x", seq);
                        printf("[%x..%x)", seq, seq+len);
                else
                        printf("%x", seq);
-               printf("@%x", ack);
+               printf("@%x, urp=%x", ack, ti->ti_urp);
                flags = ti->ti_flags;
                if (flags) {
 #ifndef lint
                        char *cp = "<";
 #define pf(f) { if (ti->ti_flags&TH_/**/f) { printf("%s%s", cp, "f"); cp = ","; } }
                flags = ti->ti_flags;
                if (flags) {
 #ifndef lint
                        char *cp = "<";
 #define pf(f) { if (ti->ti_flags&TH_/**/f) { printf("%s%s", cp, "f"); cp = ","; } }
-                       pf(SYN); pf(ACK); pf(FIN); pf(RST);
+                       pf(SYN); pf(ACK); pf(FIN); pf(RST); pf(PUSH); pf(URG);
 #endif
                        printf(">");
                }
 #endif
                        printf(">");
                }
@@ -106,8 +126,9 @@ tcp_trace(act, ostate, tp, ti, req)
        printf("\n");
        if (tp == 0)
                return;
        printf("\n");
        if (tp == 0)
                return;
-       printf("\trcv_(nxt,wnd) (%x,%x) snd_(una,nxt,max) (%x,%x,%x)\n",
-           tp->rcv_nxt, tp->rcv_wnd, tp->snd_una, tp->snd_nxt, tp->snd_max);
+       printf("\trcv_(nxt,wnd,up) (%x,%x,%x) snd_(una,nxt,max) (%x,%x,%x)\n",
+           tp->rcv_nxt, tp->rcv_wnd, tp->rcv_up, tp->snd_una, tp->snd_nxt,
+           tp->snd_max);
        printf("\tsnd_(wl1,wl2,wnd) (%x,%x,%x)\n",
            tp->snd_wl1, tp->snd_wl2, tp->snd_wnd);
 }
        printf("\tsnd_(wl1,wl2,wnd) (%x,%x,%x)\n",
            tp->snd_wl1, tp->snd_wl2, tp->snd_wnd);
 }