aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/bsc/bsc_msc_data.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-06-06 16:44:20 +0200
committerlaforge <laforge@gnumonks.org>2019-06-06 19:43:05 +0000
commited41e8c08e74d3bce2b61231c4b9f8257bc76101 (patch)
tree395a58a04490c95ed7c30a3bc1cc3106bd2d846d /include/osmocom/bsc/bsc_msc_data.h
parentf450f442f3554bc963eb3ebc30853af2ef79f24d (diff)
Introduce msc_is_{sccplite,aoip}() helpers
Having the helper makes it easier to read/find for transport type checks. It will be ifurther re-used in forthcoming commits. Change-Id: Ic0ee4c472e29ec3092049e5e23b744395613616d
Diffstat (limited to 'include/osmocom/bsc/bsc_msc_data.h')
-rw-r--r--include/osmocom/bsc/bsc_msc_data.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h
index 472084579..1f9872a41 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -191,5 +191,25 @@ static inline int mgcp_port_to_cic(uint16_t port, uint16_t base)
return (port - base) / 2;
}
+static inline bool msc_is_aoip(const struct bsc_msc_data *msc)
+{
+ switch (msc->a.asp_proto) {
+ case OSMO_SS7_ASP_PROT_SUA:
+ case OSMO_SS7_ASP_PROT_M3UA:
+ return true;
+ default:
+ return false;
+ }
+}
+
+static inline bool msc_is_sccplite(const struct bsc_msc_data *msc)
+{
+ switch (msc->a.asp_proto) {
+ case OSMO_SS7_ASP_PROT_IPA:
+ return true;
+ default:
+ return false;
+ }
+}
#endif