X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/43866e378188c25dd1e2208016ab3cbeb086ae6c..55e303ae13a4cf49d70f2294092726f2fffb9ef2:/bsd/netinet/tcp_debug.c diff --git a/bsd/netinet/tcp_debug.c b/bsd/netinet/tcp_debug.c index 48608fc80..914ef69c5 100644 --- a/bsd/netinet/tcp_debug.c +++ b/bsd/netinet/tcp_debug.c @@ -75,6 +75,7 @@ #include #include #include +#include #include #include @@ -91,7 +92,9 @@ #include #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]; @@ -186,7 +189,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]);