diff options
author | Max <msuraev@sysmocom.de> | 2017-10-23 15:09:23 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-10-24 14:33:30 +0000 |
commit | 4ce24c45b9286c3946135f97d6ca6f2d4074526e (patch) | |
tree | 5a5463df566fdc742cb19fc0f44c09edcf428648 /include | |
parent | abdd7a28ede091f06325b3e5b8a77fc9130e6ee3 (diff) |
GPRS: unify NS state printing
* introduce defines with NS state names
* use them for vty and tests
* expand test output to print complete NS state
Change-Id: I69f8d536135ae76dbca623c2f1ffba625adcb1e9
Related: SYS#3610
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/gprs/gprs_ns.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/osmocom/gprs/gprs_ns.h b/include/osmocom/gprs/gprs_ns.h index d4aef824..2d2f86ed 100644 --- a/include/osmocom/gprs/gprs_ns.h +++ b/include/osmocom/gprs/gprs_ns.h @@ -43,6 +43,10 @@ enum ns_timeout { #define NSE_S_ALIVE 0x0002 #define NSE_S_RESET 0x0004 +#define NS_DESC_B(st) ((st) & NSE_S_BLOCKED ? "BLOCKED" : "UNBLOCKED") +#define NS_DESC_A(st) ((st) & NSE_S_ALIVE ? "ALIVE" : "DEAD") +#define NS_DESC_R(st) ((st) & NSE_S_RESET ? "RESET" : "UNRESET") + /*! Osmocom NS link layer types */ enum gprs_ns_ll { GPRS_NS_LL_UDP, /*!< NS/UDP/IP */ |