source: mainline/uspace/lib/c/include/ieee80211/ieee80211.h@ 0453261

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 0453261 was 8a64320e, checked in by Martin Decky <martin@…>, 10 years ago

pre-merge coding style cleanup and code review

  • 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 libc
30 * @{
31 */
32
33/** @file ieee80211.h
34 * IEEE 802.11 common definitions.
35 */
36
37#ifndef LIBC_IEEE80211_H_
38#define LIBC_IEEE80211_H_
39
40#include <malloc.h>
41#include <adt/list.h>
42#include <nic/nic.h>
43#include <time.h>
44
45/** Max length of scan results array. */
46#define IEEE80211_MAX_RESULTS_LENGTH 32
47
48/** Max SSID length including null character. */
49#define IEEE80211_MAX_SSID_LENGTH 35
50
51/** WiFi security authentication method indicator. */
52typedef enum {
53 IEEE80211_SECURITY_OPEN,
54 IEEE80211_SECURITY_WEP,
55 IEEE80211_SECURITY_WPA,
56 IEEE80211_SECURITY_WPA2
57} ieee80211_security_type_t;
58
59/** WiFi security suite indicator. */
60typedef enum {
61 IEEE80211_SECURITY_SUITE_WEP40,
62 IEEE80211_SECURITY_SUITE_WEP104,
63 IEEE80211_SECURITY_SUITE_CCMP,
64 IEEE80211_SECURITY_SUITE_TKIP
65} ieee80211_security_suite_t;
66
67/** WiFi security authentication method indicator. */
68typedef enum {
69 IEEE80211_SECURITY_AUTH_PSK,
70 IEEE80211_SECURITY_AUTH_8021X
71} ieee80211_security_auth_t;
72
73/** Structure for indicating security network security settings. */
74typedef struct {
75 int type;
76 int group_alg;
77 int pair_alg;
78 int auth;
79} ieee80211_security_t;
80
81/** Structure with scan result info. */
82typedef struct {
83 nic_address_t bssid;
84 char ssid[IEEE80211_MAX_SSID_LENGTH];
85 uint8_t channel;
86 ieee80211_security_t security;
87} ieee80211_scan_result_t;
88
89/** Array of scan results info. */
90typedef struct {
91 uint8_t length;
92 ieee80211_scan_result_t results[IEEE80211_MAX_RESULTS_LENGTH];
93} ieee80211_scan_results_t;
94
95#endif
96
97/** @}
98 */
Note: See TracBrowser for help on using the repository browser.