aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gsm_data.h
AgeCommit message (Collapse)AuthorFilesLines
2010-04-09[rsl] Rework the lchan channel release procedureHolger Hans Peter Freyther1-0/+3
1.) free every SAPI from 1-7 and wait for the confirmation and then continue until all of them are freed. If the SAPI is not torn down we will receive a timeout and then we force the RF Channel Release... 2.) once SAPI is down we send the RR Release, SACCH Deact 3.) the abis_rsl will see that all SAPIs are down and then will release channel...
2010-04-09[rsl] Introduce an error state for the lchan and set it on releaseHolger Hans Peter Freyther1-0/+2
When we issue a RF Channel Release in case of a failure we receive RLL release indications after the channel was tearn down and we issue another RF Channel Release as a result. The channel allocator might have already allocated this channel and we release the channel again with another MS on it. Make rsl_rf_chan_release take an error argument and make it set a new state in case of an error and change the RF Channel Release ack to not set the state back to none in case of an error but wait for a timeout that is a bit higher than T3111. I tested this with removing the battery during a phonecall and waiting for the channel failure. With this test we only send the release once.
2010-04-09[rsl] Implement the T3111 timer to delay the RF Channel releaseHolger Hans Peter Freyther1-0/+1
2010-04-06Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-16/+26
* Move to the new log code and update binaries * Catch up with lchan changes from master Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/src/Makefile.am openbsc/src/bsc_rll.c openbsc/src/chan_alloc.c openbsc/src/debug.c openbsc/src/gsm_04_08.c openbsc/src/gsm_04_11.c openbsc/src/gsm_subscriber_base.c openbsc/src/handover_logic.c openbsc/src/silent_call.c openbsc/src/transaction.c openbsc/src/vty_interface.c openbsc/src/vty_interface_cmds.c
2010-03-28RSL: keep track of ip.access dynamic TCH/PDCH activationHarald Welte1-1/+1
We use the (currently unusued) flags member of the bts_trx_ts structure to track if a dynamic TCH/PDCH is currently on PDCH mode or not.
2010-03-26bsc_msc_ip: Keep track of active connections so we could clear them.Holger Hans Peter Freyther1-0/+3
Keep track of SCCP connections so we can clear them when the MSC is going down.
2010-03-25Store the GSM BTS in the gsm subscriber connectionHolger Hans Peter Freyther1-1/+2
Remove further usage of lchan from the gsm 04.11 bits
2010-03-25lchan: Create a structure for MSC data of the lchanHolger Hans Peter Freyther1-27/+36
Prepare to split the BSC and the MSC part by putting the MSC data for a connection into a "gsm_subscriber_connection" struct and renaming the macros.
2010-03-25channel requests: Add configuration to handle paging any with TCHHolger Hans Peter Freyther1-0/+3
It is possible that the MSC is not sending the channel type it needs for the operations it wants to do. Add a configuration option to assign a TCH in case of paging any requests. It can be a good idea to leave SDCCHs free for location updating requests.
2010-03-25channel request: Store the to be assigned channel type in the GSM NetworkHolger Hans Peter Freyther1-0/+2
Store the mapping from request to channel type in the GSM Network struct as there is some policy involved with handling the request. E.g. in a half rate network we don't want emergy calls to be getting a TCH/F, or we want to have a different policy for early/late assignment of phone calls. Update the table when creating the network and when the neci is changed.
2010-03-24Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-0/+18
Keep a static version as the shell script is not dealing well with branch tags/names containing text. Resolve merge conflict in the Makefile.am by adding both sides to the list of sources for the libbsc.a Conflicts: openbsc/configure.in openbsc/src/Makefile.am
2010-03-24Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-52/+77
* Move to libosmocore * Move to new debugging architecture * Register the BTS types * Has only been compile tested Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/include/openbsc/ipaccess.h openbsc/include/openbsc/mgcp.h openbsc/include/openbsc/msgb.h openbsc/include/openbsc/tlv.h openbsc/src/Makefile.am openbsc/src/abis_rsl.c openbsc/src/bsc_init.c openbsc/src/bsc_mgcp.c openbsc/src/chan_alloc.c openbsc/src/debug.c openbsc/src/gsm_subscriber_base.c openbsc/src/msgb.c openbsc/src/rest_octets.c openbsc/src/sccp/sccp.c openbsc/src/vty/command.c openbsc/src/vty_interface.c openbsc/tests/Makefile.am
2010-03-22GPRS: make NSEI configurable from VTYHarald Welte1-0/+1
2010-03-22GPRS: make NSVC parameters VTY-configurableHarald Welte1-0/+4
2010-03-22Create new gprs-conf branch with the non-SGSN part of the gprs branchHarald Welte1-0/+13
This new gprs-conf branch is intended to contain everything needed to configure GPRS in the nanoBTS, but without implementing the SGSN/GGSN functionality. The SGSN/GGSN development will happen in a branch based on this branch called "gprs-sgsn"
2010-03-04decleare gsm_bts_model_register()Harald Welte1-0/+2
2010-03-04move some gsm48 utility functions to libosmocoreHarald Welte1-3/+0
* gsm48_generate_lai() gsm48_generate_mid_from_tmsi() gsm48_generate_mid_from_imsi() * gsm48_cc_msg_names[]
2010-03-01value_string functions and some RSL related stuff has moved to libosmocoreHarald Welte1-8/+0
2010-02-20split 'libosmocore' from openbsc codebaseHarald Welte1-14/+6
This library is intended to collect all generic/common funcitionality of all Osmocom.org projects, including OpenBSC but also OsmocomBB The library currently includes the following modules: bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer, tlv_parse, linuxlist msgb allocation error debugging had to be temporarily disabled as it depends on 'debug.c' functionality which at the moment remains in OpenBSC
2010-02-07[vty] Add a config for a simple OpenBSC BSC tokenHolger Hans Peter Freyther1-0/+3
We will use this token to identify us at the MSC for now. This assumes that something like OpenVPN is already used to secure the networking. In the future we will explore using TLS for the communication and certificates for the authentication.
2010-01-28[bsc] Implement early assignment for CC for the MT case.Holger Hans Peter Freyther1-0/+1
In case we need to handle speech but we are currently on a SDCCH we need to assign a new channel and close the old one. This implementation should have the correct flow of things but we might need to fix some error situations properly. It is implemented by keeping a secondary_lchan pointer that will be swapped into the lchan pointer after the assignment complete message from the MS. The old lchan will be deactivated (the SACCH should stay open). We have to manually remove the subscr from the lchan structure to properly close things down.
2010-01-27[msc] Fix compilation by adding blocked_gsm to the structHolger Hans Peter Freyther1-0/+1
2010-01-10[OML] parse attributes depending on BTS typeHarald Welte1-1/+11
Some NM attributes are defined differently depending on the BTS type. Having one big nm_att_tlvdef[] table for all BTS types is no longer sufficient. This patch * introduces 'struct gsm_bts_model' to describe a BTS model * adds definitions of gsm_bts_model for BS-11 and nanoBTS * changes the abis_nm_tlv_parse() function: include a bts pointer
2010-01-07introduce new gsm_bts_trx_by_nr() functionHarald Welte1-0/+1
2010-01-07[bssap] More brown paper... Make variables really signedHolger Hans Peter Freyther1-2/+2
-1 is assigned in case the variables are not set. This means it must be a signed type (as the comment says), now really use a signed type.
2010-01-07[bssap] Allow to use a different country code tooHolger Hans Peter Freyther1-0/+1
* Be able to have a country code in the air but use a different country code when talking to the core network. * Now both country and network code can be different on air and on the MSC communication.
2010-01-05[bsc_msc_ip] Turn the MNC hack into a config optionHolger Hans Peter Freyther1-0/+3
* Make it possible to have a different MNC in the RSL traffic than in the core network. * Introduce the "core network code NUMBER" variable. If it is set this network code will be used in traffic with the MSC. * Use the core_network_code number when sending a packet to the MSC * Regenerate the LAI (this is where I could have a bug) when sending packets to the BTS. * Add size checks. This is not tested, I might got something wrong.
2010-01-03gsm_data: Move auth related structure earlierSylvain Munaut1-20/+22
This is gonna be needed by the next commit ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03gsm_data: Fix sres to be 4 bytesSylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03db: Add issued/use_count/key_seq fields to AuthTuplesSylvain Munaut1-0/+2
Theses will be useful to know if we can reuse the tuples or if we should renew. The 'issued' is currently purely informative. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-01keep 'silent call' state in struct lchanHarald Welte1-0/+2
This enables us to reliably detect if a lchan is part of a silent call or not.
2009-12-31[misc] Utilize rf_locking by setting the nm_state.administrativeHolger Hans Peter Freyther1-3/+0
* On start the vty code will call the abis_nm method and this will set the administrative state to unlock/lock * During startup the BTS will report its state as well and would possible overwrite the set administrative. We are only going to update the administrative if it was 0 before. This appears to work on all of my tests. In case this will not be the case for others we will have to split the administrative into two sets one for the BTS and one for the BSC.
2009-12-29rsl: add new 'gsm_trx_name()' function and use itHarald Welte (local)1-0/+1
2009-12-29Introduce gsm_lchans_name() for human readable lchan state nameHarald Welte1-0/+1
Also, use this new function to dump lchan state on VTY and to improve readability of RSL log messages.
2009-12-29RSL: Introduce LCHAN_S_REL_REQ stateHarald Welte1-0/+1
This state will help us to differentiate between channels where we have requested the release, and channels that are actually released.
2009-12-28set the TRX nominal power by default and/or VTYHarald Welte (local)1-0/+1
2009-12-28Introduce and use gsm_lchan_name() in addition to gsm_ts_name()Harald Welte (local)1-0/+1
In many cases we actually want a name / unique ID for the lchan, not just for the on-air timeslot... especially in SDCCH/8 case, where 8 SDCCHs share one timeslot...
2009-12-28Introduce new ACT_REQ state to prevent race condition during channel allocationHarald Welte (local)1-0/+1
When we allocate a channel, we send the RSL CHAN ACT REQ and wait until we get a CHAN ACT ACK. Only the ACK will change the state, so there is a race where we allocate that same channel to a different channel request before we get the ACT ACK. Introducing a new ACT_REQ state resolves this issue.
2009-12-28rename gsm_lchan_name() to gsm_lchant_name()Harald Welte (local)1-1/+1
2009-12-26add 'get_string_value()' as inverse function of 'get_value_string()'Harald Welte (local)1-0/+1
2009-12-24[debug] Introduce DREF debug category for reference countingHarald Welte1-2/+2
2009-12-24[authentication] Code for retrieving authentication data from SQL DBHarald Welte1-0/+19
This is the first step towards supporting actual A3/A8 authentication.
2009-12-22statistics: Introduce 'struct counter' instead of using unsigned longHarald Welte1-25/+26
This has the advantage that counters can be added all over the code very easily, while having only one routine that stores all of the current counter values to the database. The counters are synced every 60 seconds, providing relatively fine grained statistics about the network usage as time passes by.
2009-12-22Merge commit 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-4/+138
Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/src/Makefile.am openbsc/src/abis_rsl.c openbsc/src/chan_alloc.c openbsc/src/gsm_04_08.c openbsc/src/gsm_data.c openbsc/src/vty_interface.c The biggest problem is the moving of the RTP code into the RSL layer. This may break quite some things...
2009-12-22keep some internal statistics inside OpenBSCHarald Welte1-0/+45
the statistics will give us some idea about the network load and performance.
2009-12-21remove duplicate flag for cell barringHarald Welte1-1/+0
it's sufficient if we keep the state of cell barring in one place
2009-12-21[handover] Real handover algorithmHarald Welte1-0/+30
This implements the handover algorithm (and associated parameters) as described in Chapter 8 of the book "Performance Enhancements in a Frequency |Hopping GSM Network" by Thomas Toftegard Nielsen and Jeroen Wigard. The parameters such as averaging windows are configured in struct gsm_network. We keep some state to trakc up to 10 neighbors as they are being reported from the MS. This has so far only been tested in a network with two BTS that have each other as neighbor. Networks with morge neighbors might encounter bugs.
2009-12-21RSL: keep track if a channel is active or notHarald Welte1-0/+9
This allows us to block packets that we have received after the channel is no longer being used. This is visible during handover, where we still receive a measurement report after the MS has switched to the new channel. This leftover measurement report then attempts to trigger another handover, which si bogus and will fail - and thus only consumes resources. With the new LCHAN_S_ACTIVE state, we can check for this when processing the measurement report.
2009-12-20remove hand full of 'extern ipacc_rtp_direct' definitionsHarald Welte1-0/+1
and instead declare it in gsm_data.h
2009-12-19[handover] add VTY parameter to enable/disable handoverHarald Welte1-0/+3