]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet/tcp_debug.c
xnu-792.6.70.tar.gz
[apple/xnu.git] / bsd / netinet / tcp_debug.c
index a7043db15d180b031a9b73b27a2a20ef5ae1c00e..e001cb8f052256bd2d881be4363c2b4b4403a753 100644 (file)
@@ -72,6 +72,7 @@
 #include <sys/systm.h>
 #include <sys/protosw.h>
 #include <sys/sysctl.h>
+#include <sys/socket.h>
 
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
@@ -88,7 +89,9 @@
 #include <netinet/tcp_debug.h>
 
 #if TCPDEBUG
-static int     tcpconsdebug = 0;
+__private_extern__ int tcpconsdebug = 0;
+SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcpconsdebug, CTLFLAG_RW, 
+    &tcpconsdebug, 0, "Turn tcp debugging on or off");
 #endif
 
 static struct tcp_debug tcp_debug[TCP_NDEBUG];
@@ -183,7 +186,7 @@ tcp_trace(act, ostate, tp, ipgen, th, req)
        if (tcpconsdebug == 0)
                return;
        if (tp)
-               printf("%p %s:", tp, tcpstates[ostate]);
+               printf("%x %s:", tp, tcpstates[ostate]);
        else
                printf("???????? ");
        printf("%s ", tanames[act]);