summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_node.h
diff options
context:
space:
mode:
authorPeter Hessler <phessler@cvs.openbsd.org>2018-07-11 20:18:10 +0000
committerPeter Hessler <phessler@cvs.openbsd.org>2018-07-11 20:18:10 +0000
commit2e83644dba684b8d8dee748d7c956edf9914a2c4 (patch)
treeb6a046227a27fc15911d52edfb49eb9be36a2f9d /sys/net80211/ieee80211_node.h
parenta02ddc0350ddb6be1c595c197cc5a7a2ae9949bb (diff)
Introduce 'auto-join' to the wifi 802.11 stack.
This allows a system to remember which ESSIDs it wants to connect to, any relevant security configuration, and switch to it when the network we are currently connected to is no longer available. Works when connecting and switching between WPA2/WPA1/WEP/clear encryptions. example hostname.if: join home wpakey password join work wpakey mekmitasdigoat join open-lounge join cafe wpakey cafe2018 join "wepnetwork" nwkey "12345" dhcp inet6 autoconf up OK stsp@ reyk@ and enthusiasm from every hackroom I've been in for the last 3 years
Diffstat (limited to 'sys/net80211/ieee80211_node.h')
-rw-r--r--sys/net80211/ieee80211_node.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h
index 5a414fef8b7..882df583190 100644
--- a/sys/net80211/ieee80211_node.h
+++ b/sys/net80211/ieee80211_node.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_node.h,v 1.74 2018/04/28 14:49:07 stsp Exp $ */
+/* $OpenBSD: ieee80211_node.h,v 1.75 2018/07/11 20:18:09 phessler Exp $ */
/* $NetBSD: ieee80211_node.h,v 1.9 2004/04/30 22:57:32 dyoung Exp $ */
/*-
@@ -307,6 +307,17 @@ struct ieee80211_node {
RBT_HEAD(ieee80211_tree, ieee80211_node);
+struct ieee80211_ess_rbt {
+ RBT_ENTRY(ieee80211_ess_rbt) ess_rbt;
+ u_int8_t esslen;
+ u_int8_t essid[IEEE80211_NWID_LEN];
+ struct ieee80211_node *ni2;
+ struct ieee80211_node *ni5;
+ struct ieee80211_node *ni;
+};
+
+RBT_HEAD(ieee80211_ess_tree, ieee80211_ess_rbt);
+
static inline void
ieee80211_node_incref(struct ieee80211_node *ni)
{
@@ -412,6 +423,9 @@ void ieee80211_set_tim(struct ieee80211com *, int, int);
int ieee80211_node_cmp(const struct ieee80211_node *,
const struct ieee80211_node *);
+int ieee80211_ess_cmp(const struct ieee80211_ess_rbt *,
+ const struct ieee80211_ess_rbt *);
RBT_PROTOTYPE(ieee80211_tree, ieee80211_node, ni_node, ieee80211_node_cmp);
+RBT_PROTOTYPE(ieee80211_ess_tree, ieee80211_ess_rbt, ess_rbt, ieee80211_ess_cmp);
#endif /* _NET80211_IEEE80211_NODE_H_ */