mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 21:13:44 +00:00
[GPRS] NS: Better formatting of VTY output
This commit is contained in:
@@ -116,12 +116,14 @@ static int config_write_ns(struct vty *vty)
|
||||
ia.s_addr = htonl(vty_nsi->nsip.local_ip);
|
||||
vty_out(vty, " encapsulation udp local-ip %s%s",
|
||||
inet_ntoa(ia), VTY_NEWLINE);
|
||||
vty_out(vty, " encapsulation udp local-port %u%s",
|
||||
vty_nsi->nsip.local_port);
|
||||
}
|
||||
if (vty_nsi->nsip.local_port)
|
||||
vty_out(vty, " encapsulation udp local-port %u%s",
|
||||
vty_nsi->nsip.local_port, VTY_NEWLINE);
|
||||
|
||||
vty_out(vty, " encapsulation framerelay-gre enabled %u%s",
|
||||
vty_nsi->frgre.enabled ? 1 : 0, VTY_NEWLINE);
|
||||
if (vty_nsi->frgre.enabled) {
|
||||
if (vty_nsi->frgre.local_ip) {
|
||||
ia.s_addr = htonl(vty_nsi->frgre.local_ip);
|
||||
vty_out(vty, " encapsulation framerelay-gre local-ip %s%s",
|
||||
inet_ntoa(ia), VTY_NEWLINE);
|
||||
@@ -161,11 +163,11 @@ static void dump_ns(struct vty *vty, struct gprs_ns_inst *nsi, int stats)
|
||||
struct in_addr ia;
|
||||
|
||||
ia.s_addr = htonl(vty_nsi->nsip.local_ip);
|
||||
vty_out(vty, "NS-UDP-IP Encapsulation: Local IP: %s, UDP Port: %u%s",
|
||||
vty_out(vty, "Encapsulation NS-UDP-IP Local IP: %s, UDP Port: %u%s",
|
||||
inet_ntoa(ia), vty_nsi->nsip.local_port, VTY_NEWLINE);
|
||||
|
||||
ia.s_addr = htonl(vty_nsi->frgre.local_ip);
|
||||
vty_out(vty, "NS-FR-GRE-IP Encapsulation: Local IP: %s%s",
|
||||
vty_out(vty, "Encapsulation NS-FR-GRE-IP Local IP: %s%s",
|
||||
inet_ntoa(ia), VTY_NEWLINE);
|
||||
|
||||
llist_for_each_entry(nsvc, &nsi->gprs_nsvcs, list) {
|
||||
|
||||
Reference in New Issue
Block a user