Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [ltt-dev] [PATCH] net_dev_xmit_extended probe : cleanup unused data
@ 2011-02-02 15:59 Julien Desfossez
  2011-02-04 16:09 ` Mathieu Desnoyers
  0 siblings, 1 reply; 2+ messages in thread
From: Julien Desfossez @ 2011-02-02 15:59 UTC (permalink / raw)


Intialise the unused fields of the data structure and add support for
ports in UDP packets.

Signed-off-by: Julien Desfossez <julien.desfossez at polymtl.ca>
---
 probes/net-extended-trace.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/probes/net-extended-trace.c b/probes/net-extended-trace.c
index 15fc810..d7bb4f8 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;
 		}
 	}
 
-- 
1.7.0.4





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-04 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-02 15:59 [ltt-dev] [PATCH] net_dev_xmit_extended probe : cleanup unused data Julien Desfossez
2011-02-04 16:09 ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox