net/bridge/netfilter/ebtables.c
Source file repositories/reference/linux-study-clean/net/bridge/netfilter/ebtables.c
File Facts
- System
- Linux kernel
- Corpus path
net/bridge/netfilter/ebtables.c- Extension
.c- Size
- 67750 bytes
- Lines
- 2654
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kmod.hlinux/module.hlinux/vmalloc.hlinux/netfilter/x_tables.hlinux/netfilter_bridge/ebtables.hlinux/spinlock.hlinux/mutex.hlinux/slab.hlinux/uaccess.hlinux/smp.hlinux/cpumask.hlinux/audit.hnet/sock.hnet/netns/generic.h../br_private.h
Detected Declarations
struct ebt_pernetstruct ebt_templatestruct ebt_cl_stackstruct compat_ebt_replacestruct compat_ebt_entry_mwtstruct ebt_entries_buf_stateenum compat_mwtfunction ebt_standard_compat_from_userfunction ebt_standard_compat_to_userfunction ebt_do_watcherfunction ebt_do_matchfunction ebt_dev_checkfunction ebt_basic_matchfunction ebt_get_target_cfunction ebt_do_tablefunction find_inlist_lock_noloadfunction list_for_each_entryfunction list_for_each_entryfunction find_inlist_lockfunction find_table_lockfunction ebt_free_table_infofunction ebt_check_matchfunction ebt_check_watcherfunction ebt_verify_pointersfunction ebt_check_entry_size_and_hooksfunction ebt_get_udc_positionsfunction ebt_cleanup_matchfunction ebt_cleanup_watcherfunction ebt_cleanup_entryfunction ebt_check_entryfunction check_chainloopsfunction translate_tablefunction for_each_possible_cpufunction get_countersfunction do_replace_finishfunction copy_to_userfunction do_replacefunction __ebt_unregister_tablefunction ebt_register_tablefunction ebt_register_templatefunction ebt_unregister_templatefunction ebt_unregister_table_pre_exitfunction list_for_each_entryfunction ebt_unregister_tablefunction list_for_each_entryfunction do_update_countersfunction update_countersfunction ebt_obj_to_user
Annotated Snippet
module_init(ebtables_init);
module_exit(ebtables_fini);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("ebtables legacy core");
Annotation
- Immediate include surface: `linux/kmod.h`, `linux/module.h`, `linux/vmalloc.h`, `linux/netfilter/x_tables.h`, `linux/netfilter_bridge/ebtables.h`, `linux/spinlock.h`, `linux/mutex.h`, `linux/slab.h`.
- Detected declarations: `struct ebt_pernet`, `struct ebt_template`, `struct ebt_cl_stack`, `struct compat_ebt_replace`, `struct compat_ebt_entry_mwt`, `struct ebt_entries_buf_state`, `enum compat_mwt`, `function ebt_standard_compat_from_user`, `function ebt_standard_compat_to_user`, `function ebt_do_watcher`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.