NEIGHBOR AWARENESS NETWORKING (NAN)(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– Neighbor Awareness Networking (NAN)(9) πŸ’–

Kernel API Manual β€” yup bestie, we're deep in the kernel API docs and it's giving legendary networking lore. 🧚

NAN uses two interface types:

  • NL80211_IFTYPE_NAN β€” a non-netdev interface, and it has two roles: (1) it holds the configuration of all NAN activities (DE parameters, synchronisation parameters, local schedule, etc.), and (2) it's used as the NAN Management Interface (NMI), which is used for NAN management communication. πŸ’…
  • NL80211_IFTYPE_NAN_DATA β€” the NAN Data Interface (NDI), used for data communication with NAN peers. 🫢

An NDI interface can only be started (IFF_UP) if the NMI one is running and NAN is started. Before NAN is stopped, all associated NDI interfaces must be stopped first. 😭

The local schedule specifies which channels the device is available on and when.

🚨 Must be cancelled before NAN is stopped. That's not a vibe, that's a requirement.

πŸ¦‹ NAN Stations πŸ¦‹

There are two types of stations corresponding to the two interface types:

  • NMI station β€” represents the NAN peer. Peer-specific data such as the peer's schedule and the HT, VHT and HE capabilities belongs to the NMI station. It's also used for Tx/Rx of NAN management frames to/from the peer. Added on the NL80211_IFTYPE_NAN interface. ✨
  • NDI station β€” used for Tx/Rx of data frames (and non-NAN management frames) for a specific NDP established with the NAN peer. Added on the NL80211_IFTYPE_NAN_DATA interface. πŸ”₯

A peer may reuse its NMI address as the NDI address. In that case, two separate stations should be added even though they share the same MAC address. Yes bestie, same MAC, separate stations β€” the way that works is iconic. πŸ’…

HT, VHT and HE capabilities should not changes after it was set. It is the driver's responsibility to check that. 😭 (That grammar is a little chaotic, but the rule is not.)

An NDI station can only be added if the corresponding NMI station has already been configured with HT (and possibly VHT and HE) capabilities. It is the driver's responsibility to check that. ⭐

All NDI stations must be removed before the corresponding NMI station is removed. Therefore, removing an NMI station implies that the associated NDI station(s) (if any) will be removed first. πŸ‘‘

✨ NAN Dependencies ✨

The following diagram shows the dependencies between NAN components. An arrow from A to B means A must be started/added before B, and B must be stopped/removed before A:

       |  NMI iface  |---(local schedule) /       v         v | NDI iface |  |
       NMI sta   |---(peer schedule)            / v         v

       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚     NDI sta β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ‘€ SEE ALSO πŸ‘€

okay bestie, this is the part where the page goes "and here's literally everyone else you should also go read" β€” and it is a WALL. like, a genuine wall. we do not skip a single one, because each of these is its own manual page and they all matter πŸ’… so grab a snack, we're going through them together, all of them, in order, no cap πŸ“

see? not even halfway through the first cluster and we already have everything from channels to iftype data πŸ¦‹ stay with me, it's worth it.

okay that was the whole actions-and-configuration era of our lives πŸ’€ and yes, mesh and OCB showed up too, we love a complete reference list πŸ™ˆ

  • Scanning and BSS list handling(9)
  • struct cfg80211_ssid(9)
  • struct cfg80211_scan_info(9)
  • struct cfg80211_scan_6ghz_params(9)
  • struct cfg80211_scan_request(9)
  • struct cfg80211_match_set(9)
  • struct cfg80211_sched_scan_plan(9)
  • struct cfg80211_bss_select_adjust(9)
  • struct cfg80211_sched_scan_request(9)
  • enum cfg80211_signal_type(9)
  • struct cfg80211_inform_bss(9)
  • struct cfg80211_bss_ies(9)
  • struct cfg80211_bss(9)
  • ieee80211_bss_get_elem(9)
  • ieee80211_bss_get_ie(9)
  • struct cfg80211_auth_request(9)
  • struct cfg80211_assoc_link(9)
  • struct cfg80211_ml_reconf_req(9)
  • enum cfg80211_assoc_req_flags(9)
  • struct cfg80211_assoc_request(9)
  • struct cfg80211_deauth_request(9)
  • struct cfg80211_disassoc_request(9)
  • struct cfg80211_ibss_params(9)
  • struct cfg80211_bss_selection(9)
  • struct cfg80211_connect_params(9)
  • enum cfg80211_connect_params_changed(9)
  • enum wiphy_params_flags(9)
  • struct cfg80211_pmksa(9)
  • struct cfg80211_pkt_pattern(9)
  • struct cfg80211_wowlan_tcp(9)
  • struct cfg80211_wowlan(9)
  • struct cfg80211_coalesce_rules(9)
  • struct cfg80211_coalesce(9)
  • struct cfg80211_wowlan_nd_match(9)
  • struct cfg80211_wowlan_nd_info(9)
  • struct cfg80211_wowlan_wakeup(9)
  • struct cfg80211_gtk_rekey_data(9)
  • struct cfg80211_update_ft_ies_params(9)
  • struct cfg80211_mgmt_tx_params(9)
  • struct cfg80211_dscp_exception(9)
  • struct cfg80211_dscp_range(9)
  • struct cfg80211_qos_map(9)
  • struct cfg80211_nan_band_config(9)
  • struct cfg80211_nan_conf(9)
  • struct cfg80211_nan_channel(9)
  • struct cfg80211_nan_local_sched(9)
  • struct cfg80211_nan_peer_map(9)
  • struct cfg80211_nan_peer_sched(9)
  • enum cfg80211_nan_conf_changes(9)
  • struct cfg80211_nan_func_filter(9)
  • struct cfg80211_nan_func(9)
  • struct cfg80211_pmk_conf(9)
  • struct cfg80211_external_auth_params(9)
  • struct cfg80211_ftm_responder_stats(9)
  • struct cfg80211_pmsr_ftm_result(9)
  • struct cfg80211_pmsr_result(9)
  • struct cfg80211_pmsr_ftm_request_peer(9)
  • struct cfg80211_pmsr_request_peer(9)
  • struct cfg80211_pmsr_request(9)
  • struct cfg80211_update_owe_info(9)
  • struct mgmt_frame_regs(9)
  • struct cfg80211_ops(9)
  • enum wiphy_flags(9)
  • struct ieee80211_iface_limit(9)
  • struct ieee80211_iface_combination(9)
  • enum wiphy_wowlan_support_flags(9)
  • struct wiphy_wowlan_support(9)
  • struct wiphy_coalesce_support(9)
  • enum wiphy_vendor_command_flags(9)
  • enum wiphy_opmode_flag(9)
  • struct sta_opmode_info(9)
  • struct wiphy_vendor_command(9)
  • struct wiphy_iftype_ext_capab(9)
  • cfg80211_get_iftype_ext_capa(9)
  • struct cfg80211_pmsr_capabilities(9)
  • struct wiphy_iftype_akm_suites(9)
  • struct wiphy_radio_cfg(9)
  • struct wiphy_radio_freq_range(9)
  • struct wiphy_radio(9)
  • enum wiphy_nan_flags(9)
  • struct wiphy_nan_capa(9)
  • struct wiphy(9)
  • wiphy_priv(9)
  • priv_to_wiphy(9)
  • set_wiphy_dev(9)
  • wiphy_dev(9)
  • wiphy_name(9)
  • wiphy_new_nm(9)
  • wiphy_new(9)
  • wiphy_register(9)
  • rcu_dereference_wiphy(9)
  • wiphy_dereference(9)
  • get_wiphy_regdom(9)
  • wiphy_unregister(9)
  • wiphy_free(9)
  • wiphy_lock(9)
  • wiphy_unlock(9)
  • wiphy_work_queue(9)
  • wiphy_work_cancel(9)
  • wiphy_work_flush(9)
  • wiphy_delayed_work_queue(9)
  • wiphy_delayed_work_cancel(9)
  • wiphy_delayed_work_flush(9)
  • wiphy_delayed_work_pending(9)
  • wiphy_hrtimer_work_queue(9)
  • wiphy_hrtimer_work_cancel(9)
  • wiphy_hrtimer_work_flush(9)
  • wiphy_hrtimer_work_pending(9)
  • enum ieee80211_ap_reg_power(9)
  • struct wireless_dev(9)
  • wdev_priv(9)
  • wdev_chandef(9)

the wiphy section really said "and I'll take every work-queue variant with me" and honestly? main character energy πŸ‘‘ and hey β€” our NAN structs are in that cluster too, we been knew πŸ’–

and that's the whole cross-reference wall, bestie β€” every single name above is its own page and yes you should absolutely go click through them 🌈 no skips, no shortcuts, we read the docs in this house πŸ’…βœ¨

...and the reading list keeps going, bestie. Every single one of these is a real page in (9), so no skimming, okay? πŸ’–


okay bestie that's literally the whole list, you made it, I'm so proud πŸ₯ΉπŸ’–

and for the credits era of this page: it lives in ./include/net, dated October 2026, and the footer still spells the title the cursed way β€” Neighbor Aw...orking (NAN)(9) β€” which is honestly iconic of it. go forth and NAN responsibly, ily πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from