iPXE
sec80211.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 Joshua Oreman <oremanj@rwcr.net>.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301, USA.
18 */
19
20#ifndef _IPXE_SEC80211_H
21#define _IPXE_SEC80211_H
22
23FILE_LICENCE ( GPL2_OR_LATER );
24
25#include <ipxe/net80211.h>
26#include <errno.h>
27
28/** @file
29 *
30 * Definitions for general secured-network routines.
31 */
32
33int sec80211_detect ( struct io_buffer *iob,
34 enum net80211_security_proto *secprot,
35 enum net80211_crypto_alg *crypt );
36
37int sec80211_detect_ie ( int is_rsn, u8 *start, u8 *end,
38 enum net80211_security_proto *secprot,
39 enum net80211_crypto_alg *crypt );
40u8 * sec80211_find_rsn ( union ieee80211_ie *ie, void *ie_end,
41 int *is_rsn, u8 **end );
42
43int sec80211_install ( struct net80211_crypto **which,
44 enum net80211_crypto_alg crypt,
45 const void *key, int len, const void *rsc );
46
49 int rsnie );
51
52#endif /* _IPXE_SEC80211_H */
53
union @162305117151260234136356364136041353210355154177 key
Sense key.
Definition scsi.h:3
ring len
Length.
Definition dwmac.h:226
struct ena_llq_option desc
Descriptor counts.
Definition ena.h:9
Error codes.
uint32_t start
Starting offset.
Definition netvsc.h:1
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define u8
Definition igbvf_osdep.h:40
The iPXE 802.11 MAC layer.
net80211_security_proto
An 802.11 security handshaking protocol.
Definition net80211.h:96
net80211_crypto_alg
An 802.11 data encryption algorithm.
Definition net80211.h:129
uint32_t end
Ending offset.
Definition netvsc.h:7
u8 * sec80211_find_rsn(union ieee80211_ie *ie, void *ie_end, int *is_rsn, u8 **end)
Find the RSN or WPA information element in the provided beacon frame.
Definition sec80211.c:284
enum net80211_crypto_alg sec80211_rsn_get_net80211_crypt(u32 desc)
Determine net80211 cryptosystem number from RSN descriptor.
Definition sec80211.c:509
int sec80211_install(struct net80211_crypto **which, enum net80211_crypto_alg crypt, const void *key, int len, const void *rsc)
Install 802.11 cryptosystem.
Definition sec80211.c:114
int sec80211_detect(struct io_buffer *iob, enum net80211_security_proto *secprot, enum net80211_crypto_alg *crypt)
Detect the cryptosystem and handshaking protocol used by an 802.11 network.
Definition sec80211.c:407
int sec80211_detect_ie(int is_rsn, u8 *start, u8 *end, enum net80211_security_proto *secprot, enum net80211_crypto_alg *crypt)
Detect crypto and AKM types from RSN information element.
Definition sec80211.c:341
u32 sec80211_rsn_get_crypto_desc(enum net80211_crypto_alg crypt, int rsnie)
Determine RSN descriptor for specified net80211 cryptosystem number.
Definition sec80211.c:482
u32 sec80211_rsn_get_akm_desc(enum net80211_security_proto secprot, int rsnie)
Determine RSN descriptor for specified net80211 handshaker number.
Definition sec80211.c:497
A persistent I/O buffer.
Definition iobuf.h:38
Interface to an 802.11 cryptosystem.
Definition net80211.h:690
Any 802.11 information element.
Definition ieee80211.h:973
#define u32
Definition vga.h:21
u8 rsc[8]
Receive sequence counter for GTK.
Definition wpa.h:42