[PATCH] osmo-msc[master]: Remove rest_octets.h

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Fri Sep 15 09:31:26 UTC 2017


Review at  https://gerrit.osmocom.org/3957

Remove rest_octets.h

The MSC should not fiddle with low-level SI details like rest octets
anyway. Unfortunately simply removing the header is impossible as it
causes massive fallout due to missing includes. Fixed it as well.

The only other parameter which required removal is cell_ro_sel_par which
is not referenced anywhere in the code anyway.

Change-Id: Ibff77330de056fad4288cd4c48d016aad8105354
---
M include/osmocom/msc/Makefile.am
M include/osmocom/msc/a_iface.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_data_shared.h
M include/osmocom/msc/msc_ifaces.h
D include/osmocom/msc/rest_octets.h
M src/libcommon-cs/common_cs.c
M src/libcommon/gsm_subscriber_base.c
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/mncc_sock.c
M src/libmsc/msc_ifaces.c
M src/libmsc/osmo_msc.c
M src/libmsc/ussd.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_lu_fsm.c
M tests/msc_vlr/msc_vlr_tests.c
18 files changed, 21 insertions(+), 145 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/57/3957/1

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 6e7aa38..03896b5 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -52,7 +52,6 @@
 	bsc_msc_data.h \
 	osmux.h \
 	paging.h \
-	rest_octets.h \
 	rrlp.h \
 	rs232.h \
 	rtp_proxy.h \
diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h
index 32003eb..40ad9c8 100644
--- a/include/osmocom/msc/a_iface.h
+++ b/include/osmocom/msc/a_iface.h
@@ -21,6 +21,7 @@
 #pragma once
 
 #include <osmocom/msc/a_reset.h>
