Cleanup: move to kernel style SPDX license identifiers
[lttng-modules.git] / instrumentation / events / lttng-module / skb.h
CommitLineData
9f36eaed 1/* SPDX-License-Identifier: GPL-2.0 */
b283666f
PW
2#undef TRACE_SYSTEM
3#define TRACE_SYSTEM skb
4
3bc29f0a
MD
5#if !defined(LTTNG_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ)
6#define LTTNG_TRACE_SKB_H
b283666f 7
6ec43db8 8#include <probes/lttng-tracepoint-event.h>
b283666f
PW
9#include <linux/skbuff.h>
10#include <linux/netdevice.h>
7c68b363 11#include <linux/version.h>
b283666f
PW
12
13/*
14 * Tracepoint for free an sk_buff:
15 */
3bc29f0a 16LTTNG_TRACEPOINT_EVENT_MAP(kfree_skb,
9cf29d3e
MD
17
18 skb_kfree,
b283666f
PW
19
20 TP_PROTO(struct sk_buff *skb, void *location),
21
22 TP_ARGS(skb, location),
23
f127e61e 24 TP_FIELDS(
fa91fcac
MD
25 ctf_integer_hex(void *, skbaddr, skb)
26 ctf_integer_hex(void *, location, location)
f127e61e
MD
27 ctf_integer_network(unsigned short, protocol, skb->protocol)
28 )
b283666f
PW
29)
30
7c68b363 31#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
3bc29f0a 32LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
9cf29d3e
MD
33
34 skb_consume,
b283666f
PW
35
36 TP_PROTO(struct sk_buff *skb),
37
38 TP_ARGS(skb),
39
f127e61e 40 TP_FIELDS(
fa91fcac 41 ctf_integer_hex(void *, skbaddr, skb)
f127e61e 42 )
b283666f 43)
7c68b363 44#endif
b283666f 45
7c68b363 46#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
3bc29f0a 47LTTNG_TRACEPOINT_EVENT(skb_copy_datagram_iovec,
b283666f
PW
48
49 TP_PROTO(const struct sk_buff *skb, int len),
50
51 TP_ARGS(skb, len),
52
f127e61e 53 TP_FIELDS(
fa91fcac 54 ctf_integer_hex(const void *, skbaddr, skb)
f127e61e
MD
55 ctf_integer(int, len, len)
56 )
b283666f 57)
7c68b363 58#endif
b283666f 59
3bc29f0a 60#endif /* LTTNG_TRACE_SKB_H */
b283666f
PW
61
62/* This part must be outside protection */
6ec43db8 63#include <probes/define_trace.h>
This page took 0.033337 seconds and 4 git commands to generate.