[openbsc 1/2] gprs_sgsn.h: Add two macros to log details of MM/PDP contexts

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/OpenBSC@lists.osmocom.org/.

Daniel Willmann dwillmann at sysmocom.de
Thu Sep 4 15:20:52 UTC 2014


---
 openbsc/include/openbsc/gprs_sgsn.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index 6e7c677..6a02637 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -113,6 +113,9 @@ struct sgsn_mm_ctx {
 	uint8_t			t3370_id_type;
 };
 
+#define LOGMMCTXP(level, mm, fmt, args...) \
+	LOGP(DMM, level, "MM(imsi=%s p-tmsi=0x%08x tlli=0x%08x) " fmt, (mm)->imsi, (mm)->p_tmsi, (mm)->tlli, ## args)
+
 /* look-up a SGSN MM context based on TLLI + RAI */
 struct sgsn_mm_ctx *sgsn_mm_ctx_by_tlli(uint32_t tlli,
 					const struct gprs_ra_id *raid);
@@ -176,6 +179,8 @@ struct sgsn_pdp_ctx {
 	unsigned int		num_T_exp;	/* number of consecutive T expirations */
 };
 
+#define LOGPDPCTXP(level, pdp, fmt, args...) \
+	LOGP(DGPRS, level, "PDP(imsi=%s ti=%u) " fmt, (pdp)->mm->imsi, (pdp)->ti, ## args)
 
 /* look up PDP context by MM context and NSAPI */
 struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_nsapi(const struct sgsn_mm_ctx *mm,
-- 
1.8.4.2





More information about the OpenBSC mailing list