summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-02-11 22:37:47 (UTC)
committerHarald Welte <laforge@gnumonks.org>2017-02-13 03:11:26 (UTC)
commit21c8a1bcc8f853f3da05d71c4b4fbea6faf53b24 (patch)
tree7afe83f8617003666b91c00c4fbac29485080eb2
parenteefad1b78df536c98ea9565d6528955c63fae108 (diff)
downloadlibosmo-sccp-21c8a1bcc8f853f3da05d71c4b4fbea6faf53b24.zip
libosmo-sccp-21c8a1bcc8f853f3da05d71c4b4fbea6faf53b24.tar.gz
libosmo-sccp-21c8a1bcc8f853f3da05d71c4b4fbea6faf53b24.tar.bz2
libosmo-sccp-21c8a1bcc8f853f3da05d71c4b4fbea6faf53b24.tar.xz
mtp_sap.h: Add definitions for upcoming MTP SAP
Change-Id: I714c44720821e1deaffef75d36ab49ac5a3186f0
-rw-r--r--include/osmocom/sigtran/mtp_sap.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/include/osmocom/sigtran/mtp_sap.h b/include/osmocom/sigtran/mtp_sap.h
new file mode 100644
index 0000000..3e64fc7
--- /dev/null
+++ b/include/osmocom/sigtran/mtp_sap.h
@@ -0,0 +1,66 @@
+#pragma once
+
+/* MTP User SAP description in accordance with ITU Q.701 */
+
+/* (C) 2017 by Harald Welte <laforge@gnumonks.org>
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <stdint.h>
+#include <osmocom/core/prim.h>
+#include <osmocom/sigtran/sigtran_sap.h>
+
+enum osmo_mtp_prim_type {
+ OSMO_MTP_PRIM_TRANSFER,
+ OSMO_MTP_PRIM_PAUSE,
+ OSMO_MTP_PRIM_RESUME,
+ OSMO_MTP_PRIM_STATUS,
+};
+
+struct osmo_mtp_transfer_param {
+ uint32_t opc;
+ uint32_t dpc;
+ uint8_t sls;
+ uint8_t sio;
+};
+
+struct osmo_mtp_pause_param {
+ uint32_t affected_dpc;
+};
+
+struct osmo_mtp_resume_param {
+ uint32_t affected_dpc;
+};
+
+struct osmo_mtp_status_param {
+ uint32_t affected_dpc;
+ uint32_t cause;
+};
+
+struct osmo_mtp_prim {
+ struct osmo_prim_hdr oph;
+ union {
+ struct osmo_mtp_transfer_param transfer;
+ struct osmo_mtp_pause_param pause;
+ struct osmo_mtp_resume_param resume;
+ struct osmo_mtp_status_param status;
+ } u;
+};
+
+#define msgb_mtp_prim(msg) ((struct osmo_mtp_prim *)(msg)->l1h)
+
+char *osmo_mtp_prim_name(struct osmo_prim_hdr *oph);