advance snd_max even when persisting
[unix-history] / usr / src / sys / netinet / tcp_debug.c
index 3724f6c..a2f703a 100644 (file)
@@ -1,4 +1,4 @@
-/*     tcp_debug.c     4.1     81/12/22        */
+/*     tcp_debug.c     4.3     82/03/29        */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -8,6 +8,7 @@
 #define PRUREQUESTS
 #include "../h/protosw.h"
 #include "../net/in.h"
 #define PRUREQUESTS
 #include "../h/protosw.h"
 #include "../net/in.h"
+#include "../net/route.h"
 #include "../net/in_pcb.h"
 #include "../net/in_systm.h"
 #include "../net/if.h"
 #include "../net/in_pcb.h"
 #include "../net/in_systm.h"
 #include "../net/if.h"
@@ -37,7 +38,6 @@ tcp_trace(act, ostate, tp, ti, req)
 {
        tcp_seq seq, ack;
        int len, flags;
 {
        tcp_seq seq, ack;
        int len, flags;
-       char *cp;
        struct tcp_debug *td = &tcp_debug[tcp_debx++];
 
        if (tcp_debx == TCP_NDEBUG)
        struct tcp_debug *td = &tcp_debug[tcp_debx++];
 
        if (tcp_debx == TCP_NDEBUG)
@@ -73,7 +73,7 @@ tcp_trace(act, ostate, tp, ti, req)
                if (act == TA_OUTPUT) {
                        seq = ntohl(seq);
                        ack = ntohl(ack);
                if (act == TA_OUTPUT) {
                        seq = ntohl(seq);
                        ack = ntohl(ack);
-                       len = ntohs(len);
+                       len = ntohs((u_short)len);
                }
 #endif
                if (act == TA_OUTPUT)
                }
 #endif
                if (act == TA_OUTPUT)
@@ -85,9 +85,11 @@ tcp_trace(act, ostate, tp, ti, req)
                printf("@%x", ack);
                flags = ti->ti_flags;
                if (flags) {
                printf("@%x", ack);
                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);
                        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);
+#endif
                        printf(">");
                }
                break;
                        printf(">");
                }
                break;