The intention is to standardize subscriber identification output in log files.
At this moment we sometimes identify subscriber by id, sometimes by extension,
sometimes by IMSI and sometimes do not idenify at all. This makes log analysis
hard or impossible.
This patch doesn't touch actual log output, as it's a separate thing and
requires consideration before checking in.
---
openbsc/include/openbsc/gsm_subscriber.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/openbsc/include/openbsc/gsm_subscriber.h
b/openbsc/include/openbsc/gsm_subscriber.h
index 78f9710..f21b3e6 100644
--- a/openbsc/include/openbsc/gsm_subscriber.h
+++ b/openbsc/include/openbsc/gsm_subscriber.h
@@ -15,6 +15,10 @@
#define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001
#define tmsi_from_string(str) strtoul(str, NULL, 10)
+#define GSM_SUBS_FMT_STR "IMSI %s (id %llu, ext %s%s%s)"
+#define GSM_SUBS_FMT_VAL(x) (x)->imsi, (x)->id, (x)->extension, \
+ strlen((x)->name)?", name ":"",
strlen((x)->name)?(x)->name:""
+
struct vty;
struct gsm_equipment {
--
1.7.9.5