hnbgw: Bring all parts together
We now have the RUA and SUA parts interconnected by the
context ID mapper, and should be able to pass messages back and forward
between both sides.
Unfortunately this touches a bit of everything, but the structures are
all still very much in flux. Hopefully they will start to stabilize at
some point soon...
diff --git a/src/sccp_helpers.h b/src/sccp_helpers.h
new file mode 100644
index 0000000..089d69a
--- /dev/null
+++ b/src/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);