X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..743b15655a24ee3fe9f458f383003e011db0558f:/bsd/netinet/tcp_debug.c diff --git a/bsd/netinet/tcp_debug.c b/bsd/netinet/tcp_debug.c index a7043db15..e001cb8f0 100644 --- a/bsd/netinet/tcp_debug.c +++ b/bsd/netinet/tcp_debug.c @@ -72,6 +72,7 @@ #include #include #include +#include #include #include @@ -88,7 +89,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]; @@ -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]);