+#include <osmocom/msc/transaction.h>
 
 /* A struct to keep a context information about the BSCs we are associated with */
 struct bsc_context {
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 5d3d5ca..1a3fa01 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -10,12 +10,11 @@
 #include <osmocom/core/rate_ctr.h>
 #include <osmocom/core/select.h>
 #include <osmocom/core/stats.h>
-
+#include <osmocom/gsm/gsm48.h>
 #include <osmocom/crypt/auth.h>
 #include <osmocom/sigtran/sccp_sap.h>
 
 #include <osmocom/msc/common.h>
-#include <osmocom/msc/rest_octets.h>
 #include <osmocom/msc/common_cs.h>
 #include <osmocom/mgcp_client/mgcp_client.h>
 
diff --git a/include/osmocom/msc/gsm_data_shared.h b/include/osmocom/msc/gsm_data_shared.h
index 5028a26..4f47786 100644
--- a/include/osmocom/msc/gsm_data_shared.h
+++ b/include/osmocom/msc/gsm_data_shared.h
@@ -17,7 +17,7 @@
 #include <osmocom/gsm/protocol/gsm_04_08.h>
 #include <osmocom/gsm/protocol/gsm_08_58.h>
 #include <osmocom/gsm/protocol/gsm_12_21.h>
-
+#include <osmocom/msc/meas_rep.h>
 #include <osmocom/abis/e1_input.h>
 
 #ifndef ROLE_BSC
@@ -860,7 +860,6 @@
 		struct gsm48_rach_control rach_control;
 		uint8_t ncc_permitted;
 		struct gsm48_cell_sel_par cell_sel_par;
-		struct gsm48_si_selection_params cell_ro_sel_par; /* rest octet */
 		struct gsm48_cell_options cell_options;
 		struct gsm48_control_channel_descr chan_desc;
 		struct bitvec neigh_list;
diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h
index d46dfe9..0592c07 100644
--- a/include/osmocom/msc/msc_ifaces.h
+++ b/include/osmocom/msc/msc_ifaces.h
@@ -2,6 +2,7 @@
 
 #include <osmocom/core/msgb.h>
 #include <osmocom/msc/gsm_data.h>
+#include <osmocom/msc/transaction.h>
 
 /* These are the interfaces of the MSC layer towards (from?) the BSC and RNC,
  * i.e. in the direction towards the mobile device (MS aka UE).
diff --git a/include/osmocom/msc/rest_octets.h b/include/osmocom/msc/rest_octets.h
deleted file mode 100644
index 49857b7..0000000
--- a/include/osmocom/msc/rest_octets.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#ifndef _REST_OCTETS_H
-#define _REST_OCTETS_H
-
-#include <stdbool.h>
-#include <osmocom/msc/gsm_04_08.h>
-#include <osmocom/gsm/sysinfo.h>
-
-/* generate SI1 rest octets */
-int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net);
-int rest_octets_si2quater(uint8_t *data, struct gsm_bts *bts);
-int rest_octets_si6(uint8_t *data, bool is1800_net);
-
-struct gsm48_si_selection_params {
-	uint16_t penalty_time:5,
-		  temp_offs:3,
-		  cell_resel_off:6,
-		  cbq:1,
-		  present:1;
-};
-
-struct gsm48_si_power_offset {
-	uint8_t power_offset:2,
-		 present:1;
-};
-
-struct gsm48_si3_gprs_ind {
-	uint8_t si13_position:1,
-		 ra_colour:3,
-		 present:1;
-};
-
-struct gsm48_lsa_params {
-	uint32_t prio_thr:3,
-		 lsa_offset:3,
-		 mcc:12,
-		 mnc:12;
-	unsigned int present;
-};
-
-struct gsm48_si_ro_info {
-	struct gsm48_si_selection_params selection_params;
-	struct gsm48_si_power_offset power_offset;
-	uint8_t si2ter_indicator;
-	uint8_t early_cm_ctrl;
-	struct {
-		uint8_t where:3,
-			 present:1;
-	} scheduling;
-	struct gsm48_si3_gprs_ind gprs_ind;
-	/* SI 3 specific */
-	uint8_t si2quater_indicator;
-	/* SI 4 specific */
-	struct gsm48_lsa_params lsa_params;
-	uint16_t cell_id;
-	uint8_t break_ind;	/* do we have SI7 + SI8 ? */
-};
-
-
-/* Generate SI3 Rest Octests (Chapter 10.5.2.34 / Table 10.4.72) */
-int rest_octets_si3(uint8_t *data, const struct gsm48_si_ro_info *si3);
-
-/* Generate SI4 Rest Octets (Chapter 10.5.2.35) */
-int rest_octets_si4(uint8_t *data, const struct gsm48_si_ro_info *si4, int len);
-
-enum pbcch_carrier_type {
-	PBCCH_BCCH,
-	PBCCH_ARFCN,
-	PBCCH_MAIO
-};
-
-/* TS 03.60 Chapter 6.3.3.1: Network Mode of Operation */
-enum gprs_nmo {
-	GPRS_NMO_I	= 0,	/* CS pagin on GPRS paging or traffic channel */
-	GPRS_NMO_II	= 1,	/* all paging on CCCH */
-	GPRS_NMO_III	= 2,	/* no paging coordination */
-};
-
-/* TS 04.60 12.24 */
-struct gprs_cell_options {
-	enum gprs_nmo nmo;
-	/* T3168: wait for packet uplink assignment message */
-	uint32_t t3168;	/* in milliseconds */
-	/* T3192: wait for release of the TBF after reception of the final block */
-	uint32_t t3192;	/* in milliseconds */
-	uint32_t drx_timer_max;/* in seconds */
-	uint32_t bs_cv_max;
-	uint8_t  supports_egprs_11bit_rach;
-	bool ctrl_ack_type_use_block; /* use PACKET CONTROL ACKNOWLEDGMENT */
-
-	uint8_t ext_info_present;
-	struct {
-		uint8_t egprs_supported;
-			uint8_t use_egprs_p_ch_req;
-			uint8_t bep_period;
-		uint8_t pfc_supported;
-		uint8_t dtm_supported;
-		uint8_t bss_paging_coordination;
-	} ext_info;
-};
-
-/* TS 04.60 Table 12.9.2 */
-struct gprs_power_ctrl_pars {
-	uint8_t alpha;
-	uint8_t t_avg_w;
-	uint8_t t_avg_t;
-	uint8_t pc_meas_chan;
-	uint8_t n_avg_i;
-};
-
-struct gsm48_si13_info {
-	struct gprs_cell_options cell_opts;
-	struct gprs_power_ctrl_pars pwr_ctrl_pars;
-	uint8_t bcch_change_mark;
-	uint8_t si_change_field;
-	uint8_t pbcch_present;
-
-	union {
-		struct {
-			uint8_t rac;
-			uint8_t spgc_ccch_sup;
-			uint8_t net_ctrl_ord;
-			uint8_t prio_acc_thr;
-		} no_pbcch;
-		struct {
-			uint8_t psi1_rep_per;
-			uint8_t pb;
-			uint8_t tsc;
-			uint8_t tn;
-			enum pbcch_carrier_type carrier_type;
-			uint16_t arfcn;
-			uint8_t maio;
-		} pbcch;
-	};
-};
-
-/* Generate SI13 Rest Octests (Chapter 10.5.2.37b) */
-int rest_octets_si13(uint8_t *data, const struct gsm48_si13_info *si13);
-
-#endif /* _REST_OCTETS_H */
diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c
index 8a28b72..bad8262 100644
--- a/src/libcommon-cs/common_cs.c
+++ b/src/libcommon-cs/common_cs.c
@@ -29,6 +29,7 @@
 #include <osmocom/msc/gsm_subscriber.h>
 #include <osmocom/msc/gsm_data.h>
 #include <osmocom/msc/gsm_04_11.h>
