summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-05-26 11:32:50 +0200
committerHarald Welte <laforge@gnumonks.org>2018-06-08 18:47:44 +0000
commit5d571ce044dc95763a5a557b11f0ac90ff925e99 (patch)
treedf071e945d23aae24bf8a085813802bb92ed6f02 /include
parent7eb45887b32d9b16c1ea45ab995a6d0398887056 (diff)
Introduce osmo_ss7_register_rx_unknown_cb() for unknown PPID/StreamID
Applications may be interested in handling data for those SCTP PPID or IPA StreamID which libosmo-sigtran doesn't implement natively/internally. Let's add osmo_ss7_register_rx_unknown_cb() using which applications can register a call-back to implement whatever behaviour they'd want for those PPID/StreamIDs. Change-Id: I8616f914192000df0ec6547ff4ada80e0f9042a2
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/sigtran/osmo_ss7.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index fd3f103..a93c663 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -408,6 +408,17 @@ int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg);
int osmo_ss7_asp_restart(struct osmo_ss7_asp *asp);
int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level);
+/*! Weak function to handle payload for unknown/unsupported PPID or IPA StreamID.
+ * This function can be overridden by application code to implement whatever handling
+ * it wants for such additional payloads/streams.
+ * \param[in] asp Application Server Process through which data was received
+ * \param[in] ppid_sid SCTP PPID (in sigtran case) or IPA Stream ID
+ * \param[in] msg Message buffer containing received data. Continues to be owned by caller!
+ * \return 0 on success; negative on error */
+typedef int osmo_ss7_asp_rx_unknown_cb(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg);
+
+void osmo_ss7_register_rx_unknown_cb(osmo_ss7_asp_rx_unknown_cb *cb);
+
#define LOGPASP(asp, subsys, level, fmt, args ...) \
LOGP(subsys, level, "asp-%s: " fmt, (asp)->cfg.name, ## args)