aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-30 12:41:00 +0200
committerHarald Welte <laforge@gnumonks.org>2017-02-13 13:57:29 +0000
commit86cfe9b3b47decc33b9f8c6d82e67eb05f853c3f (patch)
tree7577346b51a3a56742b827ca9b35fc1084b00602 /include/osmocom
parent0c72c1c0d313321f65fd272840ed8e8ae69a04cd (diff)
Add sccp_helpers.[hc] moved from osmo-iuh, 1:1 at first
Move here unchanged first, so we're able to see the modifications in diffs. Pending changes will follow in subsequent patches. Moved from osmo-iuh 3da8608b6ad014fc74536dbb49019704fd425b8c, which was before the rename of osmo_sua_link and osmo_sua_user to osmo_sccp_link and osmo_sccp_user, so this will not compile. Change-Id: Iae0c58c5f1eb00a685de70add0d5257e4316c6d5
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/sigtran/Makefile.am4
-rw-r--r--include/osmocom/sigtran/sccp_helpers.h33
2 files changed, 36 insertions, 1 deletions
diff --git a/include/osmocom/sigtran/Makefile.am b/include/osmocom/sigtran/Makefile.am
index adb0997..e168256 100644
--- a/include/osmocom/sigtran/Makefile.am
+++ b/include/osmocom/sigtran/Makefile.am
@@ -1,4 +1,6 @@
-sigtran_HEADERS = m3ua_types.h xua_types.h xua_msg.h m2ua_types.h sccp_sap.h sua.h sigtran_sap.h
+sigtran_HEADERS = m3ua_types.h xua_types.h xua_msg.h m2ua_types.h sccp_sap.h \
+ sua.h sigtran_sap.h sccp_helpers.h
+
sigtrandir = $(includedir)/osmocom/sigtran
sigtran_prot_HEADERS = protocol/sua.h
diff --git a/include/osmocom/sigtran/sccp_helpers.h b/include/osmocom/sigtran/sccp_helpers.h
new file mode 100644
index 0000000..089d69a
--- /dev/null
+++ b/include/osmocom/sigtran/sccp_helpers.h
@@ -0,0 +1,33 @@
+#pragma once
+#include <unistd.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/sigtran/sccp_sap.h>
+#include <osmocom/sigtran/sua.h>
+
+int sccp_tx_unitdata(struct osmo_sua_link *link,
+ const struct osmo_sccp_addr *calling_addr,
+ const struct osmo_sccp_addr *called_addr,
+ uint8_t *data, unsigned int len);
+
+int sccp_tx_unitdata_msg(struct osmo_sua_link *link,
+ const struct osmo_sccp_addr *calling_addr,
+ const struct osmo_sccp_addr *called_addr,
+ struct msgb *msg);
+
+void sccp_make_addr_pc_ssn(struct osmo_sccp_addr *addr, uint32_t pc, uint32_t ssn);
+
+int sccp_tx_conn_req(struct osmo_sua_link *link, uint32_t conn_id,
+ const struct osmo_sccp_addr *calling_addr,
+ const struct osmo_sccp_addr *called_addr,
+ uint8_t *data, unsigned int len);
+
+int sccp_tx_conn_req_msg(struct osmo_sua_link *link, uint32_t conn_id,
+ const struct osmo_sccp_addr *calling_addr,
+ const struct osmo_sccp_addr *called_addr,
+ struct msgb *msg);
+
+int sccp_tx_data(struct osmo_sua_link *link, uint32_t conn_id,
+ uint8_t *data, unsigned int len);
+
+int sccp_tx_data_msg(struct osmo_sua_link *link, uint32_t conn_id,
+ struct msgb *msg);