From 86cfe9b3b47decc33b9f8c6d82e67eb05f853c3f Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 30 Mar 2016 12:41:00 +0200 Subject: 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 --- include/osmocom/sigtran/Makefile.am | 4 +++- include/osmocom/sigtran/sccp_helpers.h | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 include/osmocom/sigtran/sccp_helpers.h (limited to 'include') 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 +#include +#include +#include + +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); -- cgit v1.2.3