Fix: endianness for the container type of enum
[lttng-modules.git] / instrumentation / events / lttng-module / net.h
CommitLineData
b283666f
PW
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM net
3
3bc29f0a
MD
4#if !defined(LTTNG_TRACE_NET_H) || defined(TRACE_HEADER_MULTI_READ)
5#define LTTNG_TRACE_NET_H
b283666f 6
6ec43db8 7#include <probes/lttng-tracepoint-event.h>
b283666f
PW
8#include <linux/skbuff.h>
9#include <linux/netdevice.h>
10#include <linux/ip.h>
4a7363f7 11#include <linux/version.h>
b283666f 12
3bc29f0a 13LTTNG_TRACEPOINT_EVENT(net_dev_xmit,
b283666f 14
f95480cf 15#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
b283666f
PW
16 TP_PROTO(struct sk_buff *skb,
17 int rc,
18 struct net_device *dev,
19 unsigned int skb_len),
20
21 TP_ARGS(skb, rc, dev, skb_len),
4a7363f7
PW
22#else
23 TP_PROTO(struct sk_buff *skb,
24 int rc),
25
26 TP_ARGS(skb, rc),
27#endif
b283666f 28
f127e61e 29 TP_FIELDS(
fa91fcac 30 ctf_integer_hex(void *, skbaddr, skb)
f127e61e 31 ctf_integer(int, rc, rc)
f95480cf 32#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
974c0969 33 ctf_integer(unsigned int, len, skb_len)
f127e61e 34 ctf_string(name, dev->name)
4a7363f7 35#else
974c0969 36 ctf_integer(unsigned int, len, skb->len)
f127e61e 37 ctf_string(name, skb->dev->name)
4a7363f7 38#endif
f127e61e 39 )
b283666f
PW
40)
41
3bc29f0a 42LTTNG_TRACEPOINT_EVENT_CLASS(net_dev_template,
b283666f
PW
43
44 TP_PROTO(struct sk_buff *skb),
45
46 TP_ARGS(skb),
47
f127e61e 48 TP_FIELDS(
fa91fcac 49 ctf_integer_hex(void *, skbaddr, skb)
f127e61e
MD
50 ctf_integer(unsigned int, len, skb->len)
51 ctf_string(name, skb->dev->name)
52 )
b283666f
PW
53)
54
3bc29f0a 55LTTNG_TRACEPOINT_EVENT_INSTANCE(net_dev_template, net_dev_queue,
b283666f
PW
56
57 TP_PROTO(struct sk_buff *skb),
58
59 TP_ARGS(skb)
60)
61
b7f5408a
MD
62LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(net_dev_template,
63
64 netif_receive_skb,
65
66 net_if_receive_skb,
b283666f
PW
67
68 TP_PROTO(struct sk_buff *skb),
69
70 TP_ARGS(skb)
71)
72
b7f5408a
MD
73LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(net_dev_template,
74
75 netif_rx,
76
77 net_if_rx,
b283666f
PW
78
79 TP_PROTO(struct sk_buff *skb),
80
81 TP_ARGS(skb)
82)
3bc29f0a 83#endif /* LTTNG_TRACE_NET_H */
b283666f
PW
84
85/* This part must be outside protection */
6ec43db8 86#include <probes/define_trace.h>
This page took 0.031331 seconds and 4 git commands to generate.