#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/tracepoint.h>
+#include <linux/version.h>
/*
* Tracepoint for free an sk_buff:
*/
-TRACE_EVENT(kfree_skb,
+TRACE_EVENT_MAP(kfree_skb,
+
+ skb_kfree,
TP_PROTO(struct sk_buff *skb, void *location),
__entry->skbaddr, __entry->protocol, __entry->location)
)
-TRACE_EVENT(consume_skb,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+TRACE_EVENT_MAP(consume_skb,
+
+ skb_consume,
TP_PROTO(struct sk_buff *skb),
TP_printk("skbaddr=%p", __entry->skbaddr)
)
+#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
TRACE_EVENT(skb_copy_datagram_iovec,
TP_PROTO(const struct sk_buff *skb, int len),
TP_printk("skbaddr=%p len=%d", __entry->skbaddr, __entry->len)
)
+#endif
#endif /* _TRACE_SKB_H */