Change in osmo-sgsn[master]: gbproxy: Add logging macros for NSE and BVC

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

daniel gerrit-no-reply at lists.osmocom.org
Wed Dec 2 12:57:26 UTC 2020


daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/21455 )


Change subject: gbproxy: Add logging macros for NSE and BVC
......................................................................

gbproxy: Add logging macros for NSE and BVC

Change-Id: Ibb2bcf3344bdc750869223b4c4861b4bbc6f417c
Related: SYS#5233
---
M include/osmocom/sgsn/gb_proxy.h
1 file changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/55/21455/1

diff --git a/include/osmocom/sgsn/gb_proxy.h b/include/osmocom/sgsn/gb_proxy.h
index 9f91bd6..83af9d6 100644
--- a/include/osmocom/sgsn/gb_proxy.h
+++ b/include/osmocom/sgsn/gb_proxy.h
@@ -237,6 +237,17 @@
 	bool is_matching[GBPROX_MATCH_LAST];
 };
 
+/* Convenience logging macros for NSE/BVC */
+#define LOGPNSE_CAT(NSE, SUBSYS, LEVEL, FMT, ARGS...) \
+	LOGP(SUBSYS, LEVEL, "NSE(%04x) " FMT, (NSE)->nsei, ## ARGS)
+#define LOGPNSE(NSE, LEVEL, FMT, ARGS...) \
+	LOGPNSE_CAT(NSE, DGPRS, LEVEL, FMT, ## ARGS)
+
+#define LOGPBVC_CAT(BVC, SUBSYS, LEVEL, FMT, ARGS...) \
+	LOGP(SUBSYS, LEVEL, "NSE(%04x)-BVC(%04x/%s) " FMT, (BVC)->nse->nsei, (BVC)->bvci, \
+		(BVC)->blocked ? "BLOCKED" : "UNBLOCKED", ## ARGS)
+#define LOGPBVC(BVC, LEVEL, FMT, ARGS...) \
+	LOGPBVC_CAT(BVC, DGPRS, LEVEL, FMT, ## ARGS)
 
 /* gb_proxy_vty .c */
 

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ibb2bcf3344bdc750869223b4c4861b4bbc6f417c
Gerrit-Change-Number: 21455
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201202/c45f6346/attachment.htm>


More information about the gerrit-log mailing list