aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-12-25 00:35:05 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2017-12-25 00:46:12 +0100
commit9e17e054e4bc48cf608c6fec1d7729a9ce74b872 (patch)
tree8681d6f7b086b260e8e5a543d8e959b0d42e87f0 /include
parent140f38c55ec208f9ed4c8b81e228bf0091cb1731 (diff)
osmo-hnbgw: vty: revamp output of context maps on 'show hnb'
Instead of listing each and every context map, rather output a summary of context counts. Rationale: in a list of a hundred HNBs, I don't want to also see a dozen (or potentially thousands of) context map lines for each. Furthermore, the conn IDs aren't necessarily useful on network traces either. For example, what was shown as SUA Id is incidentally the SCCP Reference, but this is not a hard requirement and may change. Also, the reference is shown in wireshark as a hex in mismatching byte order ... so rather don't bother. The result now looks like OsmoHNBGW> show hnb all HNB (r=192.168.0.124:29169<->l=192.168.0.9:29169) "000295-0000152614@ap.ipaccess.com" MCC 901 MNC 70 LAC 14357 RAC 11 SAC 1 CID 8595638 SCCP-stream:HNBAP=0,RUA=0 IuCS: 1 contexts: inactive-reserved:1 IuPS: 1 contexts: active:1 1 HNB connected Related: OS#2772 OS#2773 Change-Id: Iae76b68e85863c8663bb5c508b85534c00e1d2c9
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/iuh/context_map.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/iuh/context_map.h b/include/osmocom/iuh/context_map.h
index 8d957d6..6279b91 100644
--- a/include/osmocom/iuh/context_map.h
+++ b/include/osmocom/iuh/context_map.h
@@ -8,8 +8,13 @@ enum hnbgw_context_map_state {
MAP_S_ACTIVE, /* currently active map */
MAP_S_RESERVED1, /* just disconnected, still resrved */
MAP_S_RESERVED2, /* still reserved */
+ MAP_S_NUM_STATES /* Number of states, keep this at the end */
};
+extern const struct value_string hnbgw_context_map_state_names[];
+static inline const char *hnbgw_context_map_state_name(enum hnbgw_context_map_state val)
+{ return get_value_string(hnbgw_context_map_state_names, val); }
+
struct hnb_context;
struct hnbgw_cnlink;