| 1 | #cxx . . $ `<file>/include/osmocom/sigtran/mtp_sap.h`/pragma once |
| 2 | |
| 3 | /* MTP User SAP description in accordance with ITU Q.701 */ |
| 4 | |
| 5 | /* (C) 2017 by Harald Welte <[email protected]> |
| 6 | * All Rights Reserved |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | #include <stdint.h> |
| 24 | #include <osmocom/core/prim.h> |
| 25 | #include <osmocom/sigtran/sigtran_sap.h>cxx . . $ `<file>/include/osmocom/sigtran/sigtran_sap.h`/ |
| 26 | |
| 27 | enum osmo_mtp_prim_typecxx . . $ osmo_mtp_prim_type# { |
| 28 | OSMO_MTP_PRIM_TRANSFERcxx . . $ OSMO_MTP_PRIM_TRANSFER., |
| 29 | OSMO_MTP_PRIM_PAUSEcxx . . $ OSMO_MTP_PRIM_PAUSE., |
| 30 | OSMO_MTP_PRIM_RESUMEcxx . . $ OSMO_MTP_PRIM_RESUME., |
| 31 | OSMO_MTP_PRIM_STATUScxx . . $ OSMO_MTP_PRIM_STATUS., |
| 32 | }; |
| 33 | |
| 34 | #define MTP_SIOcxx . . $ `include/osmocom/sigtran/mtp_sap.h:34:9`!(service, net_ind) (((net_ind & 0x3) << 6) | (service & 0xF)) |
| 35 | |
| 36 | struct osmo_mtp_transfer_paramcxx . . $ osmo_mtp_transfer_param# { |
| 37 | uint32_tcxx . . $ uint32_t# opccxx . . $ osmo_mtp_transfer_param#opc.; |
| 38 | uint32_tcxx . . $ uint32_t# dpccxx . . $ osmo_mtp_transfer_param#dpc.; |
| 39 | uint8_tcxx . . $ uint8_t# slscxx . . $ osmo_mtp_transfer_param#sls.; |
| 40 | uint8_tcxx . . $ uint8_t# siocxx . . $ osmo_mtp_transfer_param#sio.; |
| 41 | }; |
| 42 | |
| 43 | struct osmo_mtp_pause_paramcxx . . $ osmo_mtp_pause_param# { |
| 44 | uint32_tcxx . . $ uint32_t# affected_dpccxx . . $ osmo_mtp_pause_param#affected_dpc.; |
| 45 | }; |
| 46 | |
| 47 | struct osmo_mtp_resume_paramcxx . . $ osmo_mtp_resume_param# { |
| 48 | uint32_tcxx . . $ uint32_t# affected_dpccxx . . $ osmo_mtp_resume_param#affected_dpc.; |
| 49 | }; |
| 50 | |
| 51 | struct osmo_mtp_status_paramcxx . . $ osmo_mtp_status_param# { |
| 52 | uint32_tcxx . . $ uint32_t# affected_dpccxx . . $ osmo_mtp_status_param#affected_dpc.; |
| 53 | uint32_tcxx . . $ uint32_t# causecxx . . $ osmo_mtp_status_param#cause.; |
| 54 | }; |
| 55 | |
| 56 | struct osmo_mtp_primcxx . . $ osmo_mtp_prim# { |
| 57 | struct osmo_prim_hdrcxx . . $ osmo_prim_hdr# ophcxx . . $ osmo_mtp_prim#oph.; |
| 58 | unioncxx . . $ osmo_mtp_prim#$anonymous_type_0# { |
| 59 | struct osmo_mtp_transfer_paramcxx . . $ osmo_mtp_transfer_param# transfercxx . . $ osmo_mtp_prim#$anonymous_type_0#transfer.; |
| 60 | struct osmo_mtp_pause_paramcxx . . $ osmo_mtp_pause_param# pausecxx . . $ osmo_mtp_prim#$anonymous_type_0#pause.; |
| 61 | struct osmo_mtp_resume_paramcxx . . $ osmo_mtp_resume_param# resumecxx . . $ osmo_mtp_prim#$anonymous_type_0#resume.; |
| 62 | struct osmo_mtp_status_paramcxx . . $ osmo_mtp_status_param# statuscxx . . $ osmo_mtp_prim#$anonymous_type_0#status.; |
| 63 | } ucxx . . $ osmo_mtp_prim#u.; |
| 64 | }; |
| 65 | |
| 66 | #define msgb_mtp_primcxx . . $ `include/osmocom/sigtran/mtp_sap.h:66:9`!(msg) ((struct osmo_mtp_prim *)(msg)->l1h) |
| 67 | |
| 68 | char *osmo_mtp_prim_namecxx . . $ osmo_mtp_prim_name(c8fb8af7feff48ac).(struct osmo_prim_hdrcxx . . $ osmo_prim_hdr# *oph); |