Commit Graph

145 Commits

Author SHA1 Message Date
Sylvain Munaut c593cf100a gsm_04_08: Improve gsm48_rx_mm_auth_resp debug in failure case
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-14 20:43:52 +02:00
Sylvain Munaut ba87f458ec gsm_04_08: Establish secure channel on CM SERVICE REQUEST
Note that establishing a secure channel is considered to
be an implicit CM SERVICE ACK.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-14 20:43:52 +02:00
Sylvain Munaut 267fba0a2b gsm_04_08: Establish secure channel on LOCATION UPDATE
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-14 20:43:51 +02:00
Sylvain Munaut 2030a2a228 gsm_04_08: Store the key_seq given in LOC UPD REQUEST in state
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-14 20:43:51 +02:00
Sylvain Munaut 30a15384f4 gsm_04_08: Add a operation to enable ciphering on a lchan
This will take care of the auth/check/enable cipher sequence
and call a callback function when done.

Currently the negotiated Kc is saved but not re-used, so
there is an authentication each time ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-14 20:43:51 +02:00
Holger Hans Peter Freyther 2a9285c028 bsc_api: Move some parts over to the BSC API. 2010-06-14 18:26:09 +08:00
Harald Welte f5f512cc59 GSM 04.08: Improve IMEI recording in hlr.sqlite3 for rejected subscribers
If we send the IDENTITY REQUEST for IMEI before sending the IDENTITY
REQUEST for IMSI, the probability is higher that we receive the IMEI
response and associate it with the respective subscriber.
2010-06-07 17:56:32 +02:00
Holger Hans Peter Freyther f6903dee89 gsm48: Add size checks to the paging response mi parsing.
We go from no size checks to some content checking. We should
refactor the whole classmark2 + mi parsing that is used throughout
the code into one place with proper size checking. This is the
start and requires a new libosmocore as well.
2010-05-16 01:51:14 +08:00
Holger Hans Peter Freyther 5d65806472 gsm48: Typo fix. 2010-05-15 05:34:09 +08:00
Holger Hans Peter Freyther acf8a0c59f [misc] Remove whitespace from the end of the line. 2010-03-29 08:47:44 +02:00
Holger Hans Peter Freyther e95d4825f5 lchan: Change transaction to work on the GSM Subscriber Connection
Change the MSC transaction code to operate on a GSM Subscriber Connection
instead of the lchan. This will help us to separate the two commands properly.
2010-03-25 09:07:28 +01:00
Holger Hans Peter Freyther 68884aa156 lchan: Create a structure for MSC data of the lchan
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-25 09:07:28 +01:00
Harald Welte e95daf1925 convert openbsc to use libosmocore-0.1.1 API
the 0.1.1 API is cleaned up and removes all exported global static
arrays (like rlm_cause_strs).  There are now proper accessor functions.
2010-03-25 12:13:02 +08:00
Harald Welte 55c8f35e53 move large parts of mncc.h and gsm48 encode/decode into libosmocore 2010-03-07 23:40:35 +01:00
Harald Welte afedeabd91 move some gsm48 utility functions to libosmocore
* gsm48_generate_lai() gsm48_generate_mid_from_tmsi() gsm48_generate_mid_from_imsi()
* gsm48_cc_msg_names[]
2010-03-04 10:55:40 +01:00
Harald Welte 474d19f5c0 remove gsm04.08 utility code that has been moved to libosmocore 2010-03-02 23:18:30 +01:00
Harald Welte dfe6c7d910 split 'libosmocore' from openbsc codebase
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-20 16:27:23 +01:00
Sylvain Munaut 8608e7c133 gsm_04_08: Add RAND debug output in gsm48_tx_mm_auth_req
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:53:39 +01:00
Sylvain Munaut bd55a6dd31 gsm_04_08: Specify key_seq when calling gsm48_tx_mm_auth_req
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:53:22 +01:00
Harald Welte 510087752e introduce and implement silent_call_reroute() and silent_call_rx()
Thise two functions are interfacing with the 04.08 layer 3 to
determine if a particular message should be handled inside
the OpenBSC layer 3, or if it should be handled in the silent call
handler.
2010-01-01 10:59:20 +01:00
Harald Welte (local) 198d5ad6f4 print LAC and BTS number when showing location update reject 2009-12-26 22:48:16 +01:00
Harald Welte (local) 47df39931c generate INFO events for CC SETUP and LOC UPD REJ 2009-12-26 22:48:00 +01:00
Harald Welte 2e6d4684ff add (and use) new subscr_name() function to get name or IMSI 2009-12-24 14:50:24 +01:00
Harald Welte 5d24ba1eb4 don't print directly to stderr, use LOGP() 2009-12-24 12:13:17 +01:00
Harald Welte ffa55a4e87 statistics: Introduce 'struct counter' instead of using unsigned long
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-22 20:42:40 +01:00
Holger Hans Peter Freyther 92ffd926ef [gsm48] Move gsm48_parse_meas_rep to gsm_04_08_utils
Move the function over to the _utils side as handover
measurement is compiled into libbsc and we don't want
to end up with linking errors.
2009-12-22 07:45:17 +01:00
Harald Welte 24ff6ee0a3 keep some internal statistics inside OpenBSC
the statistics will give us some idea about the network load and
performance.
2009-12-22 00:41:05 +01:00
Harald Welte f7c28b099f [handover] Real handover algorithm
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-21 13:33:10 +01:00
Harald Welte a72273e176 rename ipacc_connect_proxy_bind() to rsl_ipacc_mdcx_to_rtpsock()
Our RTP sockets are no longer just for the proxy mode, so having
"proxy" in the function name is really misleading.
2009-12-20 16:53:53 +01:00
Harald Welte 17f5bf64f1 Move RTP socket handling out of signal handlers into abis_rsl
This is not really nice, but we will soon have multiple users of
the CRCX / MDCX / DLCX signals, and we cannot guarantee the ordering
of them.  So as a workaround, we move the RTP socket creation and
deletion into the core abis_rsl codebase.
2009-12-20 15:42:44 +01:00
Harald Welte f88c8a02fc remove hand full of 'extern ipacc_rtp_direct' definitions
and instead declare it in gsm_data.h
2009-12-20 14:18:11 +01:00
Harald Welte 31981a0051 add FIXME to IMSI DETACH INDICATION: we need to release all transactions 2009-12-20 13:21:01 +01:00
Harald Welte da7ab74298 RTP-enable MNCC API for LCR + ip.access
Instead of passing TRAU frames down the MNCC API to the call control
application like MNCC, we now decode the TRAU frame into the actual codec
frame.  We do the same with the RTP packets in case of ip.access and
thus have a unified format of passing codec data from the BTS to
an application, independent of the BTS type.

