diff options
-rw-r--r-- | sys/netinet/tcp_fsm.h | 2 | ||||
-rw-r--r-- | sys/netinet/tcp_input.c | 6 | ||||
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 4 | ||||
-rw-r--r-- | sys/netipx/spx_debug.c | 2 | ||||
-rw-r--r-- | sys/netipx/spx_debug.h | 1 | ||||
-rw-r--r-- | usr.bin/netstat/ipx.c | 3 |
6 files changed, 4 insertions, 14 deletions
diff --git a/sys/netinet/tcp_fsm.h b/sys/netinet/tcp_fsm.h index 138d967..61fd0c1 100644 --- a/sys/netinet/tcp_fsm.h +++ b/sys/netinet/tcp_fsm.h @@ -102,7 +102,7 @@ int tcp_acounts[TCP_NSTATES][PRU_NREQ]; #endif #ifdef TCPSTATES -const char *tcpstates[] = { +static char const * const tcpstates[] = { "CLOSED", "LISTEN", "SYN_SENT", "SYN_RCVD", "ESTABLISHED", "CLOSE_WAIT", "FIN_WAIT_1", "CLOSING", "LAST_ACK", "FIN_WAIT_2", "TIME_WAIT", diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 711251e..42d8147 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1573,15 +1573,9 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, KASSERT(headlocked, ("%s: trimthenstep6: tcp_close.3: head " "not locked", __func__)); if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { -#ifdef TCPDEBUG log(LOG_DEBUG, "%s; %s: %s: Received data after socket " "was closed, sending RST and removing tcpcb\n", s, __func__, tcpstates[tp->t_state]); -#else - log(LOG_DEBUG, "%s; %s: Received data after socket " - "was closed, sending RST and removing tcpcb\n", - s, __func__); -#endif free(s, M_TCPLOG); } tp = tcp_close(tp); diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 2ecbc30..79d678e 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -87,10 +87,6 @@ /* * TCP protocol interface to socket abstraction. */ -#ifdef TCPDEBUG -extern const char *tcpstates[]; -#endif - static int tcp_attach(struct socket *); static int tcp_connect(struct tcpcb *, struct sockaddr *, struct thread *td); diff --git a/sys/netipx/spx_debug.c b/sys/netipx/spx_debug.c index 1654bc0..7f48261 100644 --- a/sys/netipx/spx_debug.c +++ b/sys/netipx/spx_debug.c @@ -69,6 +69,8 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/protosw.h> +#define TCPSTATES /* for logging */ + #include <netinet/in_systm.h> #include <netinet/tcp_fsm.h> diff --git a/sys/netipx/spx_debug.h b/sys/netipx/spx_debug.h index 24a76f4..24405bc 100644 --- a/sys/netipx/spx_debug.h +++ b/sys/netipx/spx_debug.h @@ -95,7 +95,6 @@ int spx_debx; #ifdef _KERNEL extern char *prurequests[]; extern char *sanames[]; -extern char *tcpstates[]; void spx_trace(short act, u_char ostate, struct spxpcb *sp, struct spx *si, int req); diff --git a/usr.bin/netstat/ipx.c b/usr.bin/netstat/ipx.c index dad5ae8..893dc75 100644 --- a/usr.bin/netstat/ipx.c +++ b/usr.bin/netstat/ipx.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include <net/route.h> +#define TCPSTATES #include <netinet/tcp_fsm.h> #include <netipx/ipx.h> @@ -72,8 +73,6 @@ __FBSDID("$FreeBSD$"); static char *ipx_prpr (struct ipx_addr *); -extern char *tcpstates[]; - /* * Print a summary of connections related to a Network Systems * protocol. For SPX, also give state of connection. |