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.
58 * wap_events.def - definitions for wapbox events
60 * This file uses a pre-processor trick to define the structure of
61 * structures. See the documentation.
63 * Fields of type HTTPHEADER, CAPABILITIES, and OPTIONAL_OCTSTR may
64 * be NULL. All other fields must be filled in, unless they are
67 * Fields described in the appropriate spec are listed first. Fields
68 * specific to Kannel are introduced with an empty line. In some events,
69 * we have combined fields to form an "address tuple" (see wap_addr.h).
77 /* WTLS material - make sure the addr_tuple comes first! */
79 #ifdef HAVE_WTLS_OPENSSL
80 WAPEVENT(T_Unitdata_Ind, "T-Unitdata.ind",
85 WAPEVENT(SEC_Create_Ind, "SEC-Create.ind",
89 WAPEVENT(SEC_Create_Request_Req, "SEC-Create.req",
93 WAPEVENT(SEC_Terminate_Req, "SEC-Terminate.req",
99 WAPEVENT(SEC_Exception_Req, "SEC-Exception.req",
100 ADDRTUPLE(addr_tuple)
105 WAPEVENT(SEC_Create_Res, "SEC-Create.res",
106 ADDRTUPLE(addr_tuple)
107 INTEGER(client_key_id)
108 INTEGER(bulk_cipher_algo)
114 WAPEVENT(SEC_Exchange_Req, "SEC-Exchange.req",
115 ADDRTUPLE(addr_tuple)
118 WAPEVENT(SEC_Commit_Req, "SEC-Commit.req",
119 ADDRTUPLE(addr_tuple)
122 WAPEVENT(SEC_Unitdata_Req, "SEC-Unidata.req",
123 ADDRTUPLE(addr_tuple)
126 #endif /* HAVE_WTLS_OPENSSL */
129 * Transport layer (WDP)
132 WAPEVENT(T_DUnitdata_Req, "T-DUnitdata.req",
133 ADDRTUPLE(addr_tuple)
136 INTEGER(address_type)
137 OPTIONAL_OCTSTR(smsc_id)
139 OPTIONAL_OCTSTR(dlr_url)
140 OPTIONAL_OCTSTR(smsbox_id)
141 OPTIONAL_OCTSTR(service_name)
144 WAPEVENT(T_DUnitdata_Ind, "T-DUnitdata.ind",
145 ADDRTUPLE(addr_tuple)
150 * Transaction layer (WTP)
153 WAPEVENT(TR_Invoke_Req, "TR-Invoke.req",
154 ADDRTUPLE(addr_tuple)
161 WAPEVENT(TR_Invoke_Ind, "TR-Invoke.ind",
165 ADDRTUPLE(addr_tuple)
169 WAPEVENT(TR_Invoke_Res, "TR-Invoke.res",
173 WAPEVENT(TR_Invoke_Cnf, "TR-Invoke.cnf",
176 ADDRTUPLE(addr_tuple)
179 WAPEVENT(TR_Result_Req, "TR-Result.req",
184 WAPEVENT(TR_Result_Cnf, "TR-Result.cnf",
187 ADDRTUPLE(addr_tuple)
190 WAPEVENT(TR_Abort_Req, "TR-Abort.req",
192 INTEGER(abort_reason)
196 WAPEVENT(TR_Abort_Ind, "TR-Abort.ind",
200 ADDRTUPLE(addr_tuple)
201 INTEGER(ir_flag) /* Are we an initiator or a responder */
205 * Session layer (WSP), server side
206 * These events use the session id as a handle.
209 WAPEVENT(S_Connect_Ind, "S-Connect.ind",
210 ADDRTUPLE(addr_tuple)
211 HTTPHEADER(client_headers)
212 CAPABILITIES(requested_capabilities)
217 WAPEVENT(S_Connect_Res, "S-Connect.res",
218 HTTPHEADER(server_headers)
219 CAPABILITIES(negotiated_capabilities)
224 WAPEVENT(S_Suspend_Ind, "S-Suspend.ind",
230 WAPEVENT(S_Resume_Ind, "S-Resume.ind",
231 ADDRTUPLE(addr_tuple)
232 HTTPHEADER(client_headers)
237 WAPEVENT(S_Resume_Res, "S-Resume.res",
238 HTTPHEADER(server_headers)
244 * Session layer (WSP), client side
247 WAPEVENT(S_Connect_Req, "S-Connect.req",
248 ADDRTUPLE(addr_tuple)
249 HTTPHEADER(client_headers)
250 CAPABILITIES(requested_capabilities)
252 INTEGER(session_handle)
255 WAPEVENT(S_Suspend_Req, "S-Suspend.req",
257 INTEGER(session_handle)
260 WAPEVENT(S_Resume_Req, "S-Resume.req",
261 ADDRTUPLE(addr_tuple)
262 HTTPHEADER(client_headers)
264 INTEGER(session_handle)
267 WAPEVENT(S_Resume_Cnf, "S-Resume.cnf",
268 HTTPHEADER(server_headers)
270 INTEGER(session_handle)
274 * Session layer (WSP), events shared between server and client side
275 * On the server side, the "handle" field is always the session id.
278 WAPEVENT(S_Disconnect_Req, "S-Disconnect.req",
280 INTEGER(redirect_security) /* Only meaningful if redirecting */
281 INTEGER(redirect_addresses) /* FIXME: Wrong type, not used */
282 OPTIONAL_OCTSTR(error_headers)
283 OPTIONAL_OCTSTR(error_body)
285 INTEGER(session_handle)
288 WAPEVENT(S_Disconnect_Ind, "S-Disconnect.ind",
290 INTEGER(redirect_security) /* Only meaningful if redirecting */
291 INTEGER(redirect_addresses) /* FIXME: Wrong type, not used */
292 OPTIONAL_OCTSTR(error_headers)
293 OPTIONAL_OCTSTR(error_body)
295 INTEGER(session_handle)
299 * Pseudo-events used by session layer
302 WAPEVENT(Disconnect_Event, "Disconnect",
304 INTEGER(session_handle)
307 WAPEVENT(Suspend_Event, "Suspend",
309 INTEGER(session_handle)
312 WAPEVENT(Release_Event, "Release",
317 WAPEVENT(Abort_Event, "Abort",
322 * Per-method events for session layer, server side
325 WAPEVENT(S_MethodInvoke_Ind, "S-MethodInvoke.ind",
326 INTEGER(server_transaction_id)
327 OCTSTR(method) /* All caps */
329 HTTPHEADER(request_headers)
330 OPTIONAL_OCTSTR(request_body)
332 HTTPHEADER(session_headers)
333 ADDRTUPLE(addr_tuple)
334 INTEGER(client_SDU_size)
338 WAPEVENT(S_MethodInvoke_Res, "S-MethodInvoke.res",
339 INTEGER(server_transaction_id)
344 WAPEVENT(S_MethodResult_Req, "S-MethodResult.req",
345 INTEGER(server_transaction_id)
347 HTTPHEADER(response_headers)
348 OPTIONAL_OCTSTR(response_body)
353 WAPEVENT(S_MethodResult_Cnf, "S-MethodResult.cnf",
354 INTEGER(server_transaction_id)
360 * Per-method events for session layer, client side
363 WAPEVENT(S_MethodInvoke_Req, "S-MethodInvoke.req",
364 INTEGER(client_transaction_id)
367 HTTPHEADER(request_headers)
368 OPTIONAL_OCTSTR(request_body)
370 INTEGER(session_handle)
373 WAPEVENT(S_MethodInvoke_Cnf, "S-MethodInvoke.cnf",
374 INTEGER(client_transaction_id)
376 INTEGER(session_handle)
379 WAPEVENT(S_MethodResult_Ind, "S-MethodResult.ind",
380 INTEGER(client_transaction_id)
382 HTTPHEADER(response_headers)
383 OPTIONAL_OCTSTR(response_body)
385 INTEGER(session_handle)
388 WAPEVENT(S_MethodResult_Res, "S-MethodResult.res",
389 INTEGER(client_transaction_id)
391 INTEGER(session_handle)
395 * Per-method events used by the session layer
396 * These events are used by both client and server side.
399 WAPEVENT(S_MethodAbort_Req, "S-MethodAbort.req",
400 INTEGER(transaction_id)
402 INTEGER(session_handle)
405 WAPEVENT(S_MethodAbort_Ind, "S-MethodAbort.ind",
406 INTEGER(transaction_id)
409 INTEGER(session_handle)
413 * Per-push events used by the session layer
416 WAPEVENT(S_Push_Req, "S-Push.req",
417 HTTPHEADER(push_headers)
418 OPTIONAL_OCTSTR(push_body)
423 WAPEVENT(S_Push_Ind, "S-Push.ind",
424 HTTPHEADER(push_headers)
425 OPTIONAL_OCTSTR(push_body)
427 INTEGER(session_handle)
428 HTTPHEADER(session_headers)
431 WAPEVENT(S_ConfirmedPush_Req, "S-ConfirmedPush.req",
432 INTEGER(server_push_id)
433 HTTPHEADER(push_headers)
434 OPTIONAL_OCTSTR(push_body)
439 WAPEVENT(S_ConfirmedPush_Ind, "S-ConfirmedPush.ind",
440 INTEGER(client_push_id)
441 HTTPHEADER(push_headers)
442 OPTIONAL_OCTSTR(push_body)
444 INTEGER(session_handle)
447 WAPEVENT(S_ConfirmedPush_Res, "S-ConfirmedPush.res",
448 INTEGER(client_push_id)
450 INTEGER(session_handle)
453 WAPEVENT(S_ConfirmedPush_Cnf, "S-ConfirmedPush.cnf",
454 INTEGER(server_push_id)
459 WAPEVENT(S_PushAbort_Ind, "S-PushAbort.ind",
467 * The specification of S-PushAbort seems to assume that only the
468 * client can issue an S-PushAbort.req, and only the server can get
469 * an S-PushAbort.ind. This is contradicted by the state tables.
470 * That's why the definitions here use just "push_id" instead of
471 * server_push_id and client_push_id.
474 WAPEVENT(S_PushAbort_Req, "S-PushAbort.req",
478 INTEGER(session_handle)
481 WAPEVENT(Push_Abort, "Internal abort",
486 * Events created by unpacking T-DUnitdata.ind events.
490 WAPEVENT(RcvInvoke, "RcvInvoke",
497 INTEGER(no_cache_supported)
501 ADDRTUPLE(addr_tuple)
504 WAPEVENT(RcvSegInvoke, "RcvSegInvoke",
508 INTEGER(no_cache_supported)
512 ADDRTUPLE(addr_tuple)
515 WAPEVENT(RcvResult, "RcvResult",
521 ADDRTUPLE(addr_tuple)
524 WAPEVENT(RcvAbort, "RcvAbort",
527 INTEGER(abort_reason)
528 ADDRTUPLE(addr_tuple)
531 WAPEVENT(RcvAck, "RcvAck",
536 ADDRTUPLE(addr_tuple)
539 WAPEVENT(RcvNegativeAck, "RcvNack",
543 OPTIONAL_OCTSTR(missing)
544 ADDRTUPLE(addr_tuple)
548 * Other events used by WTP layer.
551 WAPEVENT(TimerTO_A, "Timeout-A",
555 WAPEVENT(TimerTO_R, "Timeout-R",
559 WAPEVENT(TimerTO_W, "Timeout-W",
563 WAPEVENT(RcvErrorPDU, "RcvErrorPDU",
565 ADDRTUPLE(addr_tuple)
569 * Events used by connectionless session protocol (WSP)
572 WAPEVENT(S_Unit_MethodInvoke_Req, "S-Unit-MethodInvoke.req",
573 ADDRTUPLE(addr_tuple)
574 INTEGER(transaction_id)
577 HTTPHEADER(request_headers)
578 OPTIONAL_OCTSTR(request_body)
581 WAPEVENT(S_Unit_MethodInvoke_Ind, "S-Unit_MethodInvoke.ind",
582 ADDRTUPLE(addr_tuple)
583 INTEGER(transaction_id)
584 OCTSTR(method) /* All caps */
586 HTTPHEADER(request_headers)
587 OPTIONAL_OCTSTR(request_body)
590 WAPEVENT(S_Unit_MethodResult_Req, "S-Unit-MethodResult.req",
591 ADDRTUPLE(addr_tuple)
592 INTEGER(transaction_id)
594 HTTPHEADER(response_headers)
595 OPTIONAL_OCTSTR(response_body)
598 WAPEVENT(S_Unit_MethodResult_Ind, "S-Unit-MethodResult.ind",
599 ADDRTUPLE(addr_tuple)
600 INTEGER(transaction_id)
602 HTTPHEADER(response_headers)
603 OPTIONAL_OCTSTR(response_body)
606 WAPEVENT(S_Unit_Push_Req, "S-Unit-Push.req",
607 ADDRTUPLE(addr_tuple)
609 HTTPHEADER(push_headers)
610 OPTIONAL_OCTSTR(push_body)
612 INTEGER(address_type)
613 OPTIONAL_OCTSTR(smsc_id)
615 OPTIONAL_OCTSTR(dlr_url)
616 OPTIONAL_OCTSTR(smsbox_id)
617 OPTIONAL_OCTSTR(service_name)
620 WAPEVENT(S_Unit_Push_Ind, "S-Unit-Push.ind",
621 ADDRTUPLE(addr_tuple)
623 HTTPHEADER(push_headers)
624 OPTIONAL_OCTSTR(push_body)
628 * Events used by push OTA protocol, server side
631 WAPEVENT(Pom_SessionRequest_Req, "Pom-SessionRequest.req",
632 ADDRTUPLE(addr_tuple)
633 HTTPHEADER(push_headers)
636 INTEGER(address_type)
637 OPTIONAL_OCTSTR(smsc_id)
639 OPTIONAL_OCTSTR(dlr_url)
640 OPTIONAL_OCTSTR(smsbox_id)
641 OPTIONAL_OCTSTR(service_name)
644 WAPEVENT(Pom_Connect_Ind, "Pom-Connect.ind",
645 ADDRTUPLE(addr_tuple)
646 HTTPHEADER(push_headers)
647 CAPABILITIES(requested_capabilities)
648 HTTPHEADER(accept_application)
649 HTTPHEADER(bearer_indication)
655 WAPEVENT(Pom_Connect_Res, "Pom-Connect.res",
656 CAPABILITIES(negotiated_capabilities)
661 WAPEVENT(Pom_Disconnect_Ind, "Pom-Disconnect.ind",
663 INTEGER(redirect_security) /* Only meaningful if redirecting*/
664 INTEGER(redirect_addresses) /* FIXME: Wrong type, not used */
665 OPTIONAL_OCTSTR(error_headers)
666 OPTIONAL_OCTSTR(error_body)
668 INTEGER(session_handle)
671 WAPEVENT(Pom_Suspend_Ind, "Pom-Suspend.ind",
677 WAPEVENT(Pom_Resume_Ind, "Pom-Resume.ind",
678 ADDRTUPLE(addr_tuple)
679 HTTPHEADER(client_headers)
680 HTTPHEADER(bearer_indication)
685 WAPEVENT(Po_Push_Req, "Po-Push.req",
686 HTTPHEADER(push_headers)
687 INTEGER(authenticated)
690 OPTIONAL_OCTSTR(push_body)
692 INTEGER(session_handle)
695 WAPEVENT(Po_ConfirmedPush_Req, "Po-ConfirmedPush.req",
696 INTEGER(server_push_id)
697 HTTPHEADER(push_headers)
698 INTEGER(authenticated)
701 OPTIONAL_OCTSTR(push_body)
703 INTEGER(session_handle)
706 WAPEVENT(Po_ConfirmedPush_Cnf, "Po-ConfirmedPush.Cnf",
707 INTEGER(server_push_id)
709 INTEGER(session_handle)
712 WAPEVENT(Po_Unit_Push_Req, "Po-Unit-Push.req",
713 ADDRTUPLE(addr_tuple)
715 HTTPHEADER(push_headers)
716 INTEGER(authenticated)
719 OPTIONAL_OCTSTR(push_body)
721 INTEGER(address_type)
722 OPTIONAL_OCTSTR(smsc_id)
724 OPTIONAL_OCTSTR(dlr_url)
725 OPTIONAL_OCTSTR(smsbox_id)
726 OPTIONAL_OCTSTR(service_name)
729 WAPEVENT(Po_PushAbort_Req, "Po-PushAbort.req",
736 WAPEVENT(Po_PushAbort_Ind, "Po-PushAbort.ind",
740 INTEGER(session_handle)
744 * Following events are used communicating between PPG main module (implement-
745 * ing main logic of PPG) and PAP module. These are defined in Push Access
746 * Protocol, chapter 9.
747 * Note here is one address, one group of push headers, one push body and one
748 * group of capabilities. We should use list of address_values for multiple
749 * addresses (optional) and Lists of push headers, push data and capabilities
750 * for multipart (non-nested mandatory).
751 * Note, too, that we do not yet support multiple addresses.
752 * Optional fields, if PAP control message originally does not contain one,
753 * should be set NULL, and mandatory fields non-NULL.
756 WAPEVENT(Push_Message, "push-message",
758 OPTIONAL_OCTSTR(deliver_before_timestamp) /* using PAP format */
759 OPTIONAL_OCTSTR(deliver_after_timestamp) /* ditto */
760 OPTIONAL_OCTSTR(source_reference)
761 OPTIONAL_OCTSTR(ppg_notify_requested_to)
762 INTEGER(progress_notes_requested)
763 OCTSTR(address_value) /* as parsed PAP */
764 INTEGER(address_type)
766 INTEGER(delivery_method)
767 OPTIONAL_OCTSTR(network)
768 INTEGER(network_required)
769 OPTIONAL_OCTSTR(bearer)
770 INTEGER(bearer_required)
771 HTTPHEADER(push_headers)
772 OPTIONAL_OCTSTR(push_data)
773 CAPABILITIES(pi_capabilities)
774 OPTIONAL_OCTSTR(smsc_id)
776 OPTIONAL_OCTSTR(dlr_url)
777 OPTIONAL_OCTSTR(smsbox_id)
778 OPTIONAL_OCTSTR(service_name)
779 OPTIONAL_OCTSTR(product_name)
783 * Push response element indicates that there will be no more progress notes,
784 * see Push Access Protocol, 9.3.2.
786 WAPEVENT(Push_Response, "push-response",
788 OPTIONAL_OCTSTR(sender_name)
789 OPTIONAL_OCTSTR(reply_time)
790 OPTIONAL_OCTSTR(sender_address)
792 OPTIONAL_OCTSTR(desc)
793 OPTIONAL_OCTSTR(product_name)
797 * This is for debugging PIs. One note per stage. See Push Access Protocol,
798 * 9.3.1.PPG main module sends these separately to PAP.
800 WAPEVENT(Progress_Note, "progress-note",
802 OPTIONAL_OCTSTR(note)
803 OPTIONAL_OCTSTR(time)
807 * Element bad-message-response is defined in PAP, Implementation Note,
810 WAPEVENT(Bad_Message_Response, "badmessage-response",
812 OPTIONAL_OCTSTR(desc)
813 OPTIONAL_OCTSTR(bad_message_fragment)
818 #undef OPTIONAL_OCTSTR