net/l2tp/l2tp_debugfs.c

Source file repositories/reference/linux-study-clean/net/l2tp/l2tp_debugfs.c

File Facts

System
Linux kernel
Corpus path
net/l2tp/l2tp_debugfs.c
Extension
.c
Size
9155 bytes
Lines
348
Domain
Networking Core
Bucket
Sockets, Protocols, Packet Path, And Network Policy
Inferred role
Networking Core: operation-table or driver-model contract
Status
pattern implementation candidate

Why This File Exists

Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.

Dependency Surface

Detected Declarations

Annotated Snippet

static const struct file_operations l2tp_dfs_fops = {
	.owner		= THIS_MODULE,
	.open		= l2tp_dfs_seq_open,
	.read		= seq_read,
	.llseek		= seq_lseek,
	.release	= l2tp_dfs_seq_release,
};

static int __init l2tp_debugfs_init(void)
{
	rootdir = debugfs_create_dir("l2tp", NULL);

	debugfs_create_file("tunnels", 0600, rootdir, NULL, &l2tp_dfs_fops);

	pr_info("L2TP debugfs support\n");

	return 0;
}

static void __exit l2tp_debugfs_exit(void)
{
	debugfs_remove_recursive(rootdir);
}

module_init(l2tp_debugfs_init);
module_exit(l2tp_debugfs_exit);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("James Chapman <jchapman@katalix.com>");
MODULE_DESCRIPTION("L2TP debugfs driver");
MODULE_VERSION("1.0");

Annotation

Implementation Notes