net/bridge/br_stp_bpdu.c
Source file repositories/reference/linux-study-clean/net/bridge/br_stp_bpdu.c
File Facts
- System
- Linux kernel
- Corpus path
net/bridge/br_stp_bpdu.c- Extension
.c- Size
- 5771 bytes
- Lines
- 248
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/netfilter_bridge.hlinux/etherdevice.hlinux/llc.hlinux/slab.hlinux/pkt_sched.hnet/net_namespace.hnet/llc.hnet/llc_pdu.hnet/stp.hlinux/unaligned.hbr_private.hbr_private_stp.h
Detected Declarations
function br_send_bpdu_finishfunction br_send_bpdufunction br_set_ticksfunction br_get_ticksfunction br_send_config_bpdufunction br_send_tcn_bpdufunction br_stp_rcv
Annotated Snippet
if (bpdu.message_age > bpdu.max_age) {
if (net_ratelimit())
br_notice(p->br,
"port %u config from %pM"
" (message_age %ul > max_age %ul)\n",
p->port_no,
eth_hdr(skb)->h_source,
bpdu.message_age, bpdu.max_age);
goto out;
}
br_received_config_bpdu(p, &bpdu);
} else if (buf[0] == BPDU_TYPE_TCN) {
br_received_tcn_bpdu(p);
}
out:
spin_unlock(&br->lock);
err:
kfree_skb(skb);
}
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/netfilter_bridge.h`, `linux/etherdevice.h`, `linux/llc.h`, `linux/slab.h`, `linux/pkt_sched.h`, `net/net_namespace.h`, `net/llc.h`.
- Detected declarations: `function br_send_bpdu_finish`, `function br_send_bpdu`, `function br_set_ticks`, `function br_get_ticks`, `function br_send_config_bpdu`, `function br_send_tcn_bpdu`, `function br_stp_rcv`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
- 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.