00001 /* ==================================================================== 00002 * The Kannel Software License, Version 1.0 00003 * 00004 * Copyright (c) 2001-2008 Kannel Group 00005 * Copyright (c) 1998-2001 WapIT Ltd. 00006 * All rights reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions 00010 * are met: 00011 * 00012 * 1. Redistributions of source code must retain the above copyright 00013 * notice, this list of conditions and the following disclaimer. 00014 * 00015 * 2. Redistributions in binary form must reproduce the above copyright 00016 * notice, this list of conditions and the following disclaimer in 00017 * the documentation and/or other materials provided with the 00018 * distribution. 00019 * 00020 * 3. The end-user documentation included with the redistribution, 00021 * if any, must include the following acknowledgment: 00022 * "This product includes software developed by the 00023 * Kannel Group (http://www.kannel.org/)." 00024 * Alternately, this acknowledgment may appear in the software itself, 00025 * if and wherever such third-party acknowledgments normally appear. 00026 * 00027 * 4. The names "Kannel" and "Kannel Group" must not be used to 00028 * endorse or promote products derived from this software without 00029 * prior written permission. For written permission, please 00030 * contact org@kannel.org. 00031 * 00032 * 5. Products derived from this software may not be called "Kannel", 00033 * nor may "Kannel" appear in their name, without prior written 00034 * permission of the Kannel Group. 00035 * 00036 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 00037 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00038 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00039 * DISCLAIMED. IN NO EVENT SHALL THE KANNEL GROUP OR ITS CONTRIBUTORS 00040 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 00041 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 00042 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 00043 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00044 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 00045 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00046 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00047 * ==================================================================== 00048 * 00049 * This software consists of voluntary contributions made by many 00050 * individuals on behalf of the Kannel Group. For more information on 00051 * the Kannel Group, please see <http://www.kannel.org/>. 00052 * 00053 * Portions of this software are based upon software originally written at 00054 * WapIT Ltd., Helsinki, Finland for the Kannel project. 00055 */ 00056 00057 /* 00058 * ota_prov_attr.h: binary encoded XML tag constants for the OTA provisioning 00059 * 00060 * In order to make handsets accept browser settings sent over the air, the 00061 * settings must be provided in a binary encoded XML document with a specific 00062 * MIME-type depending on the setting type. The settings must be pushed over 00063 * SMS to a predefined WDP (Wireless Datagram Protocol) port (49999) as a WSP 00064 * (Wirless Session Protocol) connection less unsecure push. Handsets able to 00065 * receive settings over the air must always listen on this port. 00066 * 00067 * Two setting MIME-types are defined: 00068 * 00069 * - application/x-wap-prov.browser-settings 00070 * - application/x-wap-prov.browser-bookmarks 00071 * 00072 * Description of the XML DTD (Document Type Definition): 00073 * 00074 * <!ELEMENT CHARACTERISTIC-LIST(CHARACTERISTIC)+> 00075 * <!ELEMENT CHARACTERISTIC(PARM*)> 00076 * <!ATTLIST CHARACTERISTIC 00077 * TYPE CDATA #REQUIRED 00078 * VALUE CDATA #IMPLIED 00079 * > 00080 * <!ELEMENT PARM EMPTY> 00081 * <!ATTLIST PARM 00082 * NAME CDATA #REQUIRED 00083 * VALUE CDATA #REQUIRED 00084 * > 00085 * 00086 * Simple example of a XML document: 00087 * 00088 * <?xml version="1.0"?> 00089 * <!DOCTYPE CHARACTERISTIC-LIST SYSTEM "/DTD/characteristic_list.xml"> 00090 * <CHARACTERISTIC-LIST> 00091 * <CHARACTERISTIC TYPE="ADDRESS"> 00092 * <PARM NAME="BEARER" VALUE="GSM/CSD"/> 00093 * <PARM NAME="PROXY" VALUE="10.11.12.13"/> 00094 * <PARM NAME="CSD_DIALSTRING" VALUE="013456789"/> 00095 * <PARM NAME="PPP_AUTHTYPE" VALUE="PAP"/> 00096 * <PARM NAME="PPP_AUTHNAME" VALUE="wapusr"/> 00097 * <PARM NAME="PPP_AUTHSECRET" VALUE"thepasswd"/> 00098 * </CHARACTERISTIC> 00099 * <CHARACTERISTIC TYPE="NAME"> 00100 * <PARM NAME="NAME" VALUE="Our company's WAP settings"/> 00101 * </CHARACTERISTIC> 00102 * <CHARACTERISTIC TYPE="URL" VALUE="http://wap.company.com"/> 00103 * <CHARACTERISTIC TYPE="MMSURL" VALUE="http://mms.company.com"/> 00104 * <CHARACTERISTIC TYPE="BOOKMARK"> 00105 * <PARM NAME="NAME" VALUE="Our company's WAP site"/> 00106 * <PARM NAME="URL" VALUE="http://wap.company.com"/> 00107 * </CHARACTERISTIC> 00108 * </CHARACTERISTIC-LIST> 00109 * 00110 * (based upon the Nokia Over The Air Settings Specification) 00111 * 00112 * initial re-engineered code by Yann Muller - 3G Lab, 2000. 00113 * fixed to support official specs by Stipe Tolj - Wapme Systems AG, 2001. 00114 * extensive inline documentation by Stipe Tolj - Wapme Systems AG, 2001. 00115 */ 00116 00117 /* 00118 * The XML document which is build in smsbox.c:smsbox_req_sendota() is 00119 * binary encoded according to WBXML with the following global tokens 00120 */ 00121 00122 #define WBXML_TOK_END_STR_I 0x00 00123 #define WBXML_TOK_END 0x01 00124 #define WBXML_TOK_STR_I 0x03 00125 00126 00127 /******************************************************************** 00128 * Description of the single XML tag tokens 00129 */ 00130 00131 #define WBXML_TOK_CHARACTERISTIC_LIST 0x05 00132 00133 /* 00134 * This element groups the browser settings into logical different types: 00135 * ADDRESS, BOOKMARK, URL, MMSURL, NAME and ID. 00136 */ 00137 #define WBXML_TOK_CHARACTERISTIC 0x06 00138 00139 /* 00140 * The PARM element is used to provide the actual value for the individual 00141 * settings parameters within each CHARACTERISTIC element. 00142 */ 00143 #define WBXML_TOK_PARM 0x07 00144 00145 /* 00146 * Tokens representing the NAME or VALUE tags 00147 */ 00148 #define WBXML_TOK_NAME 0x10 00149 #define WBXML_TOK_VALUE 0x11 00150 00151 00152 /******************************************************************** 00153 * CHARACTERISTIC elements with TYPE=ADDRESS 00154 * 00155 * Characteristics elements with the TYPE=ADDRESS attribute embrace settings 00156 * concerning a particular bearer, e.g. GSM/SMS or GSM/CSD. Several address 00157 * settings can be provided in one document. However, for each bearer, only 00158 * the address settings listed first will be used. The type of the bearer is 00159 * specified by a PARM attribute and depending on the bearer additional PARM 00160 * elements are required or optional. 00161 * 00162 * Example: 00163 * 00164 * <CHARACTERISTIC TYPE="ADDRESS"> 00165 * <PARM NAME="BEARER" VALUE="GSM/CSD"/> 00166 * <PARM NAME="PROXY" VALUE="10.11.12.13"/> 00167 * <PARM NAME="CSD_DIALSTRING" VALUE="013456789"/> 00168 * <PARM NAME="PPP_AUTHTYPE" VALUE="PAP"/> 00169 * <PARM NAME="PPP_AUTHNAME" VALUE="wapusr"/> 00170 * <PARM NAME="PPP_AUTHSECRET" VALUE"thepasswd"/> 00171 * </CHARACTERISTIC> 00172 */ 00173 00174 #define WBXML_TOK_TYPE_ADDRESS 0x06 00175 00176 /* 00177 * The PARM element with NAME=BEARER attribute is used to identify the bearer 00178 * to be used for a specific setting set. VALUE can be assigned following: 00179 * 00180 * VALUE -> [*GSM_CSD*|GSM_SMS|GSM_USSD|IS136_CSD|GPRS] 00181 */ 00182 #define WBXML_TOK_NAME_BEARER 0x12 00183 00184 #define WBXML_TOK_VALUE_GSM_CSD 0x45 00185 #define WBXML_TOK_VALUE_GSM_SMS 0x46 00186 #define WBXML_TOK_VALUE_GSM_USSD 0x47 00187 #define WBXML_TOK_VALUE_IS136_CSD 0x48 00188 #define WBXML_TOK_VALUE_GPRS 0x49 00189 00190 /* 00191 * The PARM element with NAME=PROXY attribute is used to identify the IP 00192 * address of the WAP proxy in case of CSD and the service number in case of 00193 * SMS. In case of USSD the PROXY can be either an IP address or an MSISDN 00194 * number. This is indicated in the PROXY_TYPE PARM element. VALUE can be 00195 * assigned following: 00196 * 00197 * VALUE -> proxy(using inline string) 00198 */ 00199 #define WBXML_TOK_NAME_PROXY 0x13 00200 00201 /* 00202 * The PARM element with NAME=PORT attribute specifies whether connection less 00203 * or connection oriented connections should be used. VALUE can be assigned 00204 * following: 00205 * 00206 * VALUE -> [*9200*|9201|9202|9203] 00207 * 00208 * Use 9200 (or 9202) for connection less connections and 9201 (or 9203) for 00209 * connection oriented connections. Port numbers 9202 and 9203 enable secure 00210 * connections (by means of WTLS), whereas port numbers 9200 and 9201 disable 00211 * secure connections. 00212 */ 00213 #define WBXML_TOK_NAME_PORT 0x14 00214 00215 #define WBXML_TOK_VALUE_PORT_9200 0x60 00216 #define WBXML_TOK_VALUE_PORT_9201 0x61 00217 #define WBXML_TOK_VALUE_PORT_9202 0x62 00218 #define WBXML_TOK_VALUE_PORT_9203 0x63 00219 00220 /* 00221 * The PARM element with the NAME=PROXY_TYPE attribute is used to identify 00222 * the format of the PROXY PARM element. VALUE can be assigned following: 00223 * 00224 * VALUE -> [*MSISDN_NO*|IPV4] 00225 */ 00226 #define WBXML_TOK_NAME_PROXY_TYPE 0x16 00227 00228 #define WBXML_TOK_VALUE_MSISDN_NO 0x76 00229 #define WBXML_TOK_VALUE_IPV4 0x77 00230 00231 /* 00232 * The PARM elements with the NAME=PROXY_AUTHNAME and NAME=PROXY_AUTHSECRET 00233 * attributes indicates the login name and password to be used for gateway 00234 * required authentication. Support of this PARM elements is manufacturer 00235 * specific. VALUEs can be assigned following: 00236 * 00237 * VALUE -> login name(using inline string) 00238 * VALUE -> password(using inline string) 00239 */ 00240 #define WBXML_TOK_NAME_PROXY_AUTHNAME 0x18 00241 #define WBXML_TOK_NAME_PROXY_AUTHSECRET 0x19 00242 00243 /* 00244 * The PARM element with the NAME=PROXY_LOGINTYPE attribute specifies whether 00245 * an automatic or manual login should be performed at the proxy. VALUE can 00246 * be assigned following: 00247 * 00248 * VALUE -> [AUTOMATIC|MANUAL] 00249 * 00250 * Using the MANUAL logintype the user will be prompted for username and 00251 * password when a browse session is started. Using the AUTOMATIC logintype 00252 * the user will be NOT prompted for username and password when a browse 00253 * session is started, but a static name and password from the WAP settingset 00254 * will be used. 00255 */ 00256 #define WBXML_TOK_NAME_PROXY_LOGINTYPE 0x1E 00257 00258 #define WBXML_TOK_VALUE_AUTOMATIC 0x64 00259 #define WBXML_TOK_VALUE_MANUAL 0x65 00260 00261 /* 00262 * The PARM element with the NAME=PPP_AUTHTYPE attribute indicates which 00263 * protocol to use for user authentication. VALUE can be assigned following: 00264 * 00265 * VALUE -> [*PAP*|CHAP|MS_CHAP] 00266 * 00267 * PAP is short for Password Authentication Protocol, a type of authentication 00268 * which uses clear-text passwords and is the least sophisticated 00269 * authentication protocol, and CHAP stands for Challenge Handshake 00270 * Authentication Protocol, a protocol used to negotiate the most secure form 00271 * of encrypted authentication supported by both server and client. MS_CHAP 00272 * (Microsoft(tm)-CHAP) is similar to the CHAP protocol, but is using an 00273 * encryption scheme that is alternative to the one used for CHAP. 00274 */ 00275 #define WBXML_TOK_NAME_PPP_AUTHTYPE 0x22 00276 00277 #define WBXML_TOK_VALUE_AUTH_PAP 0x70 00278 #define WBXML_TOK_VALUE_AUTH_CHAP 0x71 00279 #define WBXML_TOK_VALUE_AUTH_MS_CHAP 0x78 00280 00281 /* 00282 * The PARM elements with the NAME=PPP_AUTHNAME and NAME=PPP_AUTHSECRET 00283 * attributes indicate the login name and password to be used. VALUEs can be 00284 * assigned following: 00285 * 00286 * VALUE -> login name(using inline string) 00287 * VALUE -> password(using inline string) 00288 * 00289 * Maximum length of login name is 32 bytes. 00290 * Maximum length of password is 20 bytes. 00291 */ 00292 #define WBXML_TOK_NAME_PPP_AUTHNAME 0x23 00293 #define WBXML_TOK_NAME_PPP_AUTHSECRET 0x24 00294 00295 /* 00296 * The PARM element with the NAME=PPP_LOGINTYPE attribute specifies whether an 00297 * automatic or manual login should be performed in the PPP negotiation at the 00298 * access point of the service provider. VALUE can be assigned following 00299 * 00300 * VALUE -> [AUTOMATIC|MANUAL] 00301 * 00302 * (same impacts as for PROXY_LOGINTYPE) 00303 */ 00304 #define WBXML_TOK_NAME_PPP_LOGINTYPE 0x1D 00305 00306 /* 00307 * The PARM element with the NAME=CSD_DIALSTRING attribute specifies the 00308 * MSISDN number of the modem pool. VALUE can be assigned following: 00309 * 00310 * VALUE -> msisdn number(using inline string) 00311 * 00312 * Maximum length of msisdn number is 21 bytes. 00313 */ 00314 #define WBXML_TOK_NAME_CSD_DIALSTRING 0x21 00315 00316 /* 00317 * The PARM element with the NAME=CSD_CALLTYPE attribute indicates the type 00318 * of circuit switched call to be used for connection. VALUE can be assigned 00319 * following: 00320 * 00321 * VALUE -> [*ANALOGUE*|ISDN] 00322 * 00323 * (In general the call type should be set to ANALOGUE since ISDN is not 00324 * generaly available on all networks.) 00325 */ 00326 #define WBXML_TOK_NAME_CSD_CALLTYPE 0x28 00327 00328 #define WBXML_TOK_VALUE_CONN_ANALOGUE 0x72 00329 #define WBXML_TOK_VALUE_CONN_ISDN 0x73 00330 00331 /* 00332 * The PARM element with the NAME=CSD_CALLSPEED attribute indicates the 00333 * desired call speed to be used for the connection. VALUE can be assgined 00334 * following: 00335 * 00336 * VALUE -> [*AUTO*|*9600*|14400|19200|28800|38400|43200|57600] 00337 * 00338 * Default value is AUTO when CSD_CALLTYPE is ANALOGUE and 9600 when 00339 * CSD_CALLTYPE is ISDN. 00340 */ 00341 #define WBXML_TOK_NAME_CSD_CALLSPEED 0x29 00342 00343 #define WBXML_TOK_VALUE_SPEED_AUTO 0x6A 00344 #define WBXML_TOK_VALUE_SPEED_9600 0x6B 00345 #define WBXML_TOK_VALUE_SPEED_14400 0x6C 00346 #define WBXML_TOK_VALUE_SPEED_19200 0x6D 00347 #define WBXML_TOK_VALUE_SPEED_28800 0x6E 00348 #define WBXML_TOK_VALUE_SPEED_38400 0x6F 00349 #define WBXML_TOK_VALUE_SPEED_43200 0x74 00350 #define WBXML_TOK_VALUE_SPEED_57600 0x75 00351 00352 /* 00353 * The PARM element with the NAME=ISP_NAME attribute indicates the name of the 00354 * Internet Service Provider. Support of this PARM element is manufacturer 00355 * specific. VALUE can be assigned following: 00356 * 00357 * VALUE -> isp name(using inline string) 00358 * 00359 * Maximum length of isp name is 20 bytes. 00360 */ 00361 #define WBXML_TOK_NAME_ISP_NAME 0x7E 00362 00363 /* 00364 * The PARM element with the NAME=SMS_SMSC_ADDRESS attribute indicates the 00365 * MSISDN number of the SMS Service Center (SMSC). VALUE can be assigned 00366 * following: 00367 * 00368 * VALUE -> sms smsc address(using inline string) 00369 * 00370 * Maximum length of sms smsc address is 21 bytes. 00371 */ 00372 #define WBXML_TOK_NAME_SMS_SMSC_ADDRESS 0x1A 00373 00374 /* 00375 * The PARM element with the name NAME=USSD_SERVICE_CODE attribute indicates 00376 * the USSD service code. VALUE can be assigned following: 00377 * 00378 * VALUE -> ussd service code(using inline string) 00379 * 00380 * Maximum length of ussd service code is 10 bytes. 00381 */ 00382 #define WBXML_TOK_NAME_USSD_SERVICE_CODE 0x1B 00383 00384 /* 00385 * The PARM element with the NAME=GPRS_ACCESSPOINTNAME attribute indicates 00386 * the access point name on Gateway GRPS Support Nodes (GGSN). Allowed 00387 * characters are: ['a'-'z','A'-'Z','0'-'9','.','-','*'] 00388 * 00389 * VALUE -> acess point name(using inline string) 00390 * 00391 * Maximum length of access point name is 100 bytes. 00392 */ 00393 #define WBXML_TOK_NAME_GPRS_ACCESSPOINTNAME 0x1C 00394 00395 00396 /******************************************************************** 00397 * CHARACTERISTIC elements with TYPE=URL 00398 * 00399 * The CHARACTERISTIC element with the TYPE=URL attribute has only one 00400 * attribute which indicates the URL of the home page. VALUES can be assigned 00401 * following: 00402 * 00403 * VALUE -> url(using inline string) 00404 * 00405 * Maximum length of URL is 100 bytes. 00406 * 00407 * Example: 00408 * 00409 * <CHARACTERISTIC TYPE="URL" VALUE="http://wap.company.com"/> 00410 */ 00411 00412 #define WBXML_TOK_TYPE_URL 0x07 00413 00414 00415 /******************************************************************** 00416 * CHARACTERISTIC elements with TYPE=MMSURL 00417 * 00418 * The CHARACTERISTIC element with the TYPE=MMSURL attribute has only one 00419 * attribute which indicates the URL of the MMSC. VALUES can be assigned 00420 * following: 00421 * 00422 * VALUE -> url(using inline string) 00423 * 00424 * Maximum length of URL is 100 bytes. 00425 * 00426 * Example: 00427 * 00428 * <CHARACTERISTIC TYPE="MMSURL" VALUE="http://wap.company.com/mmsc"/> 00429 */ 00430 00431 #define WBXML_TOK_TYPE_MMSURL 0x7C 00432 00433 00434 /******************************************************************** 00435 * CHARACTERISTIC elements with TYPE=NAME 00436 * 00437 * This element type must contain exactly one PARM element with NAME=NAME, 00438 * which states the user-recognisable name to apply for the settings. The 00439 * VALUE of the PARM element can be assigned following: 00440 * 00441 * VALUE -> name(using inline string) 00442 * 00443 * Maximum length of name is 20 bytes. 00444 * 00445 * Example: 00446 * 00447 * <CHARACTERISTIC TYPE="NAME"> 00448 * <PARM NAME="NAME" VALUE="Our company's WAP settings"/> 00449 * </CHARACTERISTIC> 00450 */ 00451 00452 #define WBXML_TOK_TYPE_NAME 0x08 00453 00454 00455 /******************************************************************** 00456 * CHARACTERISTIC elements with TYPE=BOOKMARK 00457 * 00458 * This element must contain exactly two PARM elements, which define the 00459 * name and URL for a homepage or for bookmarks. 00460 * 00461 * When this element is used with the MIME-type *.browser-settings the first 00462 * element indicates the homepage to be used together with the corresponding 00463 * settings. Note that the URL included in this element and the CHARACTERISTIC 00464 * element TYPE=URL are both required to define a homepage and their content 00465 * must be equal. A homepage and several bookmarks can be provided in one 00466 * document of the MIME-type referred to above. However, the maximum number of 00467 * bookmarks accepted is manufacturer specific. 00468 * 00469 * When this element is used with the MIME-type *.browser-bookmarks the 00470 * element indicates bookmarks only 00471 * 00472 * Example: 00473 * 00474 * <CHARACTERISTIC TYPE="BOOKMARK"> 00475 * <PARM NAME="NAME" VALUE="Our company's WAP site"/> 00476 * <PARM NAME="URL" VALUE="http://wap.company.com"/> 00477 * </CHARACTERISTIC> 00478 */ 00479 00480 #define WBXML_TOK_TYPE_BOOKMARK 0x7F 00481 00482 /* 00483 * The PARM element with the NAME=NAME attribute indicates the name of the 00484 * bookmark or homepage. VALUE can be assigned following: 00485 * 00486 * VALUE -> bookmark name(using inline string) 00487 * 00488 * Maximum length of bookmark name is 50 bytes. 00489 */ 00490 #define WBXML_TOK_NAME_NAME 0x15 00491 00492 /* 00493 * The PARM element with the NAME=URL attribute indicates the URL of the 00494 * bookmark or homepage. VALUE can be assigned following: 00495 * 00496 * VALUE -> bookmark url(using inline string) 00497 * 00498 * Maximum length of bookmark url is 255 bytes. 00499 */ 00500 #define WBXML_TOK_NAME_URL 0x17 00501 00502 00503 /******************************************************************** 00504 * CHARACTERISTIC elements with TYPE=ID 00505 * 00506 * This element type must contain exactly one PARM element, which defines an 00507 * ID to be used to provide some security to the provisioning application. 00508 * The ID should be known by the subscriber through the subscription or 00509 * through other communication with the operator. When provisioning data 00510 * containing the ID is received the user is able to verify the received ID 00511 * with the ID previously received by other means from the operator. Support 00512 * of this CHARACTERISTIC element is manufacturer specific. 00513 * 00514 * Example: 00515 * 00516 * <CHARACTERISTIC TYPE="ID"> 00517 * <PARM NAME="NAME" VALUE="12345678"/> 00518 * </CHARACTERISTIC> 00519 */ 00520 00521 #define WBXML_TOK_TYPE_ID 0x7D 00522 00523 /* 00524 * The PARM elment with the NAME=NAME attribute indicates the ID. VALUE can be 00525 * assigned following: 00526 * 00527 * VALUE -> id(using inline string) 00528 * 00529 * Maximum length of id is 8 bytes. 00530 */ 00531 00532 /* end of ota_prov_attr.h */