diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2020-12-01 16:36:29 +0100 |
---|---|---|
committer | Daniel Willmann <dwillmann@sysmocom.de> | 2020-12-02 17:17:17 +0100 |
commit | 74187970276482595403fb7a91cee55e53280079 (patch) | |
tree | 310b58165bcd8bae8d27acbac4718f8362782e35 /include/osmocom | |
parent | d97ff681c3c464e8c4da83cb5ecdeee4a721e1a9 (diff) |
gbproxy: Add logging macros for NSE and BVC
Change-Id: Ibb2bcf3344bdc750869223b4c4861b4bbc6f417c
Related: SYS#5233
Diffstat (limited to 'include/osmocom')
-rw-r--r-- | include/osmocom/sgsn/gb_proxy.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/osmocom/sgsn/gb_proxy.h b/include/osmocom/sgsn/gb_proxy.h index 9f91bd683..fae95c160 100644 --- a/include/osmocom/sgsn/gb_proxy.h +++ b/include/osmocom/sgsn/gb_proxy.h @@ -237,6 +237,17 @@ struct gbproxy_link_info { bool is_matching[GBPROX_MATCH_LAST]; }; +/* Convenience logging macros for NSE/BVC */ +#define LOGPNSE_CAT(NSE, SUBSYS, LEVEL, FMT, ARGS...) \ + LOGP(SUBSYS, LEVEL, "NSE(%05u/BSS) " 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(%05u/BSS)-BVC(%05u/%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 */ |