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
This commit is contained in:
Neels Hofmeyr 2017-10-26 17:19:50 +02:00
parent 793cf8a259
commit a8929fdb56
1 changed files with 1 additions and 1 deletions

View File

@ -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;