omacpadapters/accesspointadapter/Inc/WPAPDefs.h
changeset 42 aa33c2cb9a50
equal deleted inserted replaced
41:c742e1129640 42:aa33c2cb9a50
       
     1 /*
       
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:     Definitions to WPAPAdapter
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef WPAPDEFS_H
       
    23 #define WPAPDEFS_H
       
    24 
       
    25 #include <e32base.h>
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 const TUint32 KMaxWEPKeyLength = 29;
       
    30 // The maximum WPA Pre-Shared Key length.
       
    31 const TUint KMaxWpaPskLength = 63;
       
    32 // same as connection name max length in Prov req.
       
    33 const TInt KNameMaxLength = 30;
       
    34 const TInt KTwoNameServersPerNetworkType = 2;
       
    35 // The maximum length of key data
       
    36 const TUint KMaxLengthOfKeyData = 58;
       
    37 const TUint KMaxLengthOfEapList = 50;
       
    38 const TUint KExpandedEapIdLength = 8;
       
    39 // Number of keys
       
    40 const TUint KMaxNumberofKeys = 4;
       
    41 
       
    42 const TInt KInitialArraySize = 3;
       
    43 
       
    44 const TUint KMaxSubKeyLenght = 255;
       
    45 
       
    46 _LIT(KIPV4, "IPV4");
       
    47 _LIT(KIPV6, "IPV6");
       
    48 _LIT(KCLWSP, "CL-WSP");
       
    49 _LIT(KCOWSP, "CO-WSP");
       
    50 _LIT(KCLSECWSP, "CL-SEC-WSP");
       
    51 _LIT(KCOSECWSP, "CO-SEC-WSP");
       
    52 _LIT(K9200, "9200");
       
    53 _LIT(K9201, "9201");
       
    54 _LIT(K9202, "9202");
       
    55 _LIT(K9203, "9203");
       
    56 _LIT(K80, "80");
       
    57 _LIT(K8080, "8080");
       
    58 _LIT(K443, "443");
       
    59 
       
    60 _LIT(KGSMGPRS, "GSM-GPRS");
       
    61 
       
    62 //Characteristic WLAN
       
    63 _LIT(KWLAN, "WLAN");
       
    64 _LIT(PRISSID, "PRI-SSID");
       
    65 _LIT(PRIUSSID, "PRI-U-SSID");
       
    66 _LIT(PRIHSSID, "PRI-H-SSID");
       
    67 
       
    68 //Characteristic WLAN/SEC-SSID
       
    69 _LIT(SECSSID, "SEC-SSID");
       
    70 _LIT(SSSID, "S-SSID");
       
    71 _LIT(SUSSID, "S-U-SSID");
       
    72 
       
    73 _LIT(NETMODE, "NETMODE");
       
    74 _LIT(SECMODE, "SECMODE");
       
    75 
       
    76 //Characteristic WLAN/EAP
       
    77 _LIT(KEAP, "EAP");
       
    78 _LIT(EAPTYPE, "EAPTYPE");
       
    79 _LIT(EAPUSERNAME, "USERNAME");
       
    80 _LIT(EAPPASSWORD, "PASSWORD");
       
    81 _LIT(EAPREALM, "REALM");
       
    82 _LIT(EAPUSEPSEUD, "USE-PSEUD");
       
    83 _LIT(EAPMAXAUTHS, "MAXAUTHS");
       
    84 _LIT(EAPENCAPS, "ENCAPS");
       
    85 _LIT(EAPVERSERREALM, "VER-SER-REALM");
       
    86 _LIT(EAPCLIENTHAUTH, "CLIENTH-AUTH");
       
    87 _LIT(EAPSESVALTIME, "SES-VAL-TIME");
       
    88 _LIT(EAPCIPSUIT, "CIP-SUIT");
       
    89 _LIT(EAPPEAPV0, "PEAP-V0");
       
    90 _LIT(EAPPEAPV1, "PEAP-V1");
       
    91 _LIT(EAPPEAPV2, "PEAP-V2");
       
    92 
       
    93 //Characteristic WLAN/EAP/CERT
       
    94 _LIT(KCERT, "CERT");
       
    95 _LIT(EAPISSNAME, "ISS-NAME");
       
    96 _LIT(EAPSUBNAME, "SUB-NAME");
       
    97 _LIT(EAPCERTTYPE, "CERT-TYPE");
       
    98 _LIT(EAPSERNUM, "SER-NUM");
       
    99 _LIT(EAPSUBKEYID, "SUB-KEY-ID");
       
   100 _LIT(EAPTHUMBPRINT, "THUMBPRINT");
       
   101 
       
   102 _LIT(EAPCERTUSER, "USER");
       
   103 _LIT(EAPCERTCA, "CA");
       
   104 
       
   105 _LIT(WPAPRESKEYASC, "WPA-PRES-KEY-ASC");
       
   106 _LIT(WPAPRESKEYHEX, "WPA-PRES-KEY-HEX");
       
   107 _LIT(DEFAULTWEPIND, "WEPKEYIND");
       
   108 _LIT(WEPAUTHMODE, "WEPAUTHMODE");
       
   109 
       
   110 //Characteristic WLAN/WEPKEY
       
   111 _LIT(KWEP, "WEPKEY");
       
   112 _LIT(WEPKEYLENGTH, "LENGTH");
       
   113 _LIT(WEPKEYINDEX, "INDEX");
       
   114 _LIT(WEPKEYDATA, "DATA");
       
   115 
       
   116 _LIT(KPAP, "PAP");
       
   117 _LIT(KCHAP, "CHAP");
       
   118 _LIT(KMD5, "MD5");
       
   119 _LIT(KANALOGMODEM, "ANALOG-MODEM");
       
   120 _LIT(KV110, "V.110");
       
   121 _LIT(KV120, "V.120");
       
   122 _LIT(KAUTOBAUDING, "AUTOBAUDING");
       
   123 _LIT(K9600, "9600");
       
   124 _LIT(K14400, "14400");
       
   125 _LIT(K19200, "19200");
       
   126 _LIT(K28800, "28800");
       
   127 _LIT(K38400, "38400");
       
   128 _LIT(K43200, "43200");
       
   129 _LIT(KIPv6, "IPv6");
       
   130 _LIT(KIPv4, "IPv4");
       
   131 _LIT(KAddrTypeE164, "E164");
       
   132 _LIT(KAddrTypeAPN, "APN");
       
   133 
       
   134 _LIT(KADHOC, "ADHOC");
       
   135 
       
   136 _LIT(KWEPSEC, "WEP");
       
   137 _LIT(KWPASEC, "WPA");
       
   138 _LIT(KWPA2SEC, "WPA2");
       
   139 _LIT(K8021XSEC, "8021X");
       
   140 _LIT(KWPAPRESSEC, "WPA-PRESHARED-KEY");
       
   141 _LIT(KWPA2PRESSEC, "WPA2-PRESHARED-KEY");
       
   142 
       
   143 
       
   144 _LIT(KEAPSIM, "EAP-SIM");
       
   145 _LIT(KEAPAKA, "EAP-AKA");
       
   146 _LIT(KEAPTLS, "EAP-TLS");
       
   147 _LIT(KEAPPEAP, "EAP-PEAP");
       
   148 _LIT(KEAPTTLS, "EAP-TTLS");
       
   149 _LIT(KEAPLEAP, "EAP-LEAP");
       
   150 _LIT(KEAPMSCHAPV2, "EAP-MSCHAPV2");
       
   151 _LIT(KEAPGTC, "EAP-GTC");
       
   152 _LIT(KEAPFAST, "EAP-FAST");
       
   153 
       
   154 /*
       
   155 _LIT8(KEapNone,"0");
       
   156 _LIT8(KEapGtc,"6");
       
   157 _LIT8(KEapTls, "13"); 
       
   158 _LIT8(KEapLeap,"17");
       
   159 _LIT8(KEapSim,"18");
       
   160 _LIT8(KEapTtls,"21");
       
   161 _LIT8(KEapAka,"23");
       
   162 _LIT8(KEapPeap,"25");
       
   163 _LIT8(KEapMschapv2,"26");
       
   164 _LIT8(KEapSecurid,"32");
       
   165 _LIT8(KEapFast,"43");
       
   166 */
       
   167 _LIT8(KEapAll,"-017,-018,-023,-013,-025,-021,-043" );
       
   168 
       
   169 const TUint8 KEapNoneId[] = {0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
       
   170 const TUint8 KEapTlsTypeId[] = {0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d};
       
   171 const TUint8 KEapGtcTypeId[] = {0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06};
       
   172 const TUint8 KEapLeapTypeId[] = {0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11};
       
   173 const TUint8 KEapSimTypeId[] = {0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12};
       
   174 const TUint8 KEapTtlsTypeId[] = {0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15};
       
   175 const TUint8 KEapAkaTypeId[] = {0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17};
       
   176 const TUint8 KEapPeapTypeId[] = {0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19};
       
   177 const TUint8 KEapMschapv2TypeId[] = {0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1A};
       
   178 const TUint8 KEapSecuridTypeId[] = {0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20};
       
   179 const TUint8 KEapFastTypeId[] = {0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B};
       
   180 
       
   181 
       
   182 const TUint8 KEapPlus = '+'; 
       
   183 
       
   184 _LIT(KWEPAUTHMODEOPEN, "OPEN");
       
   185 _LIT(KWEPAUTHMODESHARED, "SHARED");
       
   186 
       
   187 enum TWEPAuthentication
       
   188     {
       
   189     EAuthOpen,              // Open authentication
       
   190     EAuthShared             // Shared authentication
       
   191     };
       
   192     
       
   193 // DATA TYPES
       
   194 
       
   195 /**
       
   196 * Data structure for storing a WEP key.
       
   197 */
       
   198 struct TWep
       
   199     {
       
   200     /** Specifies which key to add or remove. Range: 0-3 */
       
   201     TUint32 KeyIndex;
       
   202     /** The length of KeyMaterial in bytes. Range: 0-29 */
       
   203     TUint32 KeyLength;
       
   204     /** Array that stores the WEP key. */
       
   205     TUint8 KeyMaterial[KMaxWEPKeyLength];
       
   206     };
       
   207 
       
   208 /**
       
   209 * Data structure for storing a WPA Pre-Shared Key.
       
   210 */
       
   211 struct TWpaPsk
       
   212 	{
       
   213 	/** The length of KeyMaterial in bytes. Range: 0-63 */
       
   214 	TUint KeyLength;
       
   215 	/** Array of that stores the WPA Pre-Shared Key. */
       
   216 	TUint8 KeyMaterial[KMaxWpaPskLength];
       
   217 	};
       
   218 
       
   219 
       
   220 
       
   221 #endif // WPAPDEFS_H
       
   222 
       
   223 // End of File.