source: mainline/uspace/lib/device/include/ieee80211/ieee80211.h

Last change on this file was edeee9f, checked in by Jiri Svoboda <jiri@…>, 4 years ago

Fix header guards and doxy groups of stuff moved out of libc

  • Property mode set to 100644
File size: 2.9 KB
Line 
1/*
2 * Copyright (c) 2015 Jan Kolarik
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup libdevice
30 * @{
31 */
32
33/** @file ieee80211.h
34 * IEEE 802.11 common definitions.
35 */
36
37#ifndef LIBDEVICE_IEEE80211_H
38#define LIBDEVICE_IEEE80211_H
39
40#include <adt/list.h>
41#include <nic/nic.h>
42#include <time.h>
43
44/** Max length of scan results array. */
45#define IEEE80211_MAX_RESULTS_LENGTH 32
46
47/** Max SSID length including null character. */
48#define IEEE80211_MAX_SSID_LENGTH 35
49
50/** WiFi security authentication method indicator. */
51typedef enum {
52 IEEE80211_SECURITY_OPEN,
53 IEEE80211_SECURITY_WEP,
54 IEEE80211_SECURITY_WPA,
55 IEEE80211_SECURITY_WPA2
56} ieee80211_security_type_t;
57
58/** WiFi security suite indicator. */
59typedef enum {
60 IEEE80211_SECURITY_SUITE_WEP40,
61 IEEE80211_SECURITY_SUITE_WEP104,
62 IEEE80211_SECURITY_SUITE_CCMP,
63 IEEE80211_SECURITY_SUITE_TKIP
64} ieee80211_security_suite_t;
65
66/** WiFi security authentication method indicator. */
67typedef enum {
68 IEEE80211_SECURITY_AUTH_PSK,
69 IEEE80211_SECURITY_AUTH_8021X
70} ieee80211_security_auth_t;
71
72/** Structure for indicating security network security settings. */
73typedef struct {
74 int type;
75 int group_alg;
76 int pair_alg;
77 int auth;
78} ieee80211_security_t;
79
80/** Structure with scan result info. */
81typedef struct {
82 nic_address_t bssid;
83 char ssid[IEEE80211_MAX_SSID_LENGTH];
84 uint8_t channel;
85 ieee80211_security_t security;
86} ieee80211_scan_result_t;
87
88/** Array of scan results info. */
89typedef struct {
90 uint8_t length;
91 ieee80211_scan_result_t results[IEEE80211_MAX_RESULTS_LENGTH];
92} ieee80211_scan_results_t;
93
94#endif
95
96/** @}
97 */
Note: See TracBrowser for help on using the repository browser.