net/mac80211/mesh.h
Source file repositories/reference/linux-study-clean/net/mac80211/mesh.h
File Facts
- System
- Linux kernel
- Corpus path
net/mac80211/mesh.h- Extension
.h- Size
- 15565 bytes
- Lines
- 430
- 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/types.hlinux/jhash.hieee80211_i.h
Detected Declarations
struct mesh_pathstruct ieee80211_mesh_fast_tx_keystruct ieee80211_mesh_fast_txstruct rmc_entrystruct mesh_rmcenum mesh_path_flagsenum mesh_deferred_task_flagsenum ieee80211_mesh_fast_tx_typefunction mesh_plink_inc_estab_countfunction mesh_plink_dec_estab_countfunction mesh_plink_free_countfunction mesh_plink_availablesfunction mesh_path_activatefunction mesh_path_sel_is_hwmpfunction mesh_path_sel_is_hwmpfunction mesh_path_flush_by_iface
Annotated Snippet
struct mesh_path {
u8 dst[ETH_ALEN];
u8 mpp[ETH_ALEN]; /* used for MPP or MAP */
struct rhash_head rhash;
struct hlist_node walk_list;
struct hlist_node gate_list;
struct ieee80211_sub_if_data *sdata;
struct sta_info __rcu *next_hop;
struct timer_list timer;
struct sk_buff_head frame_queue;
struct rcu_head rcu;
u32 sn;
u32 metric;
u8 hop_count;
unsigned long exp_time;
u32 discovery_timeout;
u8 discovery_retries;
enum mesh_path_flags flags;
spinlock_t state_lock;
u8 rann_snd_addr[ETH_ALEN];
u32 rann_metric;
unsigned long last_preq_to_root;
unsigned long fast_tx_check;
bool is_root;
bool is_gate;
u32 path_change_count;
};
#define MESH_FAST_TX_CACHE_MAX_SIZE 512
#define MESH_FAST_TX_CACHE_THRESHOLD_SIZE 384
#define MESH_FAST_TX_CACHE_TIMEOUT 8000 /* msecs */
/**
* enum ieee80211_mesh_fast_tx_type - cached mesh fast tx entry type
*
* @MESH_FAST_TX_TYPE_LOCAL: tx from the local vif address as SA
* @MESH_FAST_TX_TYPE_PROXIED: local tx with a different SA (e.g. bridged)
* @MESH_FAST_TX_TYPE_FORWARDED: forwarded from a different mesh point
* @NUM_MESH_FAST_TX_TYPE: number of entry types
*/
enum ieee80211_mesh_fast_tx_type {
MESH_FAST_TX_TYPE_LOCAL,
MESH_FAST_TX_TYPE_PROXIED,
MESH_FAST_TX_TYPE_FORWARDED,
/* must be last */
NUM_MESH_FAST_TX_TYPE
};
/**
* struct ieee80211_mesh_fast_tx_key - cached mesh fast tx entry key
*
* @addr: The Ethernet DA for this entry
* @type: cache entry type
*/
struct ieee80211_mesh_fast_tx_key {
u8 addr[ETH_ALEN] __aligned(2);
u16 type;
};
/**
* struct ieee80211_mesh_fast_tx - cached mesh fast tx entry
* @rhash: rhashtable pointer
* @key: the lookup key for this cache entry
* @fast_tx: base fast_tx data
* @hdr: cached mesh and rfc1042 headers
* @hdrlen: length of mesh + rfc1042
* @walk_list: list containing all the fast tx entries
* @mpath: mesh path corresponding to the Mesh DA
* @mppath: MPP entry corresponding to this DA
* @timestamp: Last used time of this entry
*/
struct ieee80211_mesh_fast_tx {
struct rhash_head rhash;
struct ieee80211_mesh_fast_tx_key key;
struct ieee80211_fast_tx fast_tx;
u8 hdr[sizeof(struct ieee80211s_hdr) + sizeof(rfc1042_header)];
u16 hdrlen;
struct mesh_path *mpath, *mppath;
struct hlist_node walk_list;
unsigned long timestamp;
};
/* Recent multicast cache */
/* RMC_BUCKETS must be a power of 2, maximum 256 */
#define RMC_BUCKETS 256
#define RMC_QUEUE_MAX_LEN 4
Annotation
- Immediate include surface: `linux/types.h`, `linux/jhash.h`, `ieee80211_i.h`.
- Detected declarations: `struct mesh_path`, `struct ieee80211_mesh_fast_tx_key`, `struct ieee80211_mesh_fast_tx`, `struct rmc_entry`, `struct mesh_rmc`, `enum mesh_path_flags`, `enum mesh_deferred_task_flags`, `enum ieee80211_mesh_fast_tx_type`, `function mesh_plink_inc_estab_count`, `function mesh_plink_dec_estab_count`.
- 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.