Vadim Yanitskiy | 741aa57 | 2024-06-12 06:16:43 +0700 | [diff] [blame] | 1 | module SCTP_Templates { |
| 2 | |
| 3 | /* (C) 2024 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> |
| 4 | * |
| 5 | * All rights reserved. |
| 6 | * |
| 7 | * Released under the terms of GNU General Public License, Version 2 or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 11 | */ |
| 12 | |
| 13 | import from Socket_API_Definitions all; |
| 14 | |
| 15 | template (value) SctpTuple |
| 16 | ts_SctpTuple(template (omit) integer ppid := omit, |
| 17 | template (omit) AssociationId assoc_id := omit) := { |
| 18 | sinfo_stream := omit, |
| 19 | sinfo_ppid := ppid, |
| 20 | remSocks := omit, |
| 21 | assocId := assoc_id |
| 22 | }; |
| 23 | template SctpTuple |
| 24 | tr_SctpTuple(template integer ppid := *, |
| 25 | template AssociationId assoc_id := *) := { |
| 26 | sinfo_stream := *, |
| 27 | sinfo_ppid := ppid, |
| 28 | remSocks := *, |
| 29 | assocId := assoc_id |
| 30 | }; |
| 31 | |
| 32 | |
| 33 | template Socket_API_Definitions.PortEvent |
| 34 | tr_SctpAssocChange(template (present) SAC_STATE state := ?, |
| 35 | template (present) ConnectionId conn_id := ?, |
| 36 | template (present) SctpTuple sctp := ?) := { |
| 37 | sctpEvent := { |
| 38 | sctpAssocChange := { |
| 39 | clientId := conn_id, |
| 40 | proto := { |
| 41 | sctp := sctp |
| 42 | }, |
| 43 | sac_state := state |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | template Socket_API_Definitions.PortEvent |
| 49 | tr_SctpPeerAddrChange(template (present) SPC_STATE state := ?, |
| 50 | template (present) ConnectionId conn_id := ?) := { |
| 51 | sctpEvent := { |
| 52 | sctpPeerAddrChange := { |
| 53 | clientId := conn_id, |
| 54 | spc_state := state |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | template Socket_API_Definitions.PortEvent |
| 60 | tr_SctpShutDownEvent(template (present) ConnectionId conn_id := ?) := { |
| 61 | sctpEvent := { |
| 62 | sctpShutDownEvent := { |
| 63 | clientId := conn_id |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | } |