include/linux/if_bridge.h
Source file repositories/reference/linux-study-clean/include/linux/if_bridge.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/if_bridge.h- Extension
.h- Size
- 6595 bytes
- Lines
- 243
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/netdevice.huapi/linux/if_bridge.hlinux/bitops.h
Detected Declarations
struct br_ipstruct br_ip_liststruct net_bridgeenum bridge_flags_bitfunction br_multicast_list_adjacentfunction br_multicast_has_querier_anywherefunction br_multicast_has_querier_adjacentfunction br_multicast_has_router_adjacentfunction br_multicast_enabledfunction br_multicast_routerfunction br_vlan_enabledfunction br_vlan_get_pvidfunction br_vlan_get_protofunction br_vlan_get_pvid_rcufunction br_vlan_get_infofunction br_vlan_get_info_rcufunction br_mst_enabledfunction br_mst_get_infofunction br_mst_get_statefunction br_fdb_find_portfunction br_fdb_clear_offloadfunction br_port_get_stp_statefunction br_get_ageing_time
Annotated Snippet
struct br_ip {
union {
__be32 ip4;
#if IS_ENABLED(CONFIG_IPV6)
struct in6_addr ip6;
#endif
} src;
union {
__be32 ip4;
#if IS_ENABLED(CONFIG_IPV6)
struct in6_addr ip6;
#endif
unsigned char mac_addr[ETH_ALEN];
} dst;
__be16 proto;
__u16 vid;
};
struct br_ip_list {
struct list_head list;
struct br_ip addr;
};
enum bridge_flags_bit {
BR_HAIRPIN_MODE_BIT,
BR_BPDU_GUARD_BIT,
BR_ROOT_BLOCK_BIT,
BR_MULTICAST_FAST_LEAVE_BIT,
BR_ADMIN_COST_BIT,
BR_LEARNING_BIT,
BR_FLOOD_BIT,
BR_PROMISC_BIT,
BR_PROXYARP_BIT,
BR_LEARNING_SYNC_BIT,
BR_PROXYARP_WIFI_BIT,
BR_MCAST_FLOOD_BIT,
BR_MULTICAST_TO_UNICAST_BIT,
BR_VLAN_TUNNEL_BIT,
BR_BCAST_FLOOD_BIT,
BR_NEIGH_SUPPRESS_BIT,
BR_ISOLATED_BIT,
BR_MRP_AWARE_BIT,
BR_MRP_LOST_CONT_BIT,
BR_MRP_LOST_IN_CONT_BIT,
BR_TX_FWD_OFFLOAD_BIT,
BR_PORT_LOCKED_BIT,
BR_PORT_MAB_BIT,
BR_NEIGH_VLAN_SUPPRESS_BIT,
BR_NEIGH_FORWARD_GRAT_BIT,
};
#define BR_HAIRPIN_MODE BIT(BR_HAIRPIN_MODE_BIT)
#define BR_BPDU_GUARD BIT(BR_BPDU_GUARD_BIT)
#define BR_ROOT_BLOCK BIT(BR_ROOT_BLOCK_BIT)
#define BR_MULTICAST_FAST_LEAVE BIT(BR_MULTICAST_FAST_LEAVE_BIT)
#define BR_ADMIN_COST BIT(BR_ADMIN_COST_BIT)
#define BR_LEARNING BIT(BR_LEARNING_BIT)
#define BR_FLOOD BIT(BR_FLOOD_BIT)
#define BR_AUTO_MASK (BR_FLOOD | BR_LEARNING)
#define BR_PROMISC BIT(BR_PROMISC_BIT)
#define BR_PROXYARP BIT(BR_PROXYARP_BIT)
#define BR_LEARNING_SYNC BIT(BR_LEARNING_SYNC_BIT)
#define BR_PROXYARP_WIFI BIT(BR_PROXYARP_WIFI_BIT)
#define BR_MCAST_FLOOD BIT(BR_MCAST_FLOOD_BIT)
#define BR_MULTICAST_TO_UNICAST BIT(BR_MULTICAST_TO_UNICAST_BIT)
#define BR_VLAN_TUNNEL BIT(BR_VLAN_TUNNEL_BIT)
#define BR_BCAST_FLOOD BIT(BR_BCAST_FLOOD_BIT)
#define BR_NEIGH_SUPPRESS BIT(BR_NEIGH_SUPPRESS_BIT)
#define BR_ISOLATED BIT(BR_ISOLATED_BIT)
#define BR_MRP_AWARE BIT(BR_MRP_AWARE_BIT)
#define BR_MRP_LOST_CONT BIT(BR_MRP_LOST_CONT_BIT)
#define BR_MRP_LOST_IN_CONT BIT(BR_MRP_LOST_IN_CONT_BIT)
#define BR_TX_FWD_OFFLOAD BIT(BR_TX_FWD_OFFLOAD_BIT)
#define BR_PORT_LOCKED BIT(BR_PORT_LOCKED_BIT)
#define BR_PORT_MAB BIT(BR_PORT_MAB_BIT)
#define BR_NEIGH_VLAN_SUPPRESS BIT(BR_NEIGH_VLAN_SUPPRESS_BIT)
#define BR_NEIGH_FORWARD_GRAT BIT(BR_NEIGH_FORWARD_GRAT_BIT)
#define BR_DEFAULT_AGEING_TIME (300 * HZ)
struct net_bridge;
void brioctl_set(int (*hook)(struct net *net, unsigned int cmd,
void __user *uarg));
int br_ioctl_call(struct net *net, unsigned int cmd, void __user *uarg);
#if IS_ENABLED(CONFIG_BRIDGE) && IS_ENABLED(CONFIG_BRIDGE_IGMP_SNOOPING)
int br_multicast_list_adjacent(struct net_device *dev,
struct list_head *br_ip_list);
bool br_multicast_has_querier_anywhere(struct net_device *dev, int proto);
bool br_multicast_has_querier_adjacent(struct net_device *dev, int proto);
Annotation
- Immediate include surface: `linux/netdevice.h`, `uapi/linux/if_bridge.h`, `linux/bitops.h`.
- Detected declarations: `struct br_ip`, `struct br_ip_list`, `struct net_bridge`, `enum bridge_flags_bit`, `function br_multicast_list_adjacent`, `function br_multicast_has_querier_anywhere`, `function br_multicast_has_querier_adjacent`, `function br_multicast_has_router_adjacent`, `function br_multicast_enabled`, `function br_multicast_router`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
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.