iPXE
sec80211.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2009 Joshua Oreman <oremanj@rwcr.net>.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License as
00006  * published by the Free Software Foundation; either version 2 of the
00007  * License, or any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful, but
00010  * WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301, USA.
00018  */
00019 
00020 #ifndef _IPXE_SEC80211_H
00021 #define _IPXE_SEC80211_H
00022 
00023 FILE_LICENCE ( GPL2_OR_LATER );
00024 
00025 #include <ipxe/net80211.h>
00026 #include <errno.h>
00027 
00028 /** @file
00029  *
00030  * Definitions for general secured-network routines.
00031  */
00032 
00033 int sec80211_detect ( struct io_buffer *iob,
00034                       enum net80211_security_proto *secprot,
00035                       enum net80211_crypto_alg *crypt );
00036 
00037 int sec80211_detect_ie ( int is_rsn, u8 *start, u8 *end,
00038                          enum net80211_security_proto *secprot,
00039                          enum net80211_crypto_alg *crypt );
00040 u8 * sec80211_find_rsn ( union ieee80211_ie *ie, void *ie_end,
00041                          int *is_rsn, u8 **end );
00042 
00043 int sec80211_install ( struct net80211_crypto **which,
00044                        enum net80211_crypto_alg crypt,
00045                        const void *key, int len, const void *rsc );
00046 
00047 u32 sec80211_rsn_get_crypto_desc ( enum net80211_crypto_alg crypt, int rsnie );
00048 u32 sec80211_rsn_get_akm_desc ( enum net80211_security_proto secprot,
00049                                 int rsnie );
00050 enum net80211_crypto_alg sec80211_rsn_get_net80211_crypt ( u32 desc );
00051 
00052 #endif /* _IPXE_SEC80211_H */
00053