Kannel: Open Source WAP and SMS gateway  svn-r5335
ota_prov_attr.h
Go to the documentation of this file.
1 /* ====================================================================
2  * The Kannel Software License, Version 1.0
3  *
4  * Copyright (c) 2001-2018 Kannel Group
5  * Copyright (c) 1998-2001 WapIT Ltd.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * 3. The end-user documentation included with the redistribution,
21  * if any, must include the following acknowledgment:
22  * "This product includes software developed by the
23  * Kannel Group (http://www.kannel.org/)."
24  * Alternately, this acknowledgment may appear in the software itself,
25  * if and wherever such third-party acknowledgments normally appear.
26  *
27  * 4. The names "Kannel" and "Kannel Group" must not be used to
28  * endorse or promote products derived from this software without
29  * prior written permission. For written permission, please
30  * contact org@kannel.org.
31  *
32  * 5. Products derived from this software may not be called "Kannel",
33  * nor may "Kannel" appear in their name, without prior written
34  * permission of the Kannel Group.
35  *
36  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39  * DISCLAIMED. IN NO EVENT SHALL THE KANNEL GROUP OR ITS CONTRIBUTORS
40  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
41  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
42  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
43  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
44  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
45  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
46  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47  * ====================================================================
48  *
49  * This software consists of voluntary contributions made by many
50  * individuals on behalf of the Kannel Group. For more information on
51  * the Kannel Group, please see <http://www.kannel.org/>.
52  *
53  * Portions of this software are based upon software originally written at
54  * WapIT Ltd., Helsinki, Finland for the Kannel project.
55  */
56 
57 /*
58  * ota_prov_attr.h: binary encoded XML tag constants for the OTA provisioning
59  *
60  * In order to make handsets accept browser settings sent over the air, the
61  * settings must be provided in a binary encoded XML document with a specific
62  * MIME-type depending on the setting type. The settings must be pushed over
63  * SMS to a predefined WDP (Wireless Datagram Protocol) port (49999) as a WSP
64  * (Wirless Session Protocol) connection less unsecure push. Handsets able to
65  * receive settings over the air must always listen on this port.
66  *
67  * Two setting MIME-types are defined:
68  *
69  * - application/x-wap-prov.browser-settings
70  * - application/x-wap-prov.browser-bookmarks
71  *
72  * Description of the XML DTD (Document Type Definition):
73  *
74  * <!ELEMENT CHARACTERISTIC-LIST(CHARACTERISTIC)+>
75  * <!ELEMENT CHARACTERISTIC(PARM*)>
76  * <!ATTLIST CHARACTERISTIC
77  * TYPE CDATA #REQUIRED
78  * VALUE CDATA #IMPLIED
79  * >
80  * <!ELEMENT PARM EMPTY>
81  * <!ATTLIST PARM
82  * NAME CDATA #REQUIRED
83  * VALUE CDATA #REQUIRED
84  * >
85  *
86  * Simple example of a XML document:
87  *
88  * <?xml version="1.0"?>
89  * <!DOCTYPE CHARACTERISTIC-LIST SYSTEM "/DTD/characteristic_list.xml">
90  * <CHARACTERISTIC-LIST>
91  * <CHARACTERISTIC TYPE="ADDRESS">
92  * <PARM NAME="BEARER" VALUE="GSM/CSD"/>
93  * <PARM NAME="PROXY" VALUE="10.11.12.13"/>
94  * <PARM NAME="CSD_DIALSTRING" VALUE="013456789"/>
95  * <PARM NAME="PPP_AUTHTYPE" VALUE="PAP"/>
96  * <PARM NAME="PPP_AUTHNAME" VALUE="wapusr"/>
97  * <PARM NAME="PPP_AUTHSECRET" VALUE"thepasswd"/>
98  * </CHARACTERISTIC>
99  * <CHARACTERISTIC TYPE="NAME">
100  * <PARM NAME="NAME" VALUE="Our company's WAP settings"/>
101  * </CHARACTERISTIC>
102  * <CHARACTERISTIC TYPE="URL" VALUE="http://wap.company.com"/>
103  * <CHARACTERISTIC TYPE="MMSURL" VALUE="http://mms.company.com"/>
104  * <CHARACTERISTIC TYPE="BOOKMARK">
105  * <PARM NAME="NAME" VALUE="Our company's WAP site"/>
106  * <PARM NAME="URL" VALUE="http://wap.company.com"/>
107  * </CHARACTERISTIC>
108  * </CHARACTERISTIC-LIST>
109  *
110  * (based upon the Nokia Over The Air Settings Specification)
111  *
112  * initial re-engineered code by Yann Muller - 3G Lab, 2000.
113  * fixed to support official specs by Stipe Tolj - Wapme Systems AG, 2001.
114  * extensive inline documentation by Stipe Tolj - Wapme Systems AG, 2001.
115  */
116 
117  /*
118  * The XML document which is build in smsbox.c:smsbox_req_sendota() is
119  * binary encoded according to WBXML with the following global tokens
120  */
121 
122 #define WBXML_TOK_END_STR_I 0x00
123 #define WBXML_TOK_END 0x01
124 #define WBXML_TOK_STR_I 0x03
125 
126 
127 /********************************************************************
128  * Description of the single XML tag tokens
129  */
130 
131 #define WBXML_TOK_CHARACTERISTIC_LIST 0x05
132 
133 /*
134  * This element groups the browser settings into logical different types:
135  * ADDRESS, BOOKMARK, URL, MMSURL, NAME and ID.
136  */
137 #define WBXML_TOK_CHARACTERISTIC 0x06
138 
139 /*
140  * The PARM element is used to provide the actual value for the individual
141  * settings parameters within each CHARACTERISTIC element.
142  */
143 #define WBXML_TOK_PARM 0x07
144 
145 /*
146  * Tokens representing the NAME or VALUE tags
147  */
148 #define WBXML_TOK_NAME 0x10
149 #define WBXML_TOK_VALUE 0x11
150 
151 
152 /********************************************************************
153  * CHARACTERISTIC elements with TYPE=ADDRESS
154  *
155  * Characteristics elements with the TYPE=ADDRESS attribute embrace settings
156  * concerning a particular bearer, e.g. GSM/SMS or GSM/CSD. Several address
157  * settings can be provided in one document. However, for each bearer, only
158  * the address settings listed first will be used. The type of the bearer is
159  * specified by a PARM attribute and depending on the bearer additional PARM
160  * elements are required or optional.
161  *
162  * Example:
163  *
164  * <CHARACTERISTIC TYPE="ADDRESS">
165  * <PARM NAME="BEARER" VALUE="GSM/CSD"/>
166  * <PARM NAME="PROXY" VALUE="10.11.12.13"/>
167  * <PARM NAME="CSD_DIALSTRING" VALUE="013456789"/>
168  * <PARM NAME="PPP_AUTHTYPE" VALUE="PAP"/>
169  * <PARM NAME="PPP_AUTHNAME" VALUE="wapusr"/>
170  * <PARM NAME="PPP_AUTHSECRET" VALUE"thepasswd"/>
171  * </CHARACTERISTIC>
172  */
173 
174 #define WBXML_TOK_TYPE_ADDRESS 0x06
175 
176 /*
177  * The PARM element with NAME=BEARER attribute is used to identify the bearer
178  * to be used for a specific setting set. VALUE can be assigned following:
179  *
180  * VALUE -> [*GSM_CSD*|GSM_SMS|GSM_USSD|IS136_CSD|GPRS]
181  */
182 #define WBXML_TOK_NAME_BEARER 0x12
183 
184 #define WBXML_TOK_VALUE_GSM_CSD 0x45
185 #define WBXML_TOK_VALUE_GSM_SMS 0x46
186 #define WBXML_TOK_VALUE_GSM_USSD 0x47
187 #define WBXML_TOK_VALUE_IS136_CSD 0x48
188 #define WBXML_TOK_VALUE_GPRS 0x49
189 
190 /*
191  * The PARM element with NAME=PROXY attribute is used to identify the IP
192  * address of the WAP proxy in case of CSD and the service number in case of
193  * SMS. In case of USSD the PROXY can be either an IP address or an MSISDN
194  * number. This is indicated in the PROXY_TYPE PARM element. VALUE can be
195  * assigned following:
196  *
197  * VALUE -> proxy(using inline string)
198  */
199 #define WBXML_TOK_NAME_PROXY 0x13
200 
201 /*
202  * The PARM element with NAME=PORT attribute specifies whether connection less
203  * or connection oriented connections should be used. VALUE can be assigned
204  * following:
205  *
206  * VALUE -> [*9200*|9201|9202|9203]
207  *
208  * Use 9200 (or 9202) for connection less connections and 9201 (or 9203) for
209  * connection oriented connections. Port numbers 9202 and 9203 enable secure
210  * connections (by means of WTLS), whereas port numbers 9200 and 9201 disable
211  * secure connections.
212  */
213 #define WBXML_TOK_NAME_PORT 0x14
214 
215 #define WBXML_TOK_VALUE_PORT_9200 0x60
216 #define WBXML_TOK_VALUE_PORT_9201 0x61
217 #define WBXML_TOK_VALUE_PORT_9202 0x62
218 #define WBXML_TOK_VALUE_PORT_9203 0x63
219 
220 /*
221  * The PARM element with the NAME=PROXY_TYPE attribute is used to identify
222  * the format of the PROXY PARM element. VALUE can be assigned following:
223  *
224  * VALUE -> [*MSISDN_NO*|IPV4]
225  */
226 #define WBXML_TOK_NAME_PROXY_TYPE 0x16
227 
228 #define WBXML_TOK_VALUE_MSISDN_NO 0x76
229 #define WBXML_TOK_VALUE_IPV4 0x77
230 
231 /*
232  * The PARM elements with the NAME=PROXY_AUTHNAME and NAME=PROXY_AUTHSECRET
233  * attributes indicates the login name and password to be used for gateway
234  * required authentication. Support of this PARM elements is manufacturer
235  * specific. VALUEs can be assigned following:
236  *
237  * VALUE -> login name(using inline string)
238  * VALUE -> password(using inline string)
239  */
240 #define WBXML_TOK_NAME_PROXY_AUTHNAME 0x18
241 #define WBXML_TOK_NAME_PROXY_AUTHSECRET 0x19
242 
243 /*
244  * The PARM element with the NAME=PROXY_LOGINTYPE attribute specifies whether
245  * an automatic or manual login should be performed at the proxy. VALUE can
246  * be assigned following:
247  *
248  * VALUE -> [AUTOMATIC|MANUAL]
249  *
250  * Using the MANUAL logintype the user will be prompted for username and
251  * password when a browse session is started. Using the AUTOMATIC logintype
252  * the user will be NOT prompted for username and password when a browse
253  * session is started, but a static name and password from the WAP settingset
254  * will be used.
255  */
256 #define WBXML_TOK_NAME_PROXY_LOGINTYPE 0x1E
257 
258 #define WBXML_TOK_VALUE_AUTOMATIC 0x64
259 #define WBXML_TOK_VALUE_MANUAL 0x65
260 
261 /*
262  * The PARM element with the NAME=PPP_AUTHTYPE attribute indicates which
263  * protocol to use for user authentication. VALUE can be assigned following:
264  *
265  * VALUE -> [*PAP*|CHAP|MS_CHAP]
266  *
267  * PAP is short for Password Authentication Protocol, a type of authentication
268  * which uses clear-text passwords and is the least sophisticated
269  * authentication protocol, and CHAP stands for Challenge Handshake
270  * Authentication Protocol, a protocol used to negotiate the most secure form
271  * of encrypted authentication supported by both server and client. MS_CHAP
272  * (Microsoft(tm)-CHAP) is similar to the CHAP protocol, but is using an
273  * encryption scheme that is alternative to the one used for CHAP.
274  */
275 #define WBXML_TOK_NAME_PPP_AUTHTYPE 0x22
276 
277 #define WBXML_TOK_VALUE_AUTH_PAP 0x70
278 #define WBXML_TOK_VALUE_AUTH_CHAP 0x71
279 #define WBXML_TOK_VALUE_AUTH_MS_CHAP 0x78
280 
281 /*
282  * The PARM elements with the NAME=PPP_AUTHNAME and NAME=PPP_AUTHSECRET
283  * attributes indicate the login name and password to be used. VALUEs can be
284  * assigned following:
285  *
286  * VALUE -> login name(using inline string)
287  * VALUE -> password(using inline string)
288  *
289  * Maximum length of login name is 32 bytes.
290  * Maximum length of password is 20 bytes.
291  */
292 #define WBXML_TOK_NAME_PPP_AUTHNAME 0x23
293 #define WBXML_TOK_NAME_PPP_AUTHSECRET 0x24
294 
295 /*
296  * The PARM element with the NAME=PPP_LOGINTYPE attribute specifies whether an
297  * automatic or manual login should be performed in the PPP negotiation at the
298  * access point of the service provider. VALUE can be assigned following
299  *
300  * VALUE -> [AUTOMATIC|MANUAL]
301  *
302  * (same impacts as for PROXY_LOGINTYPE)
303  */
304 #define WBXML_TOK_NAME_PPP_LOGINTYPE 0x1D
305 
306 /*
307  * The PARM element with the NAME=CSD_DIALSTRING attribute specifies the
308  * MSISDN number of the modem pool. VALUE can be assigned following:
309  *
310  * VALUE -> msisdn number(using inline string)
311  *
312  * Maximum length of msisdn number is 21 bytes.
313  */
314 #define WBXML_TOK_NAME_CSD_DIALSTRING 0x21
315 
316 /*
317  * The PARM element with the NAME=CSD_CALLTYPE attribute indicates the type
318  * of circuit switched call to be used for connection. VALUE can be assigned
319  * following:
320  *
321  * VALUE -> [*ANALOGUE*|ISDN]
322  *
323  * (In general the call type should be set to ANALOGUE since ISDN is not
324  * generaly available on all networks.)
325  */
326 #define WBXML_TOK_NAME_CSD_CALLTYPE 0x28
327 
328 #define WBXML_TOK_VALUE_CONN_ANALOGUE 0x72
329 #define WBXML_TOK_VALUE_CONN_ISDN 0x73
330 
331 /*
332  * The PARM element with the NAME=CSD_CALLSPEED attribute indicates the
333  * desired call speed to be used for the connection. VALUE can be assgined
334  * following:
335  *
336  * VALUE -> [*AUTO*|*9600*|14400|19200|28800|38400|43200|57600]
337  *
338  * Default value is AUTO when CSD_CALLTYPE is ANALOGUE and 9600 when
339  * CSD_CALLTYPE is ISDN.
340  */
341 #define WBXML_TOK_NAME_CSD_CALLSPEED 0x29
342 
343 #define WBXML_TOK_VALUE_SPEED_AUTO 0x6A
344 #define WBXML_TOK_VALUE_SPEED_9600 0x6B
345 #define WBXML_TOK_VALUE_SPEED_14400 0x6C
346 #define WBXML_TOK_VALUE_SPEED_19200 0x6D
347 #define WBXML_TOK_VALUE_SPEED_28800 0x6E
348 #define WBXML_TOK_VALUE_SPEED_38400 0x6F
349 #define WBXML_TOK_VALUE_SPEED_43200 0x74
350 #define WBXML_TOK_VALUE_SPEED_57600 0x75
351 
352 /*
353  * The PARM element with the NAME=ISP_NAME attribute indicates the name of the
354  * Internet Service Provider. Support of this PARM element is manufacturer
355  * specific. VALUE can be assigned following:
356  *
357  * VALUE -> isp name(using inline string)
358  *
359  * Maximum length of isp name is 20 bytes.
360  */
361 #define WBXML_TOK_NAME_ISP_NAME 0x7E
362 
363 /*
364  * The PARM element with the NAME=SMS_SMSC_ADDRESS attribute indicates the
365  * MSISDN number of the SMS Service Center (SMSC). VALUE can be assigned
366  * following:
367  *
368  * VALUE -> sms smsc address(using inline string)
369  *
370  * Maximum length of sms smsc address is 21 bytes.
371  */
372 #define WBXML_TOK_NAME_SMS_SMSC_ADDRESS 0x1A
373 
374 /*
375  * The PARM element with the name NAME=USSD_SERVICE_CODE attribute indicates
376  * the USSD service code. VALUE can be assigned following:
377  *
378  * VALUE -> ussd service code(using inline string)
379  *
380  * Maximum length of ussd service code is 10 bytes.
381  */
382 #define WBXML_TOK_NAME_USSD_SERVICE_CODE 0x1B
383 
384 /*
385  * The PARM element with the NAME=GPRS_ACCESSPOINTNAME attribute indicates
386  * the access point name on Gateway GRPS Support Nodes (GGSN). Allowed
387  * characters are: ['a'-'z','A'-'Z','0'-'9','.','-','*']
388  *
389  * VALUE -> acess point name(using inline string)
390  *
391  * Maximum length of access point name is 100 bytes.
392  */
393 #define WBXML_TOK_NAME_GPRS_ACCESSPOINTNAME 0x1C
394 
395 
396 /********************************************************************
397  * CHARACTERISTIC elements with TYPE=URL
398  *
399  * The CHARACTERISTIC element with the TYPE=URL attribute has only one
400  * attribute which indicates the URL of the home page. VALUES can be assigned
401  * following:
402  *
403  * VALUE -> url(using inline string)
404  *
405  * Maximum length of URL is 100 bytes.
406  *
407  * Example:
408  *
409  * <CHARACTERISTIC TYPE="URL" VALUE="http://wap.company.com"/>
410  */
411 
412 #define WBXML_TOK_TYPE_URL 0x07
413 
414 
415 /********************************************************************
416  * CHARACTERISTIC elements with TYPE=MMSURL
417  *
418  * The CHARACTERISTIC element with the TYPE=MMSURL attribute has only one
419  * attribute which indicates the URL of the MMSC. VALUES can be assigned
420  * following:
421  *
422  * VALUE -> url(using inline string)
423  *
424  * Maximum length of URL is 100 bytes.
425  *
426  * Example:
427  *
428  * <CHARACTERISTIC TYPE="MMSURL" VALUE="http://wap.company.com/mmsc"/>
429  */
430 
431 #define WBXML_TOK_TYPE_MMSURL 0x7C
432 
433 
434 /********************************************************************
435  * CHARACTERISTIC elements with TYPE=NAME
436  *
437  * This element type must contain exactly one PARM element with NAME=NAME,
438  * which states the user-recognisable name to apply for the settings. The
439  * VALUE of the PARM element can be assigned following:
440  *
441  * VALUE -> name(using inline string)
442  *
443  * Maximum length of name is 20 bytes.
444  *
445  * Example:
446  *
447  * <CHARACTERISTIC TYPE="NAME">
448  * <PARM NAME="NAME" VALUE="Our company's WAP settings"/>
449  * </CHARACTERISTIC>
450  */
451 
452 #define WBXML_TOK_TYPE_NAME 0x08
453 
454 
455 /********************************************************************
456  * CHARACTERISTIC elements with TYPE=BOOKMARK
457  *
458  * This element must contain exactly two PARM elements, which define the
459  * name and URL for a homepage or for bookmarks.
460  *
461  * When this element is used with the MIME-type *.browser-settings the first
462  * element indicates the homepage to be used together with the corresponding
463  * settings. Note that the URL included in this element and the CHARACTERISTIC
464  * element TYPE=URL are both required to define a homepage and their content
465  * must be equal. A homepage and several bookmarks can be provided in one
466  * document of the MIME-type referred to above. However, the maximum number of
467  * bookmarks accepted is manufacturer specific.
468  *
469  * When this element is used with the MIME-type *.browser-bookmarks the
470  * element indicates bookmarks only
471  *
472  * Example:
473  *
474  * <CHARACTERISTIC TYPE="BOOKMARK">
475  * <PARM NAME="NAME" VALUE="Our company's WAP site"/>
476  * <PARM NAME="URL" VALUE="http://wap.company.com"/>
477  * </CHARACTERISTIC>
478  */
479 
480 #define WBXML_TOK_TYPE_BOOKMARK 0x7F
481 
482 /*
483  * The PARM element with the NAME=NAME attribute indicates the name of the
484  * bookmark or homepage. VALUE can be assigned following:
485  *
486  * VALUE -> bookmark name(using inline string)
487  *
488  * Maximum length of bookmark name is 50 bytes.
489  */
490 #define WBXML_TOK_NAME_NAME 0x15
491 
492 /*
493  * The PARM element with the NAME=URL attribute indicates the URL of the
494  * bookmark or homepage. VALUE can be assigned following:
495  *
496  * VALUE -> bookmark url(using inline string)
497  *
498  * Maximum length of bookmark url is 255 bytes.
499  */
500 #define WBXML_TOK_NAME_URL 0x17
501 
502 
503 /********************************************************************
504  * CHARACTERISTIC elements with TYPE=ID
505  *
506  * This element type must contain exactly one PARM element, which defines an
507  * ID to be used to provide some security to the provisioning application.
508  * The ID should be known by the subscriber through the subscription or
509  * through other communication with the operator. When provisioning data
510  * containing the ID is received the user is able to verify the received ID
511  * with the ID previously received by other means from the operator. Support
512  * of this CHARACTERISTIC element is manufacturer specific.
513  *
514  * Example:
515  *
516  * <CHARACTERISTIC TYPE="ID">
517  * <PARM NAME="NAME" VALUE="12345678"/>
518  * </CHARACTERISTIC>
519  */
520 
521 #define WBXML_TOK_TYPE_ID 0x7D
522 
523 /*
524  * The PARM elment with the NAME=NAME attribute indicates the ID. VALUE can be
525  * assigned following:
526  *
527  * VALUE -> id(using inline string)
528  *
529  * Maximum length of id is 8 bytes.
530  */
531 
532 /* end of ota_prov_attr.h */
See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.