Add basic SI2quater support
* support for sending arbitrary static SI2quater.
* vty interface for neightbor EARFCNs specific to SI2quater.
* dynamic generation of SI2quater messages.
* unit test for SI2quater messages.
Fixes: OS#1630
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 000207d..cbc0c77 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -105,6 +105,7 @@
#define A38_XOR_MAX_KEY_LEN 16
#define A38_COMP128_KEY_LEN 16
#define RSL_ENC_ALG_A5(x) (x+1)
+#define MAX_EARFCN_LIST 512
/* is the data link established? who established it? */
#define LCHAN_SAPI_UNUSED 0
@@ -715,12 +716,16 @@
struct bitvec neigh_list;
struct bitvec cell_alloc;
struct bitvec si5_neigh_list;
+ struct bitvec si2quater_na_list;
+ struct osmo_earfcn_si2q si2quater_neigh_list;
struct {
/* bitmask large enough for all possible ARFCN's */
uint8_t neigh_list[1024/8];
uint8_t cell_alloc[1024/8];
/* If the user wants a different neighbor list in SI5 than in SI2 */
uint8_t si5_neigh_list[1024/8];
+ uint8_t meas_bw_list[MAX_EARFCN_LIST];
+ uint16_t earfcn_list[MAX_EARFCN_LIST];
} data;
} si_common;
diff --git a/openbsc/include/openbsc/rest_octets.h b/openbsc/include/openbsc/rest_octets.h
index 9560b14..fd5ec6a 100644
--- a/openbsc/include/openbsc/rest_octets.h
+++ b/openbsc/include/openbsc/rest_octets.h
@@ -1,10 +1,15 @@
#ifndef _REST_OCTETS_H
#define _REST_OCTETS_H
+#include <stdbool.h>
#include <openbsc/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,
+ const struct osmo_earfcn_si2q *e, bool uarfcn,
+ bool earfcn);
struct gsm48_si_selection_params {
uint16_t penalty_time:5,