wireless_errors.c

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., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  */
00018 
00019 FILE_LICENCE ( GPL2_OR_LATER );
00020 
00021 #include <errno.h>
00022 #include <gpxe/errortab.h>
00023 
00024 /* Record errors as though they come from the 802.11 stack */
00025 #undef ERRFILE
00026 #define ERRFILE ERRFILE_net80211
00027 
00028 /** All 802.11 errors
00029  *
00030  * These follow the 802.11 standard as much as is feasible, but most
00031  * have been abbreviated to fit the 50-character limit imposed by
00032  * strerror.
00033  */
00034 struct errortab wireless_errors[] __errortab = {
00035         /* gPXE 802.11 stack errors */
00036         { EINVAL | EUNIQ_01, "Packet too short" },
00037         { EINVAL | EUNIQ_02, "Packet 802.11 version not supported" },
00038         { EINVAL | EUNIQ_03, "Packet not a data packet" },
00039         { EINVAL | EUNIQ_04, "Packet not from an Access Point" },
00040         { EINVAL | EUNIQ_05, "Packet has invalid LLC header" },
00041         { EINVAL | EUNIQ_06, "Packet decryption error", },
00042         { EINVAL | EUNIQ_07, "Invalid active scan requested" },
00043 
00044         /* 802.11 status codes (IEEE Std 802.11-2007, Table 7-23) */
00045         /* Maximum error length: 50 chars                                            | */
00046         { ECONNREFUSED | EUNIQ_01, "Unspecified failure" },
00047         { ECONNREFUSED | EUNIQ_0A, "Cannot support all requested capabilities" },
00048         { ECONNREFUSED | EUNIQ_0B, "Reassociation denied due to lack of association" },
00049         { ECONNREFUSED | EUNIQ_0C, "Association denied for another reason" },
00050         { ECONNREFUSED | EUNIQ_0D, "Authentication algorithm unsupported" },
00051         { ECONNREFUSED | EUNIQ_0E, "Authentication sequence number unexpected" },
00052         { ECONNREFUSED | EUNIQ_0F, "Authentication rejected due to challenge failure" },
00053         { ECONNREFUSED | EUNIQ_10, "Authentication rejected due to timeout" },
00054         { ECONNREFUSED | EUNIQ_11, "Association denied because AP is out of resources" },
00055         { ECONNREFUSED | EUNIQ_12, "Association denied; basic rate support required" },
00056         { ECONNREFUSED | EUNIQ_13, "Association denied; short preamble support req'd" },
00057         { ECONNREFUSED | EUNIQ_14, "Association denied; PBCC modulation support req'd" },
00058         { ECONNREFUSED | EUNIQ_15, "Association denied; Channel Agility support req'd" },
00059         { ECONNREFUSED | EUNIQ_16, "Association denied; Spectrum Management required" },
00060         { ECONNREFUSED | EUNIQ_17, "Association denied; Power Capability unacceptable" },
00061         { ECONNREFUSED | EUNIQ_18, "Association denied; Supported Channels unacceptable" },
00062         { ECONNREFUSED | EUNIQ_19, "Association denied; Short Slot Tume support req'd" },
00063         { ECONNREFUSED | EUNIQ_1A, "Association denied; DSSS-OFDM support required" },
00064         { EHOSTUNREACH,            "Unspecified, QoS-related failure" },
00065         { EHOSTUNREACH | EUNIQ_01, "Association denied; QoS AP out of QoS resources" },
00066         { EHOSTUNREACH | EUNIQ_02, "Association denied due to excessively poor link" },
00067         { EHOSTUNREACH | EUNIQ_03, "Association denied; QoS support required" },
00068         { EHOSTUNREACH | EUNIQ_05, "The request has been declined" },
00069         { EHOSTUNREACH | EUNIQ_06, "Request unsuccessful due to invalid parameters" },
00070         { EHOSTUNREACH | EUNIQ_07, "TS not created due to bad specification" },
00071         { EHOSTUNREACH | EUNIQ_08, "Invalid information element" },
00072         { EHOSTUNREACH | EUNIQ_09, "Invalid group cipher" },
00073         { EHOSTUNREACH | EUNIQ_0A, "Invalid pairwise cipher" },
00074         { EHOSTUNREACH | EUNIQ_0B, "Invalid AKMP" },
00075         { EHOSTUNREACH | EUNIQ_0C, "Unsupported RSN information element version" },
00076         { EHOSTUNREACH | EUNIQ_0D, "Invalid RSN information element capabilities" },
00077         { EHOSTUNREACH | EUNIQ_0E, "Cipher suite rejected because of security policy" },
00078         { EHOSTUNREACH | EUNIQ_0F, "TS not created due to insufficient delay" },
00079         { EHOSTUNREACH | EUNIQ_10, "Direct link is not allowed in the BSS by policy" },
00080         { EHOSTUNREACH | EUNIQ_11, "The Destination STA is not present within the BSS" },
00081         { EHOSTUNREACH | EUNIQ_12, "The Destination STA is not a QoS STA" },
00082         { EHOSTUNREACH | EUNIQ_13, "Association denied; Listen Interval is too large" },
00083 
00084         /* 802.11 reason codes (IEEE Std 802.11-2007, Table 7-22) */
00085         /* Maximum error length: 50 chars                                          | */
00086         { ECONNRESET | EUNIQ_01, "Unspecified reason" },
00087         { ECONNRESET | EUNIQ_02, "Previous authentication no longer valid" },
00088         { ECONNRESET | EUNIQ_03, "Deauthenticated due to leaving network" },
00089         { ECONNRESET | EUNIQ_04, "Disassociated due to inactivity" },
00090         { ECONNRESET | EUNIQ_05, "Disassociated because AP is out of resources" },
00091         { ECONNRESET | EUNIQ_06, "Class 2 frame received from nonauthenticated STA" },
00092         { ECONNRESET | EUNIQ_07, "Class 3 frame received from nonassociated STA" },
00093         { ECONNRESET | EUNIQ_08, "Disassociated due to roaming" },
00094         { ECONNRESET | EUNIQ_09, "STA requesting (re)association not authenticated" },
00095         { ECONNRESET | EUNIQ_0A, "Disassociated; Power Capability unacceptable" },
00096         { ECONNRESET | EUNIQ_0B, "Disassociated; Supported Channels unacceptable" },
00097         { ECONNRESET | EUNIQ_0D, "Invalid information element" },
00098         { ECONNRESET | EUNIQ_0E, "Message integrity code (MIC) failure" },
00099         { ECONNRESET | EUNIQ_0F, "4-Way Handshake timeout" },
00100         { ECONNRESET | EUNIQ_10, "Group Key Handshake timeout" },
00101         { ECONNRESET | EUNIQ_11, "4-Way Handshake information element changed unduly" },
00102         { ECONNRESET | EUNIQ_12, "Invalid group cipher" },
00103         { ECONNRESET | EUNIQ_13, "Invalid pairwise cipher" },
00104         { ECONNRESET | EUNIQ_14, "Invalid AKMP" },
00105         { ECONNRESET | EUNIQ_15, "Unsupported RSN information element version" },
00106         { ECONNRESET | EUNIQ_16, "Invalid RSN information element capabilities" },
00107         { ECONNRESET | EUNIQ_17, "IEEE 802.1X authentication failed" },
00108         { ECONNRESET | EUNIQ_18, "Cipher suite rejected because of security policy" },
00109         { ENETRESET,            "Disassociated for unspecified, QoS-related reason" },
00110         { ENETRESET | EUNIQ_01, "Disassociated; QoS AP is out of QoS resources" },
00111         { ENETRESET | EUNIQ_02, "Disassociated due to excessively poor link" },
00112         { ENETRESET | EUNIQ_03, "Disassociated due to TXOP limit violation" },
00113         { ENETRESET | EUNIQ_04, "Requested; STA is leaving the BSS (or resetting)" },
00114         { ENETRESET | EUNIQ_05, "Requested; does not want to use the mechanism" },
00115         { ENETRESET | EUNIQ_06, "Requested; setup is required" },
00116         { ENETRESET | EUNIQ_07, "Requested from peer STA due to timeout" },
00117         { ENETRESET | EUNIQ_0D, "Peer STA does not support requested cipher suite" },
00118 };

Generated on Tue Apr 6 20:01:06 2010 for gPXE by  doxygen 1.5.7.1