STRUCT MESH_PATH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct mesh_path(9) πŸ’–

okay bestie, welcome to the Kernel API Manual entry for struct mesh_path(9) β€” the mac80211 mesh path structure. this is the whole vibe: one struct tracking a mesh path, with all its fields, flags, timers, locks, and lil bookkeeping details. no cap, we are keeping every single one. 🫢


🌸 NAME 🌸

struct mesh_path β€” the mac80211 mesh path structure. it’s giving β€œone struct to track a destination through the mesh” energy. πŸ’…


✨ SYNOPSIS ✨

here’s the struct, exactly, no edits, no β€œfixing” the names, just the whole thing:

struct mesh_path {
    u8 dst[ETH_ALEN];
    u8 mpp[ETH_ALEN];
    struct rhash_head rhash;
    struct hlist_node walk_list;
    struct hlist_node gate_list;
    struct ieee80211_sub_if_data *sdata;
    struct sta_info *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;
};

🫢 Members 🫢

okay so every field gets its moment. main character energy for each one:

  • dst β€” mesh path destination mac address.
  • mpp β€” mesh proxy mac address.
  • rhash β€” rhashtable list pointer.
  • walk_list β€” linked list containing all mesh_path objects.
  • gate_list β€” list pointer for known gates list.
  • sdata β€” mesh subif.
  • next_hop β€” mesh neighbor to which frames for this destination will be forwarded.
  • timer β€” mesh path discovery timer.
  • frame_queue β€” pending queue for frames sent to this destination while the path is unresolved.
  • rcu β€” rcu head for freeing mesh path.
  • sn β€” target sequence number.
  • metric β€” current metric to this destination.
  • hop_count β€” hops to destination.
  • exp_time β€” in jiffies, when the path will expire or when it expired.
  • discovery_timeout β€” timeout (lapse in jiffies) used for the last discovery retry.
  • discovery_retries β€” number of discovery retries.
  • flags β€” mesh path flags, as specified on enum mesh_path_flags.
  • state_lock β€” mesh path state lock used to protect changes to the mpath itself. No need to take this lock when adding or removing an mpath to a hash bucket on a path table.
  • rann_snd_addr β€” the RANN sender address.
  • rann_metric β€” the aggregated path metric towards the root node.
  • last_preq_to_root β€” Timestamp of last PREQ sent to root.
  • fast_tx_check β€” timestamp of last fast-xmit enable attempt.
  • is_root β€” the destination station of this path is a root node.
  • is_gate β€” the destination station of this path is a mesh gate.
  • path_change_count β€” the number of path changes to destination.

πŸ’… Description πŸ’…

The dst address is unique in the mesh path table. Since the mesh_path is protected by RCU, deleting the next_hop STA must remove / substitute the mesh_path structure and wait until that is no longer reachable before destroying the STA completely.

ngl that last bit is important: RCU is the vibe, and the next_hop STA cannot be fully destroyed until the mesh_path is no longer reachable. periodt. 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./net/mac80211/mesh.h
  • enum mesh_path_flags(9)
  • enum mesh_deferred_task_flags(9)
  • enum ieee80211_mesh_fast_tx_type(9)
  • struct ieee80211_mesh_fast_tx_key(9)
  • struct ieee80211_mesh_fast_tx(9)
  • struct rmc_entry(9)

and that’s the page, bestie β€” catch u later. this one came from the ./net/mac80211 source/version, October 2026 edition, and yes that’s the footer energy πŸ’–βœ¨

πŸ“¦ where this page comes from