mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 04:53:24 +00:00
Compare commits
2 Commits
35c3
...
neels/35c3
Author | SHA1 | Date | |
---|---|---|---|
|
bebcef4844 | ||
|
f174dd641d |
@@ -92,6 +92,10 @@ static int rx_data(struct osmo_iuup_cn *cn, struct msgb *pdu,
|
||||
((uint8_t*)hdr)[3] = 0x3c;
|
||||
msgb_pull(pdu, sizeof(*hdr) - 2);
|
||||
|
||||
struct rtp_hdr *h = (struct rtp_hdr*)pdu->data;
|
||||
if (h->payload_type == 96)
|
||||
h->payload_type = 112;
|
||||
|
||||
LOGP(DIUUP, LOGL_DEBUG, "(%s) IuUP stripping IuUP header from RTP data\n", cn->name);
|
||||
cn->cfg.rx_payload(pdu, cn->cfg.node_priv);
|
||||
|
||||
@@ -212,5 +216,9 @@ int osmo_iuup_cn_tx_payload(struct osmo_iuup_cn *cn, struct msgb *pdu)
|
||||
LOGP(DIUUP, LOGL_DEBUG, "(%s) IuUP inserting IuUP header in RTP data (frame nr %u)\n",
|
||||
cn->name, iuup_hdr->frame_nr);
|
||||
|
||||
struct rtp_hdr *h = (struct rtp_hdr*)pdu->data;
|
||||
if (h->payload_type == 112)
|
||||
h->payload_type = 96;
|
||||
|
||||
return cn->cfg.tx_msg(pdu, cn->cfg.node_priv);
|
||||
}
|
||||
|
@@ -107,11 +107,12 @@ void test_cn_session()
|
||||
"160051673c01270000820000001710000100" /* IuUP params */));
|
||||
|
||||
#define RTP_HEADER "8060944c6256042c00010102"
|
||||
#define RTP_HEADER_PT112 "8070944c6256042c00010102"
|
||||
#define IUUP_HEADER "0100e2b3"
|
||||
#define RTP_PAYLOAD "6cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0"
|
||||
printf("\nReceive payload encapsulated in IuUP. Expecting rx_payload() of just RTP packet\n");
|
||||
printf("i.e. should strip away " IUUP_HEADER "\n");
|
||||
expect_rx_payload = RTP_HEADER "f03c" RTP_PAYLOAD;
|
||||
expect_rx_payload = RTP_HEADER_PT112 "f03c" RTP_PAYLOAD;
|
||||
rx_pdu(cn,
|
||||
msgb_from_hex("IuUP-Data",
|
||||
RTP_HEADER IUUP_HEADER RTP_PAYLOAD));
|
||||
|
@@ -15,7 +15,7 @@ i.e. should strip away 0100e2b3
|
||||
8060944c6256042c000101020100e2b36cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
|
||||
rx_payload() invoked by iuup_cn!
|
||||
[IuUP] -RTP->
|
||||
8060944c6256042c00010102f03c6cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
|
||||
8070944c6256042c00010102f03c6cfb23bc46d18180c3e5ffe040045600005a7d35b625b80005fff03214ced0
|
||||
node_priv=0x2342
|
||||
ok: matches expected msg
|
||||
rc=0
|
||||
|
Reference in New Issue
Block a user