net/l2tp/trace.h
Source file repositories/reference/linux-study-clean/net/l2tp/trace.h
File Facts
- System
- Linux kernel
- Corpus path
net/l2tp/trace.h- Extension
.h- Size
- 5395 bytes
- Lines
- 212
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/tracepoint.hlinux/l2tp.hl2tp_core.htrace/define_trace.h
Detected Declarations
function encap_type_name
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM l2tp
#if !defined(_TRACE_L2TP_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_L2TP_H
#include <linux/tracepoint.h>
#include <linux/l2tp.h>
#include "l2tp_core.h"
#define encap_type_name(e) { L2TP_ENCAPTYPE_##e, #e }
#define show_encap_type_name(val) \
__print_symbolic(val, \
encap_type_name(UDP), \
encap_type_name(IP))
#define pw_type_name(p) { L2TP_PWTYPE_##p, #p }
#define show_pw_type_name(val) \
__print_symbolic(val, \
pw_type_name(ETH_VLAN), \
pw_type_name(ETH), \
pw_type_name(PPP), \
pw_type_name(PPP_AC), \
pw_type_name(IP))
DECLARE_EVENT_CLASS(tunnel_only_evt,
TP_PROTO(struct l2tp_tunnel *tunnel),
TP_ARGS(tunnel),
TP_STRUCT__entry(
__array(char, name, L2TP_TUNNEL_NAME_MAX)
),
TP_fast_assign(
memcpy(__entry->name, tunnel->name, L2TP_TUNNEL_NAME_MAX);
),
TP_printk("%s", __entry->name)
);
DECLARE_EVENT_CLASS(session_only_evt,
TP_PROTO(struct l2tp_session *session),
TP_ARGS(session),
TP_STRUCT__entry(
__array(char, name, L2TP_SESSION_NAME_MAX)
),
TP_fast_assign(
memcpy(__entry->name, session->name, L2TP_SESSION_NAME_MAX);
),
TP_printk("%s", __entry->name)
);
TRACE_EVENT(register_tunnel,
TP_PROTO(struct l2tp_tunnel *tunnel),
TP_ARGS(tunnel),
TP_STRUCT__entry(
__array(char, name, L2TP_TUNNEL_NAME_MAX)
__field(int, fd)
__field(u32, tid)
__field(u32, ptid)
__field(int, version)
__field(enum l2tp_encap_type, encap)
),
TP_fast_assign(
memcpy(__entry->name, tunnel->name, L2TP_TUNNEL_NAME_MAX);
__entry->fd = tunnel->fd;
__entry->tid = tunnel->tunnel_id;
__entry->ptid = tunnel->peer_tunnel_id;
__entry->version = tunnel->version;
__entry->encap = tunnel->encap;
),
TP_printk("%s: type=%s encap=%s version=L2TPv%d tid=%u ptid=%u fd=%d",
__entry->name,
__entry->fd > 0 ? "managed" : "unmanaged",
show_encap_type_name(__entry->encap),
__entry->version,
__entry->tid,
__entry->ptid,
__entry->fd)
);
DEFINE_EVENT(tunnel_only_evt, delete_tunnel,
TP_PROTO(struct l2tp_tunnel *tunnel),
TP_ARGS(tunnel)
);
DEFINE_EVENT(tunnel_only_evt, free_tunnel,
TP_PROTO(struct l2tp_tunnel *tunnel),
TP_ARGS(tunnel)
);
TRACE_EVENT(register_session,
TP_PROTO(struct l2tp_session *session),
Annotation
- Immediate include surface: `linux/tracepoint.h`, `linux/l2tp.h`, `l2tp_core.h`, `trace/define_trace.h`.
- Detected declarations: `function encap_type_name`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.