diff options
author | markj <markj@FreeBSD.org> | 2013-08-25 21:54:41 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2013-08-25 21:54:41 +0000 |
commit | 29e4661920638221bbffb4c527fb24daa4702b4c (patch) | |
tree | c2b1016fdbcd18b8a7c9f33a21b6c2bb2b755348 /sys/netinet/ip_input.c | |
parent | 03a89a5fe0a80e1df50027d7d94266daffa41805 (diff) | |
download | FreeBSD-src-29e4661920638221bbffb4c527fb24daa4702b4c.zip FreeBSD-src-29e4661920638221bbffb4c527fb24daa4702b4c.tar.gz |
Implement the ip, tcp, and udp DTrace providers. The probe definitions use
dynamic translation so that their arguments match the definitions for
these providers in Solaris and illumos. Thus, existing scripts for these
providers should work unmodified on FreeBSD.
Tested by: gnn, hiren
MFC after: 1 month
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index ca55c5e..707d2be 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ipfw.h" #include "opt_ipstealth.h" #include "opt_ipsec.h" +#include "opt_kdtrace.h" #include "opt_route.h" #include <sys/param.h> @@ -49,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/lock.h> #include <sys/rwlock.h> +#include <sys/sdt.h> #include <sys/syslog.h> #include <sys/sysctl.h> @@ -63,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include <net/flowtable.h> #include <netinet/in.h> +#include <netinet/in_kdtrace.h> #include <netinet/in_systm.h> #include <netinet/in_var.h> #include <netinet/ip.h> @@ -429,6 +432,8 @@ ip_input(struct mbuf *m) ip = mtod(m, struct ip *); } + IP_PROBE(receive, NULL, NULL, ip, m->m_pkthdr.rcvif, ip, NULL); + /* 127/8 must not appear on wire - RFC1122 */ ifp = m->m_pkthdr.rcvif; if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || |