summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2011-03-16 19:05:27 -0400
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2011-03-16 19:05:27 -0400
commitb41f14d1b68f18428150596d8a3095b3e015f034 (patch)
treeacd34e56d742ac706f9fee768d308cbcae37222b /net
parent6a0cf272da72e957a4ebb39df37f8fb14661945e (diff)
lttng-instrumentation-net-trace-incoming-udp-traffic
LTTng instrumentation net: trace incoming UDP traffic Add a tracepoint to determine if a received packet contains a UDP datagram. Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/udp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 8157b17959e..21f5aac48d3 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -105,6 +105,7 @@
#include <net/route.h>
#include <net/checksum.h>
#include <net/xfrm.h>
+#include <trace/net.h>
#include "udp_impl.h"
struct udp_table udp_table __read_mostly;
@@ -125,6 +126,8 @@ EXPORT_SYMBOL(udp_memory_allocated);
#define MAX_UDP_PORTS 65536
#define PORTS_PER_CHAIN (MAX_UDP_PORTS / UDP_HTABLE_SIZE_MIN)
+DEFINE_TRACE(net_udpv4_rcv);
+
static int udp_lib_lport_inuse(struct net *net, __u16 num,
const struct udp_hslot *hslot,
unsigned long *bitmap,
@@ -1596,6 +1599,8 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
if (udp4_csum_init(skb, uh, proto))
goto csum_error;
+ trace_net_udpv4_rcv(skb);
+
if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST))
return __udp4_lib_mcast_deliver(net, skb, uh,
saddr, daddr, udptable);