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.

Dependency Surface

Detected Declarations

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

Implementation Notes