net/bridge/br_private.h
Source file repositories/reference/linux-study-clean/net/bridge/br_private.h
File Facts
- System
- Linux kernel
- Corpus path
net/bridge/br_private.h- Extension
.h- Size
- 68986 bytes
- Lines
- 2368
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/netdevice.hlinux/if_bridge.hlinux/netpoll.hlinux/u64_stats_sync.hnet/route.hnet/ip6_fib.hnet/pkt_cls.hlinux/if_vlan.hlinux/rhashtable.hlinux/refcount.h
Detected Declarations
struct bridge_idstruct mac_addrstruct bridge_mcast_own_querystruct bridge_mcast_other_querystruct bridge_mcast_querierstruct bridge_mcast_statsstruct br_mdb_src_entrystruct br_mdb_configstruct net_bridge_mcast_portstruct net_bridge_mcaststruct br_tunnel_infostruct net_bridge_vlanstruct net_bridge_vlan_groupstruct net_bridge_fdb_keystruct net_bridge_fdb_entrystruct net_bridge_fdb_flush_descstruct net_bridge_mcast_gcstruct net_bridge_group_srcstruct net_bridge_port_group_sg_keystruct net_bridge_port_groupstruct net_bridge_mdb_entrystruct net_bridge_portstruct net_bridgestruct br_input_skb_cbstruct br_frame_typestruct nf_br_opsstruct stp_protoenum net_bridge_optsenum br_pkt_typefunction br_is_root_bridgefunction br_vlan_is_masterfunction br_vlan_is_brentryfunction br_vlan_should_usefunction nbp_state_should_learnfunction br_vlan_valid_idfunction br_vlan_valid_rangefunction br_vlan_multicast_routerfunction br_afspec_cmd_to_rtmfunction br_opt_getfunction br_tc_skb_miss_setfunction br_tc_skb_miss_setfunction br_netpoll_send_skbfunction br_netpoll_send_skbfunction br_netpoll_disablefunction br_skb_isolatedfunction br_rx_handler_check_rcufunction br_rx_handler_check_rtnlfunction br_port_get_check_rtnl
Annotated Snippet
struct bridge_id {
unsigned char prio[2];
unsigned char addr[ETH_ALEN];
};
struct mac_addr {
unsigned char addr[ETH_ALEN];
};
#ifdef CONFIG_BRIDGE_IGMP_SNOOPING
/* our own querier */
struct bridge_mcast_own_query {
struct timer_list timer;
u32 startup_sent;
};
/* other querier */
struct bridge_mcast_other_query {
struct timer_list timer;
struct timer_list delay_timer;
};
/* selected querier */
struct bridge_mcast_querier {
struct br_ip addr;
int port_ifidx;
seqcount_spinlock_t seq;
};
/* IGMP/MLD statistics */
struct bridge_mcast_stats {
struct br_mcast_stats mstats;
struct u64_stats_sync syncp;
};
struct br_mdb_src_entry {
struct br_ip addr;
};
struct br_mdb_config {
struct net_bridge *br;
struct net_bridge_port *p;
struct br_mdb_entry *entry;
struct br_ip group;
bool src_entry;
u8 filter_mode;
u16 nlflags;
struct br_mdb_src_entry *src_entries;
int num_src_entries;
u8 rt_protocol;
};
#endif
/* net_bridge_mcast_port must be always defined due to forwarding stubs */
struct net_bridge_mcast_port {
#ifdef CONFIG_BRIDGE_IGMP_SNOOPING
struct net_bridge_port *port;
struct net_bridge_vlan *vlan;
struct bridge_mcast_own_query ip4_own_query;
struct timer_list ip4_mc_router_timer;
struct hlist_node ip4_rlist;
#if IS_ENABLED(CONFIG_IPV6)
struct bridge_mcast_own_query ip6_own_query;
struct timer_list ip6_mc_router_timer;
struct hlist_node ip6_rlist;
#endif /* IS_ENABLED(CONFIG_IPV6) */
unsigned char multicast_router;
u32 mdb_n_entries;
u32 mdb_max_entries;
#endif /* CONFIG_BRIDGE_IGMP_SNOOPING */
};
/* net_bridge_mcast must be always defined due to forwarding stubs */
struct net_bridge_mcast {
#ifdef CONFIG_BRIDGE_IGMP_SNOOPING
struct net_bridge *br;
struct net_bridge_vlan *vlan;
u32 multicast_last_member_count;
u32 multicast_startup_query_count;
u8 multicast_querier;
u8 multicast_igmp_version;
u8 multicast_router;
#if IS_ENABLED(CONFIG_IPV6)
u8 multicast_mld_version;
#endif
unsigned long multicast_last_member_interval;
unsigned long multicast_membership_interval;
Annotation
- Immediate include surface: `linux/netdevice.h`, `linux/if_bridge.h`, `linux/netpoll.h`, `linux/u64_stats_sync.h`, `net/route.h`, `net/ip6_fib.h`, `net/pkt_cls.h`, `linux/if_vlan.h`.
- Detected declarations: `struct bridge_id`, `struct mac_addr`, `struct bridge_mcast_own_query`, `struct bridge_mcast_other_query`, `struct bridge_mcast_querier`, `struct bridge_mcast_stats`, `struct br_mdb_src_entry`, `struct br_mdb_config`, `struct net_bridge_mcast_port`, `struct net_bridge_mcast`.
- 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.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.