net_dev_xmit_extended probe : cleanup unused data v0.19.6
authorJulien Desfossez <julien.desfossez@polymtl.ca>
Fri, 4 Feb 2011 16:08:38 +0000 (11:08 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 4 Feb 2011 16:08:38 +0000 (11:08 -0500)
Intialise the unused fields of the data structure and add support for
ports in UDP packets.

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
probes/net-extended-trace.c

index 15fc8109dba704f92c33264a6e41a62eb30111e3..d7bb4f80286aea3e0a8636e4daf38a6b6b38ad85 100644 (file)
@@ -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;
                }
        }
 
This page took 0.026777 seconds and 4 git commands to generate.