aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/sigtran/mtp_sap.h
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-10-26 17:19:50 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-10-26 17:34:28 +0200
commita8929fdb5642c86c23a615e4e00a78269366e846 (patch)
treef2ddc8f3c21f85b7c82a514940f7add8a27114ad /include/osmocom/sigtran/mtp_sap.h
parent793cf8a259540bbb063bf0eb4cfde3e26d3ccfd3 (diff)
sccp_scrc: fix Network Indicator in SIO composition
Since the NI is in bits DC, not BA, it needs to be shifted by 6, not 4, to end up in the two most significant bits. Also, NI is two bits wide, hence & 0x3. (The m3ua.c side of this is already correct.) See ITU-T Recommendation Q.704 (07/96), 14.2 "Service information octet". Before this patch, NI was always sent as 00 == International regardless of the VTY configuration. This patch was verified to work by a wireshark trace of osmo-bsc connecting to osmo-msc, showing the NI decoded as configured by an osmo-bsc.cfg file in the BSSMAP Reset message MTP 3 / Protocol data. Change-Id: I7bb4eb6518a1e0d74313bda776d2a6acd0b02e1b
Diffstat (limited to 'include/osmocom/sigtran/mtp_sap.h')
-rw-r--r--include/osmocom/sigtran/mtp_sap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmocom/sigtran/mtp_sap.h b/include/osmocom/sigtran/mtp_sap.h
index 120ae91..0ae8592 100644
--- a/include/osmocom/sigtran/mtp_sap.h
+++ b/include/osmocom/sigtran/mtp_sap.h
@@ -31,7 +31,7 @@ enum osmo_mtp_prim_type {
OSMO_MTP_PRIM_STATUS,
};
-#define MTP_SIO(service, net_ind) (((net_ind & 0xF) << 4) | (service & 0xF))
+#define MTP_SIO(service, net_ind) (((net_ind & 0x3) << 6) | (service & 0xF))
struct osmo_mtp_transfer_param {
uint32_t opc;