+#include <osmocom/msc/gsm_04_08.h>
 
 /* Warning: if bsc_network_init() is not called, some of the members of
  * gsm_network are not initialized properly and must not be used! (In
diff --git a/src/libcommon/gsm_subscriber_base.c b/src/libcommon/gsm_subscriber_base.c
index 58a6ff0..20147a3 100644
--- a/src/libcommon/gsm_subscriber_base.c
+++ b/src/libcommon/gsm_subscriber_base.c
@@ -29,6 +29,7 @@
 
 #include <osmocom/core/talloc.h>
 #include <osmocom/core/utils.h>
+#include <osmocom/gsm/gsm48.h>
 #include <osmocom/msc/gsm_subscriber.h>
 #include <osmocom/msc/debug.h>
 #include <osmocom/msc/vlr.h>
diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c
index 3e86494..4892fb8 100644
--- a/src/libmsc/a_iface.c
+++ b/src/libmsc/a_iface.c
@@ -40,6 +40,8 @@
 #include <osmocom/msc/a_reset.h>
 #include <osmocom/msc/osmo_msc.h>
 
+#include <errno.h>
+
 /* A pointer to the GSM network we work with. By the current paradigm,
  * there can only be one gsm_network per MSC. The pointer is set once
  * when calling a_init() */
diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index 3d5755a..922dca9 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -24,6 +24,7 @@
 #include <osmocom/sigtran/sccp_helpers.h>
 #include <osmocom/sccp/sccp_types.h>
 #include <osmocom/gsm/gsm0808.h>
+#include <osmocom/gsm/gsm48.h>
 #include <osmocom/gsm/gsm0808_utils.h>
 #include <osmocom/msc/debug.h>
 #include <osmocom/msc/gsm_data.h>
@@ -32,6 +33,9 @@
 #include <osmocom/msc/osmo_msc.h>
 #include <osmocom/core/byteswap.h>
 #include <osmocom/msc/a_reset.h>
+#include <osmocom/msc/transaction.h>
+
+#include <errno.h>
 
 #define IP_V4_ADDR_LEN 4
 
diff --git a/src/libmsc/mncc_sock.c b/src/libmsc/mncc_sock.c
index 05c9439..b6b1bc9 100644
--- a/src/libmsc/mncc_sock.c
+++ b/src/libmsc/mncc_sock.c
@@ -38,6 +38,7 @@
 #include <osmocom/msc/debug.h>
 #include <osmocom/msc/mncc.h>
 #include <osmocom/msc/gsm_data.h>
