summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2014-01-17 10:48:44 +0000
committeravg <avg@FreeBSD.org>2014-01-17 10:48:44 +0000
commitc2040a08a94d89c7d0fc7c42c2cefcfb4d2cd271 (patch)
tree0d470654cd7781ad9904b945c976861042d58423 /sys/netinet
parentf481239dd362d8dea2669b455d995cf73afef620 (diff)
downloadFreeBSD-src-c2040a08a94d89c7d0fc7c42c2cefcfb4d2cd271.zip
FreeBSD-src-c2040a08a94d89c7d0fc7c42c2cefcfb4d2cd271.tar.gz
MFC r258605: Convert over the TCP probes to use mtod()
MFC slacker: adrian
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_input.c16
-rw-r--r--sys/netinet/tcp_subr.c5
2 files changed, 11 insertions, 10 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 36a665a..9c54412 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1393,7 +1393,7 @@ relocked:
}
#endif
- TCP_PROBE5(receive, NULL, tp, m->m_data, tp, th);
+ TCP_PROBE5(receive, NULL, tp, mtod(m, const char *), tp, th);
/*
* Segment belongs to a connection in SYN_SENT, ESTABLISHED or later
@@ -1405,7 +1405,7 @@ relocked:
return;
dropwithreset:
- TCP_PROBE5(receive, NULL, tp, m->m_data, tp, th);
+ TCP_PROBE5(receive, NULL, tp, mtod(m, const char *), tp, th);
if (ti_locked == TI_WLOCKED) {
INP_INFO_WUNLOCK(&V_tcbinfo);
@@ -1429,7 +1429,7 @@ dropwithreset:
dropunlock:
if (m != NULL)
- TCP_PROBE5(receive, NULL, tp, m->m_data, tp, th);
+ TCP_PROBE5(receive, NULL, tp, mtod(m, const char *), tp, th);
if (ti_locked == TI_WLOCKED) {
INP_INFO_WUNLOCK(&V_tcbinfo);
@@ -1928,8 +1928,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
goto dropwithreset;
}
if ((thflags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) {
- TCP_PROBE5(connect_refused, NULL, tp, m->m_data, tp,
- th);
+ TCP_PROBE5(connect_refused, NULL, tp,
+ mtod(m, const char *), tp, th);
tp = tcp_drop(tp, ECONNREFUSED);
}
if (thflags & TH_RST)
@@ -1982,7 +1982,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
} else {
tcp_state_change(tp, TCPS_ESTABLISHED);
TCP_PROBE5(connect_established, NULL, tp,
- m->m_data, tp, th);
+ mtod(m, const char *), tp, th);
cc_conn_init(tp);
tcp_timer_activate(tp, TT_KEEP,
TP_KEEPIDLE(tp));
@@ -2387,8 +2387,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
tp->t_flags &= ~TF_NEEDFIN;
} else {
tcp_state_change(tp, TCPS_ESTABLISHED);
- TCP_PROBE5(accept_established, NULL, tp, m->m_data, tp,
- th);
+ TCP_PROBE5(accept_established, NULL, tp,
+ mtod(m, const char *), tp, th);
cc_conn_init(tp);
tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp));
}
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 5d37b50..8aaf04b 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -706,9 +706,10 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m,
tcp_trace(TA_OUTPUT, 0, tp, mtod(m, void *), th, 0);
#endif
if (flags & TH_RST)
- TCP_PROBE5(accept_refused, NULL, NULL, m->m_data, tp, nth);
+ TCP_PROBE5(accept_refused, NULL, NULL, mtod(m, const char *),
+ tp, nth);
- TCP_PROBE5(send, NULL, tp, m->m_data, tp, nth);
+ TCP_PROBE5(send, NULL, tp, mtod(m, const char *), tp, nth);
#ifdef INET6
if (isipv6)
(void) ip6_output(m, NULL, NULL, ipflags, NULL, NULL, inp);
OpenPOWER on IntegriCloud