You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sec80211.h 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. #ifndef _IPXE_SEC80211_H
  20. #define _IPXE_SEC80211_H
  21. FILE_LICENCE ( GPL2_OR_LATER );
  22. #include <ipxe/net80211.h>
  23. #include <errno.h>
  24. /** @file
  25. *
  26. * Definitions for general secured-network routines.
  27. */
  28. int sec80211_detect ( struct io_buffer *iob,
  29. enum net80211_security_proto *secprot,
  30. enum net80211_crypto_alg *crypt );
  31. int sec80211_detect_ie ( int is_rsn, u8 *start, u8 *end,
  32. enum net80211_security_proto *secprot,
  33. enum net80211_crypto_alg *crypt );
  34. u8 * sec80211_find_rsn ( union ieee80211_ie *ie, void *ie_end,
  35. int *is_rsn, u8 **end );
  36. int sec80211_install ( struct net80211_crypto **which,
  37. enum net80211_crypto_alg crypt,
  38. const void *key, int len, const void *rsc );
  39. u32 sec80211_rsn_get_crypto_desc ( enum net80211_crypto_alg crypt, int rsnie );
  40. u32 sec80211_rsn_get_akm_desc ( enum net80211_security_proto secprot,
  41. int rsnie );
  42. enum net80211_crypto_alg sec80211_rsn_get_net80211_crypt ( u32 desc );
  43. #endif /* _IPXE_SEC80211_H */