+#include <osmocom/msc/gsm_04_08.h>
 
 struct mncc_sock_state {
 	struct gsm_network *net;
diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c
index f54426e..1c8e5ef 100644
--- a/src/libmsc/msc_ifaces.c
+++ b/src/libmsc/msc_ifaces.c
@@ -29,6 +29,7 @@
 #include <osmocom/mgcp_client/mgcp_client.h>
 #include <osmocom/msc/vlr.h>
 #include <osmocom/msc/a_iface.h>
+#include <osmocom/msc/gsm_04_08.h>
 
 #include "../../bscconfig.h"
 
diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c
index db24757..f807f2a 100644
--- a/src/libmsc/osmo_msc.c
+++ b/src/libmsc/osmo_msc.c
@@ -29,7 +29,7 @@
 #include <osmocom/msc/vlr.h>
 #include <osmocom/msc/osmo_msc.h>
 #include <osmocom/msc/a_iface.h>
-
+#include <osmocom/msc/gsm_04_08.h>
 #include <osmocom/msc/gsm_04_11.h>
 
 #include "../../bscconfig.h"
diff --git a/src/libmsc/ussd.c b/src/libmsc/ussd.c
index e3263d2..7b450a2 100644
--- a/src/libmsc/ussd.c
+++ b/src/libmsc/ussd.c
@@ -34,6 +34,7 @@
 #include <osmocom/msc/debug.h>
 #include <osmocom/msc/osmo_msc.h>
 #include <osmocom/msc/vlr.h>
+#include <osmocom/msc/gsm_04_08.h>
 
 /* Declarations of USSD strings to be recognised */
 const char USSD_TEXT_OWN_NUMBER[] = "*#100#";
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index a9aacbd..6094c9c 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -25,6 +25,7 @@
 #include <osmocom/gsm/protocol/gsm_04_08_gprs.h>
 #include <osmocom/gsm/gsup.h>
 #include <osmocom/gsm/apn.h>
+#include <osmocom/gsm/gsm48.h>
 #include <osmocom/msc/gsm_subscriber.h>
 #include <osmocom/msc/gsup_client.h>
 #include <osmocom/msc/vlr.h>
@@ -35,6 +36,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <limits.h>
+#include <errno.h>
 
 #include "vlr_core.h"
 #include "vlr_auth_fsm.h"
diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c
index 9d9e4c1..41620b9 100644
--- a/src/libvlr/vlr_access_req_fsm.c
+++ b/src/libvlr/vlr_access_req_fsm.c
@@ -21,6 +21,7 @@
 
 #include <osmocom/core/fsm.h>
 #include <osmocom/gsm/gsup.h>
+#include <osmocom/gsm/gsm48.h>
 #include <osmocom/msc/vlr.h>
 #include <osmocom/msc/debug.h>
 
diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c
index c9223f8..ea7529e 100644
--- a/src/libvlr/vlr_lu_fsm.c
+++ b/src/libvlr/vlr_lu_fsm.c
@@ -20,6 +20,7 @@
  */
 
 #include <osmocom/core/fsm.h>
+#include <osmocom/gsm/gsm48.h>
 #include <osmocom/gsm/gsup.h>
 #include <osmocom/msc/vlr.h>
 #include <osmocom/msc/debug.h>
diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c
index d05aa29..a6e0f29 100644
--- a/tests/msc_vlr/msc_vlr_tests.c
+++ b/tests/msc_vlr/msc_vlr_tests.c
@@ -33,6 +33,7 @@
 #include <osmocom/msc/gsup_client.h>
 #include <osmocom/msc/gsm_04_11.h>
 #include <osmocom/msc/debug.h>
+#include <osmocom/msc/gsm_04_08.h>
 
 #if BUILD_IU
 #include <osmocom/msc/iucs_ranap.h>

-- 
To view, visit https://gerrit.osmocom.org/3957
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibff77330de056fad4288cd4c48d016aad8105354
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list