This is only implemented for V1 full-rate at the moment, and needs
to be fixed.
2009-12-19 22:23:05 +01:00
Harald Welte 51cec5f725 measurement report parsing: NO-NCELL-M of 7 tells us no neighbors 2009-12-19 18:35:56 +01:00
Harald Welte 5e3d91bff7 ip.access: Keep a full copy of local and remote IP/PORT in lchan
Keeping all parameters for each RTP connection in the abis_ip member of
lchan will help us with actual TCH handover later on.
2009-12-19 18:35:56 +01:00
Sylvain Munaut ea3f674710 Fix subscr ref leak for multi CM SERV REQ
Multiple CM SERVICE REQUEST can happen on a single RR
connection, in this case, since the subscr reference is
tracked through lchan->subscr and will only be put'd once
on lchan_free, we need to make sure we don't get several
reference ....

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-12-19 03:22:25 +01:00
Harald Welte 73ddaeddd2 measurement report: correctly parse BSIC of first neighbor cell 2009-12-16 23:29:12 +01:00
Harald Welte a2f74b8477 04.08: fix off-by-one error while parsing measurement results 2009-12-16 16:49:21 +01:00
Harald Welte d12b0fdf51 introduce cache of 6 last recently received measurement reports for each lchan 2009-12-15 21:36:05 +01:00
Harald Welte f1dae1924a 04.08 MEAS REP: Convert relative cell number to ARFCN
Since we are keeping a bitvec of the neighbor cells, we can now use
bitvec_get_nth_set_bit() to determine the ARFCN for each reported
cell in the 04.08 MEASUREMENT REPORT.
2009-12-14 22:24:28 +01:00
Harald Welte 1e191c59f6 fix compiler warnings in gsm_04_08.c 2009-12-14 17:51:15 +01:00
Harald Welte 648b6ce083 Add VTY setting for whether or not to sending MM INFO 2009-12-14 09:00:24 +01:00
Harald Welte 7659de1bcb introduce new signal every time we get a mobile identity 2009-12-13 12:39:18 +01:00
Harald Welte 09b7e7fa43 Gracefully reject non-speech calls
As we currently really only deal with voice/speech calls and don't
support FAX and DATA (CSD) calls, we now gracefully reject them.
2009-12-12 21:36:53 +01:00
Harald Welte b83d938565 [04.08] use lchan_auto_release to quickly close channel
In some cases, we can try to close the lchan a bit faster than our
lchan release timeout:
* After we've sent LOC UPD ACCEPT and MM INFO
* After a phone has confirmed the RELEASE of a call
2009-12-12 21:00:48 +01:00
Harald Welte 1085c097e3 location updating reject cause now specified on VTY rather than command line argument 2009-12-06 12:22:59 +05:30
Harald Welte 2c82899135 move RTP socket information from timeslot to lchan
With ip.access, in case of TCH/H, we have one RTP stream for each half-slot
(lchan), not just one per on-air timeslot.  This is quite different from
a classic BTS where the TRAU frames of the two TCH/H channels would be
part of the same 16k sub-slot in a E1 timeslot.
2009-12-02 01:56:49 +05:30
Harald Welte d011e8b958 [handover] Introduce new handover related LCHAN signals
This introduces the signals S_LCHAN_ACTIVATE_{ACK,NACK} and
S_LCAN_HANDOVER_{FAIL,COMPL,DETECT} as well as code that actually issues
those signals.  The signals are relevant for a yet-to-be-written handover
control logic.
2009-11-29 22:45:52 +01:00
Harald Welte ccd5a8892d print debug statement in case of HANDOVER COMPLETE or HANDOVER FAILED 2009-11-29 20:02:20 +01:00
Harald Welte 3c7dc6ed50 New complete measurement result/report handling
This patch extends struct gsm_meas_rep into a complete structure containing all
information from both uplink and downlink measurement results/reports.

This is a first step to provide this complete measurement data as a C structure
into a to-be-implemented handover decision algorithm.
2009-11-29 19:07:28 +01:00