wip
Change-Id: I4fdcebf3b006a72c5318a9105a2be2cc7057dca1
diff --git a/include/osmocom/mgcp/iuup_cn_node.h b/include/osmocom/mgcp/iuup_cn_node.h
index 158b6a1..f792469 100644
--- a/include/osmocom/mgcp/iuup_cn_node.h
+++ b/include/osmocom/mgcp/iuup_cn_node.h
@@ -10,22 +10,23 @@
* -----------------
*/
-
#pragma once
struct osmo_iuup_cn;
struct msgb;
-typedef int (*osmo_iuup_data_cb_t)(struct msgb *msg, void *node_priv, void *pdu_priv);
+typedef int (*osmo_iuup_data_cb_t)(struct msgb *msg, void *node_priv);
struct osmo_iuup_cn_cfg {
void *node_priv;
- /* When an IuUP PDU containing voice payload has been received, this callback is invoked to pass
- * the voice payload towards the Core Network, msgb_l3() pointing at the payload. */
+ /* When the IuUP peer sent a voice packet, the clean RTP without the IuUP header is fed to this
+ * callback. */
osmo_iuup_data_cb_t rx_payload;
- /* IuUP handler sends a PDU to the IuUP peer (e.g. the RNC) */
+ /* IuUP handler requests that a PDU shall be sent to the IuUP peer (e.g. the RNC).
+ * It is guaranteed that the msgb->dst pointer is preserved or copied from the msgb that
+ * originated the request. */
osmo_iuup_data_cb_t tx_msg;
};
@@ -35,12 +36,6 @@
const char *name_fmt, ...);
void osmo_iuup_cn_free(struct osmo_iuup_cn *cn);
-/* Encapsulate voice stream payload in IuUP and, if appropriate, call the tx_msg() to transmit the
- * resulting message to the IuUP peer. msgb_l3() should point at the payload data.
- * pdu_priv is transparently passed on to tx_msg().
- * Returns 0 on success, negative on error. */
-int osmo_iuup_cn_tx_payload(struct osmo_iuup_cn *cn, struct msgb *payload, void *pdu_priv);
+int osmo_iuup_cn_tx_payload(struct osmo_iuup_cn *cn, struct msgb *payload);
-/* Feed a received PDU to the IuUP CN node. This function takes ownership of the msgb, it must not be
- * freed by the caller. */
-int osmo_iuup_cn_rx_pdu(struct osmo_iuup_cn *cn, struct msgb *pdu, void *pdu_priv);
+int osmo_iuup_cn_rx_pdu(struct osmo_iuup_cn *cn, struct msgb *pdu);