fix bug that can cause recursive .forward files to fail
[unix-history] / usr / src / sys / netinet / tcp_debug.c
index 45f307b..444a853 100644 (file)
@@ -1,37 +1,51 @@
-/*     tcp_debug.c     4.10    83/05/14        */
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * %sccs.include.redist.c%
+ *
+ *     @(#)tcp_debug.c 8.1 (Berkeley) %G%
+ */
 
 
-#include "../h/param.h"
-#include "../h/systm.h"
-#include "../h/mbuf.h"
-#include "../h/socket.h"
-#include "../h/socketvar.h"
+#ifdef TCPDEBUG
+/* load symbolic names */
 #define PRUREQUESTS
 #define PRUREQUESTS
-#include "../h/protosw.h"
-#include "../h/errno.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"
 #define TCPSTATES
 #define TCPSTATES
-#include "../netinet/tcp_fsm.h"
-#include "../netinet/tcp_seq.h"
 #define        TCPTIMERS
 #define        TCPTIMERS
-#include "../netinet/tcp_timer.h"
-#include "../netinet/tcp_var.h"
-#include "../netinet/tcpip.h"
 #define        TANAMES
 #define        TANAMES
-#include "../netinet/tcp_debug.h"
+#endif
 
 
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/mbuf.h>
+#include <sys/socket.h>
+#include <sys/socketvar.h>
+#include <sys/protosw.h>
+#include <sys/errno.h>
+
+#include <net/route.h>
+#include <net/if.h>
+
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/ip.h>
+#include <netinet/in_pcb.h>
+#include <netinet/ip_var.h>
+#include <netinet/tcp.h>
+#include <netinet/tcp_fsm.h>
+#include <netinet/tcp_seq.h>
+#include <netinet/tcp_timer.h>
+#include <netinet/tcp_var.h>
+#include <netinet/tcpip.h>
+#include <netinet/tcp_debug.h>
+
+#ifdef TCPDEBUG
 int    tcpconsdebug = 0;
 int    tcpconsdebug = 0;
+#endif
 /*
  * Tcp debug routines
  */
 /*
  * Tcp debug routines
  */
+void
 tcp_trace(act, ostate, tp, ti, req)
        short act, ostate;
        struct tcpcb *tp;
 tcp_trace(act, ostate, tp, ti, req)
        short act, ostate;
        struct tcpcb *tp;
@@ -57,6 +71,7 @@ tcp_trace(act, ostate, tp, ti, req)
        else
                bzero((caddr_t)&td->td_ti, sizeof (*ti));
        td->td_req = req;
        else
                bzero((caddr_t)&td->td_ti, sizeof (*ti));
        td->td_req = req;
+#ifdef TCPDEBUG
        if (tcpconsdebug == 0)
                return;
        if (tp)
        if (tcpconsdebug == 0)
                return;
        if (tp)
@@ -114,4 +129,5 @@ tcp_trace(act, ostate, tp, ti, req)
            tp->snd_max);
        printf("\tsnd_(wl1,wl2,wnd) (%x,%x,%x)\n",
            tp->snd_wl1, tp->snd_wl2, tp->snd_wnd);
            tp->snd_max);
        printf("\tsnd_(wl1,wl2,wnd) (%x,%x,%x)\n",
            tp->snd_wl1, tp->snd_wl2, tp->snd_wnd);
+#endif /* TCPDEBUG */
 }
 }