aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2014-09-03 15:57:49 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2014-09-22 10:47:11 +0200
commitb15ceec33f557b7cdd22166fd997e6615c644cc5 (patch)
tree8ae3da4d54aaa14885929e5946df845116fc2a04
parent25ad52cf6ad66d83696db74fd665e3a7a41b131b (diff)
gprs_sgsn.h: Add two macros to log details of MM/PDP contexts
-rw-r--r--openbsc/include/openbsc/gprs_sgsn.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index 6e7c67730..a04ab91c2 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(%s/%08x) " fmt, (mm)->imsi, (mm)->p_tmsi, ## 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(%s/%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,