Change in libosmocore[master]: gprs_ns2: Log all transmitted SNS messages

laforge gerrit-no-reply at lists.osmocom.org
Thu Mar 4 08:56:33 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/23222 )


Change subject: gprs_ns2: Log all transmitted SNS messages
......................................................................

gprs_ns2: Log all transmitted SNS messages

We already have similar log statements for all NS-{RESET,BLOCK,UNBLOCK,...}
and it's confusing that even a debug-level NS log file doesn't show
transmitting SNS messages at all.

Change-Id: I0d31c3911d3acd6ac7296c370e920d53412d8289
---
M src/gb/gprs_ns2_message.c
1 file changed, 15 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/22/23222/1

diff --git a/src/gb/gprs_ns2_message.c b/src/gb/gprs_ns2_message.c
index ddf7285..cf075ec 100644
--- a/src/gb/gprs_ns2_message.c
+++ b/src/gb/gprs_ns2_message.c
@@ -515,6 +515,9 @@
 		return -EIO;
 	}
 
+	LOGNSVC(nsvc, LOGL_INFO, "Tx SNS-ACK (trans_id=%u, cause=%s, num_ip4=%u, num_ip6=%u)\n",
+		trans_id, cause ? gprs_ns2_cause_str(*cause) : "NULL", num_ip4_elems, num_ip6_elems);
+
 	nsei = osmo_htons(nsvc->nse->nsei);
 
 	msg->l2h = msgb_put(msg, sizeof(*nsh));
@@ -573,6 +576,9 @@
 		return -EIO;
 	}
 
+	LOGNSVC(nsvc, LOGL_INFO, "Tx SNS-CONFIG (end_flag=%u, num_ip4=%u, num_ip6=%u)\n",
+		end_flag, num_ip4_elems, num_ip6_elems);
+
 	nsei = osmo_htons(nsvc->nse->nsei);
 
 	msg->l2h = msgb_put(msg, sizeof(*nsh));
@@ -621,6 +627,9 @@
 		return -EIO;
 	}
 
+	LOGNSVC(nsvc, LOGL_INFO, "Tx SNS-CONFIG-ACK (cause=%s)\n",
+		cause ? gprs_ns2_cause_str(*cause) : "NULL");
+
 	nsei = osmo_htons(nsvc->nse->nsei);
 
 	msg->l2h = msgb_put(msg, sizeof(*nsh));
@@ -666,6 +675,9 @@
 		return -EIO;
 	}
 
+	LOGNSVC(nsvc, LOGL_INFO, "Tx SNS-SIZE (reset=%u, max_nr_nsvc=%u, num_ip4=%u, num_ip6=%u)\n",
+		reset_flag, max_nr_nsvc, ip4_ep_nr, ip6_ep_nr);
+
 	nsei = osmo_htons(nsvc->nse->nsei);
 
 	msg->l2h = msgb_put(msg, sizeof(*nsh));
@@ -705,6 +717,9 @@
 		return -EIO;
 	}
 
+	LOGNSVC(nsvc, LOGL_INFO, "Tx SNS-SIZEG-ACK (cause=%s)\n",
+		cause ? gprs_ns2_cause_str(*cause) : "NULL");
+
 	nsei = osmo_htons(nsvc->nse->nsei);
 
 	msg->l2h = msgb_put(msg, sizeof(*nsh));

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/23222
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0d31c3911d3acd6ac7296c370e920d53412d8289
Gerrit-Change-Number: 23222
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210304/4ba5956e/attachment.htm>


More information about the gerrit-log mailing list