Display RANAP state during 'show cnlink'

This adds a line to the output showing DISCONNECTED or CONNNECTED
state for each cnlink during the 'show cnlink' VTY command.

Closes: SYS#6741
Change-Id: I6ab7d08fcd0631d31a12418f950c5901a93db43a
This commit is contained in:
Harald Welte 2024-01-15 13:34:38 +01:00
parent 406d95139b
commit 67f9de4148
10 changed files with 19 additions and 2 deletions

View File

@ -304,7 +304,7 @@ static int cnlink_fsm_timer_cb(struct osmo_fsm_inst *fi)
static struct osmo_fsm_state cnlink_fsm_states[] = {
[CNLINK_ST_DISC] = {
.name = "DISC",
.name = "DISCONNECTED",
.in_event_mask = 0
| S(CNLINK_EV_RX_RESET)
| S(CNLINK_EV_RX_RESET_ACK)
@ -317,7 +317,7 @@ static struct osmo_fsm_state cnlink_fsm_states[] = {
.action = cnlink_disc_action,
},
[CNLINK_ST_CONN] = {
.name = "CONN",
.name = "CONNECTED",
.in_event_mask = 0
| S(CNLINK_EV_RX_RESET)
| S(CNLINK_EV_RX_RESET_ACK)

View File

@ -149,6 +149,7 @@ static void _show_cnlink(struct vty *vty, struct hnbgw_cnlink *cnlink)
rt = osmo_ss7_route_lookup(ss7, cnlink->remote_addr.pc);
vty_out(vty, " SS7 route: %s%s", osmo_ss7_route_name(rt, true), VTY_NEWLINE);
vty_out(vty, " RANAP state: %s%s", osmo_fsm_inst_state_name(cnlink->fi), VTY_NEWLINE);
}
DEFUN(show_cnlink, show_cnlink_cmd, "show cnlink",

View File

@ -17,8 +17,10 @@ cs7 instance 0
OsmoHNBGW# show cnlink
IuCS: OsmoHNBGW:RI=SSN_PC,PC=0.23.5,SSN=RANAP <-> RI=SSN_PC,PC=0.23.1,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
IuPS: OsmoHNBGW:RI=SSN_PC,PC=0.23.5,SSN=RANAP <-> RI=SSN_PC,PC=0.23.4,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
OsmoHNBGW# show running-config
...

View File

@ -23,8 +23,10 @@ OsmoHNBGW# ### IuCS and IuPS were explicitly pointed to specific remote point-co
OsmoHNBGW# show cnlink
IuCS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> my-msc=RI=SSN_PC,PC=1.2.3,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
IuPS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> my-sgsn=RI=SSN_PC,PC=1.4.2,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
OsmoHNBGW# show running-config
...

View File

@ -15,8 +15,10 @@ cs7 instance 0
OsmoHNBGW# show cnlink
IuCS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> RI=SSN_PC,PC=0.23.1,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
IuPS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> RI=SSN_PC,PC=0.23.4,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
OsmoHNBGW# show running-config
...

View File

@ -23,8 +23,10 @@ OsmoHNBGW# ### IuCS and IuPS were explicitly pointed to specific remote point-co
OsmoHNBGW# show cnlink
IuCS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> my-msc=RI=SSN_PC,PC=1.2.3,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
IuPS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> my-sgsn=RI=SSN_PC,PC=1.4.2,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
OsmoHNBGW# show running-config
...

View File

@ -19,8 +19,10 @@ OsmoHNBGW# ### only IuCS was configured to go to remote-PC = 1.2.3, IuPS auto-co
OsmoHNBGW# show cnlink
IuCS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> my-msc=RI=SSN_PC,PC=1.2.3,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
IuPS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> RI=SSN_PC,PC=0.23.4,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
OsmoHNBGW# show running-config
...

View File

@ -19,8 +19,10 @@ OsmoHNBGW# ### only IuPS was configured to go to remote-PC = 1.4.2, IuCS auto-co
OsmoHNBGW# show cnlink
IuCS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> RI=SSN_PC,PC=0.23.1,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
IuPS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> my-sgsn=RI=SSN_PC,PC=1.4.2,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
OsmoHNBGW# show running-config
...

View File

@ -19,8 +19,10 @@ OsmoHNBGW# ### there are two cs7 instances, but auto-configuration will only use
OsmoHNBGW# show cnlink
IuCS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> RI=SSN_PC,PC=0.23.1,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
IuPS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> RI=SSN_PC,PC=0.23.4,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
OsmoHNBGW# show running-config
...

View File

@ -33,8 +33,10 @@ OsmoHNBGW# ### IuCS on instance 0 with local-PC = 1.1.1, IuPS on instance 1 with
OsmoHNBGW# show cnlink
IuCS: OsmoHNBGW:RI=SSN_PC,PC=1.1.1,SSN=RANAP <-> my-msc=RI=SSN_PC,PC=1.2.3,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-msc-0 proto=m3ua ASP asp-clnt-msc-0
RANAP state: DISCONNECTED
IuPS: OsmoHNBGW:RI=SSN_PC,PC=2.2.2,SSN=RANAP <-> my-sgsn=RI=SSN_PC,PC=2.4.2,SSN=RANAP
SS7 route: pc=0=0.0.0 mask=0x0=0.0.0 via AS as-clnt-sgsn-0 proto=m3ua ASP asp-clnt-sgsn-0
RANAP state: DISCONNECTED
OsmoHNBGW# show running-config
...