1 /* ====================================================================
2 * The Kannel Software License, Version 1.0
4 * Copyright (c) 2001-2018 Kannel Group
5 * Copyright (c) 1998-2001 WapIT Ltd.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
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
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.
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.
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.
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 * ====================================================================
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/>.
53 * Portions of this software are based upon software originally written at
54 * WapIT Ltd., Helsinki, Finland for the Kannel project.
59 UINT(version, "WSP protocol version", 8)
60 UINTVAR(capabilities_len, "Length of capabilities")
61 UINTVAR(headers_len, "Length of session headers")
62 OCTSTR(capabilities, "Requested capabilities", capabilities_len)
63 OCTSTR(headers, "Session headers", headers_len)
66 PDU(ConnectReply, "...",
68 UINTVAR(sessionid, "Session ID")
69 UINTVAR(capabilities_len, "Length of capabilities")
70 UINTVAR(headers_len, "Length of session headers")
71 OCTSTR(capabilities, "Accepted capabilities", capabilities_len)
72 OCTSTR(headers, "Session headers", headers_len)
75 PDU(Redirect, "Problem: need REPEAT structure to parse addresses",
77 UINT(permanent, "Permanent Redirect flag", 1)
78 UINT(reuse_security, "Reuse Security Session flag", 1)
80 REST(addresses, "Redirect addresses")
83 PDU(Disconnect, "...",
85 UINTVAR(sessionid, "Session ID")
90 UINT(subtype, "GET, OPTIONS, HEAD, DELETE, or TRACE", 4)
91 UINTVAR(uri_len, "Length of URI")
92 OCTSTR(uri, "URI", uri_len)
93 REST(headers, "Request headers")
98 UINT(subtype, "POST or PUT", 4)
99 UINTVAR(uri_len, "Length of URI")
100 UINTVAR(headers_len, "Length of headers")
101 OCTSTR(uri, "URI", uri_len)
102 OCTSTR(headers, "Content type and request headers", headers_len)
103 REST(data, "Request data")
108 UINT(status, "Status code", 8)
109 UINTVAR(headers_len, "Length of headers")
110 OCTSTR(headers, "Content type and reply headers", headers_len)
111 REST(data, "Reply data")
116 UINTVAR(headers_len, "Length of headers")
117 OCTSTR(headers, "Content type and headers", headers_len)
118 REST(data, "Push data")
121 PDU(ConfirmedPush, "...",
123 UINTVAR(headers_len, "Length of headers")
124 OCTSTR(headers, "Content type and headers", headers_len)
125 REST(data, "Push data")
130 UINTVAR(sessionid, "Session ID")
135 UINTVAR(sessionid, "Session ID")
136 UINTVAR(capabilities_len, "Length of capabilities")
137 OCTSTR(capabilities, "Reserved capabilities field", capabilities_len)
138 REST(headers, "Session headers")
142 UINT(version, "sia version", 8)
143 UINTVAR(appidlist_len, "Length of application id list")
144 OCTSTR(application_id_list, "application id list", appidlist_len)
145 UINTVAR(contactpoints_len, "Length of contact point list")
146 OCTSTR(contactpoints, "list of contact points", contactpoints_len)