vty: Print Osmux CID on lchans using Osmux

Related: SYS#5987
Change-Id: I6829949c888c0bcd989311219e10330bc97b2152
This commit is contained in:
Pau Espin 2022-09-21 19:15:16 +02:00
parent 2c4f32b19b
commit 9573ccbe2b
1 changed files with 16 additions and 7 deletions

View File

@ -613,19 +613,28 @@ void lchan_dump_full_vty(struct vty *vty, struct gsm_lchan *lchan)
struct in_addr ia;
if (lchan->abis_ip.bound_ip) {
ia.s_addr = htonl(lchan->abis_ip.bound_ip);
vty_out(vty, " Bound IP: %s Port %u RTP_TYPE2=%u CONN_ID=%u%s",
vty_out(vty, " Bound IP: %s Port %u CONN_ID=%u",
inet_ntoa(ia), lchan->abis_ip.bound_port,
lchan->abis_ip.rtp_payload2, lchan->abis_ip.conn_id,
VTY_NEWLINE);
lchan->abis_ip.conn_id);
if (lchan->abis_ip.osmux.use)
vty_out(vty, " Osmux_CID=%u%s", lchan->abis_ip.osmux.local_cid, VTY_NEWLINE);
else
vty_out(vty, " RTP_TYPE2=%u%s", lchan->abis_ip.rtp_payload2, VTY_NEWLINE);
}
if (lchan->abis_ip.connect_ip) {
ia.s_addr = htonl(lchan->abis_ip.connect_ip);
vty_out(vty, " Conn. IP: %s Port %u RTP_TYPE=%u SPEECH_MODE=0x%02x%s",
vty_out(vty, " Conn. IP: %s Port %u SPEECH_MODE=0x%02x",
inet_ntoa(ia), lchan->abis_ip.connect_port,
lchan->abis_ip.rtp_payload, lchan->abis_ip.speech_mode,
VTY_NEWLINE);
lchan->abis_ip.speech_mode);
if (lchan->abis_ip.osmux.use) {
if (lchan->abis_ip.osmux.remote_cid_present)
vty_out(vty, " Osmux_CID=%u%s", lchan->abis_ip.osmux.remote_cid, VTY_NEWLINE);
else
vty_out(vty, " Osmux_CID=?%s", VTY_NEWLINE);
} else {
vty_out(vty, " RTP_TYPE=%u%s", lchan->abis_ip.rtp_payload, VTY_NEWLINE);
}
}
}
/* we want to report the last measurement report */