From ed5cacb240b846c106f0fc6a3ab8e8721f4c70a5 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 17 Aug 2011 22:44:07 +0200 Subject: src: port openBSC over libosmo-abis This is a big patch that ports openBSC over libosmo-abis. Sorry, the changes that are included here are all dependent of libosmo-abis, splitting them into smaller pieces would leave the repository in some intermediate state, which is not desired. The main changes are: - The directory libabis/ has been removed as it now lives in libosmo-abis. - new configuration file format for nanoBTS and HSL femto, we need to define the virtual e1_line and attach it to the OML link. - all the existing BTS drivers (nanoBTS, hsl femto, Nokia site, BS11 and rbs2000) now use the new libosmo-abis framework. - use r232 input driver available in libosmo-abis for bs11_config. - use ipa_msg_recv instead of old ipaccess_read_msg function. - delete definition of gsm_e1_subslot and input_signal_data. These structures now lives in libosmo-abis. Most of this patch are deletions of libabis/ which has been moved to libosmo-abis. This patch also modifies openBSC to use all the new definitions available in libosmocore and libosmo-abis. In order to do that, we have replaced the following: - DINP, DMI, DMIB and DMUX by their respective DL* correspondences. - SS_GLOBAL by SS_L_GLOBAL - SS_INPUT by SS_L_INPUT - S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN - SS_INPUT by SS_L_INPUT - S_INP_* by S_L_INP_* sub-signals - E1INP_NODE by L_E1INP_NODE vty node This patch has been tested with: - one nanoBTS - the HSL femto with the examples available under libosmo-abis - BS11 with both dahdi and misdn drivers. --- openbsc/include/openbsc/trau_frame.h | 64 ------------------------------------ 1 file changed, 64 deletions(-) delete mode 100644 openbsc/include/openbsc/trau_frame.h (limited to 'openbsc/include/openbsc/trau_frame.h') diff --git a/openbsc/include/openbsc/trau_frame.h b/openbsc/include/openbsc/trau_frame.h deleted file mode 100644 index c15e24b7f..000000000 --- a/openbsc/include/openbsc/trau_frame.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef _TRAU_FRAME_H -#define _TRAU_FRAME_H -/* TRAU frame handling according to GSM TS 08.60 */ - -/* (C) 2009 by Harald Welte - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -#include - -/* 21 for FR/EFR, 25 for AMR, 15 for OM, 15 for data, 13 for E-data, 21 idle */ -#define MAX_C_BITS 25 -/* 260 for FR/EFR, 256 for AMR, 264 for OM, 288 for E-data */ -#define MAX_D_BITS 288 -/* for all speech frames */ -#define MAX_T_BITS 4 -/* for OM */ -#define MAX_S_BITS 6 -/* for E-data */ -#define MAX_M_BITS 2 - -struct decoded_trau_frame { - uint8_t c_bits[MAX_C_BITS]; - uint8_t d_bits[MAX_D_BITS]; - uint8_t t_bits[MAX_T_BITS]; - uint8_t s_bits[MAX_S_BITS]; - uint8_t m_bits[MAX_M_BITS]; -}; - -#define TRAU_FT_FR_UP 0x02 /* 0 0 0 1 0 - 3.5.1.1.1 */ -#define TRAU_FT_FR_DOWN 0x1c /* 1 1 1 0 0 - 3.5.1.1.1 */ -#define TRAU_FT_EFR 0x1a /* 1 1 0 1 0 - 3.5.1.1.1 */ -#define TRAU_FT_AMR 0x06 /* 0 0 1 1 0 - 3.5.1.2 */ -#define TRAU_FT_OM_UP 0x07 /* 0 0 1 0 1 - 3.5.2 */ -#define TRAU_FT_OM_DOWN 0x1b /* 1 1 0 1 1 - 3.5.2 */ -#define TRAU_FT_DATA_UP 0x08 /* 0 1 0 0 0 - 3.5.3 */ -#define TRAU_FT_DATA_DOWN 0x16 /* 1 0 1 1 0 - 3.5.3 */ -#define TRAU_FT_D145_SYNC 0x14 /* 1 0 1 0 0 - 3.5.3 */ -#define TRAU_FT_EDATA 0x1f /* 1 1 1 1 1 - 3.5.4 */ -#define TRAU_FT_IDLE_UP 0x10 /* 1 0 0 0 0 - 3.5.5 */ -#define TRAU_FT_IDLE_DOWN 0x0e /* 0 1 1 1 0 - 3.5.5 */ - - -int decode_trau_frame(struct decoded_trau_frame *fr, const uint8_t *trau_bits); -int encode_trau_frame(uint8_t *trau_bits, const struct decoded_trau_frame *fr); -int trau_frame_up2down(struct decoded_trau_frame *fr); -uint8_t *trau_idle_frame(void); - - -#endif /* _TRAU_FRAME_H */ -- cgit v1.2.3