pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40550?usp=email )
Change subject: ss7_vty: Improve VTY output of vty_dump_rtable()
......................................................................
ss7_vty: Improve VTY output of vty_dump_rtable()
This same outputting hint is used by Cisco ITP.
Change-Id: I87511084278976889ab031fcfd10c09cc60c7595
---
M src/ss7_vty.c
1 file changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/50/40550/1
diff --git a/src/ss7_vty.c b/src/ss7_vty.c
index a5f5310..563dd97 100644
--- a/src/ss7_vty.c
+++ b/src/ss7_vty.c
@@ -517,9 +517,13 @@
llist_for_each_entry(rt, &clset->routes, list) {
bool rt_avail = ss7_route_is_available(rt);
-
+ bool first_rt_in_clset = (rt == llist_first_entry(&clset->routes, struct
osmo_ss7_route, list));
+ /* Print route str only in first rt in combined linkset.
+ * This allows users to easily determine visually combined
+ * linksets: */
+ const char *rt_str = first_rt_in_clset ? osmo_ss7_route_print(rt) : "";
vty_out(vty, "%-16s %-5s %c %c %u %-19s %-7s %-7s %-7s%-3s%s",
- osmo_ss7_route_print(rt),
+ rt_str,
rt_avail ? "acces" : "INACC",
' ',
'0' + rt->cfg.qos_class,
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/40550?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I87511084278976889ab031fcfd10c09cc60c7595
Gerrit-Change-Number: 40550
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>