net/core/skb_fault_injection.c

Source file repositories/reference/linux-study-clean/net/core/skb_fault_injection.c

File Facts

System
Linux kernel
Corpus path
net/core/skb_fault_injection.c
Extension
.c
Size
2366 bytes
Lines
107
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 devname_ops = {
	.write = devname_write,
	.read = devname_read,
};

static int __init fail_skb_realloc_debugfs(void)
{
	umode_t mode = S_IFREG | 0600;
	struct dentry *dir;

	dir = fault_create_debugfs_attr("fail_skb_realloc", NULL,
					&skb_realloc.attr);
	if (IS_ERR(dir))
		return PTR_ERR(dir);

	debugfs_create_file("devname", mode, dir, NULL, &devname_ops);

	return 0;
}

late_initcall(fail_skb_realloc_debugfs);

Annotation

Implementation Notes