From: Julien Desfossez Date: Fri, 4 Feb 2011 16:08:38 +0000 (-0500) Subject: net_dev_xmit_extended probe : cleanup unused data X-Git-Tag: v0.19.6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8fad657cf85299e39ab377b9df4bfb2df5f685a3;p=lttng-modules.git net_dev_xmit_extended probe : cleanup unused data Intialise the unused fields of the data structure and add support for ports in UDP packets. Signed-off-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- diff --git a/probes/net-extended-trace.c b/probes/net-extended-trace.c index 15fc8109..d7bb4f80 100644 --- a/probes/net-extended-trace.c +++ b/probes/net-extended-trace.c @@ -42,6 +42,9 @@ notrace void probe_net_dev_xmit_extended(void *_data, struct sk_buff *skb) struct serialize_l214421224411111 data; struct iphdr *iph = ip_hdr(skb); struct tcphdr *th = tcp_hdr(skb); + struct udphdr *uh = udp_hdr(skb); + + memset(&data, 0, sizeof(struct serialize_l214421224411111)); data.f1 = (unsigned long)skb; data.f2 = skb->protocol; @@ -63,6 +66,9 @@ notrace void probe_net_dev_xmit_extended(void *_data, struct sk_buff *skb) data.f14 = th->rst; data.f15 = th->syn; data.f16 = th->fin; + } else if (data.f3 == IPPROTO_UDP) { + data.f8 = uh->source; + data.f9 = uh->dest; } }