Commit Graph

64 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther c42ad8b686 misc: Move from u_int to uint types of stdint.h
This was done with sed on the files.
2011-04-18 17:31:39 +02:00
Pablo Neira Ayuso 136f453dd2 src: use new library libosmogsm and new path to headers in libosmocore
libosmogsm is a new library that is distributed in the libosmocore.
Now, openbsc depends on it. This patch gets openbsc with this
change.

This patch also rewrites all include path to the new
osmocom/[gsm|core]

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:17:56 +01:00
Harald Welte 371efe5955 mncc_sock: Clear all calls if MNCC application (LCR) disconnects 2011-01-01 17:23:42 +01:00
Harald Welte e8e432dd59 MNCC: remove 'upqueue'
The MNCC messages now again get directly handled by the net->mncc_recv()
callback.  If the callee wants to put them in a queue, it' his business
to do that.
2011-01-01 17:23:42 +01:00
Harald Welte 76556376c3 MNCC: rename mncc_send() to mncc_tx_to_cc()
This name clearly indicates: MNCC api transmits to Call Control,
i.e. down from the L4/application into the L3 04.08 code.
2011-01-01 17:23:41 +01:00
Harald Welte 985263e55f GPRS: enhance msgb headroom/tailroom for SGSN (GMM)
In the GPRS NS protocol stack, the amount of NS/BSSGP headers like MS RADIO
CAPA INFO can be quite long.  In order to fit the full user message and
those headers, we have to enlarge the head/tailroom of the msgb allocations.
2010-12-23 23:37:55 +01:00
Holger Hans Peter Freyther 78891078fe chan: Store the to be assigned channel type in the GSM Network.
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-09-06 09:36:02 +08:00
Holger Hans Peter Freyther 02d39b2c4d msc: Create a dummy operation to keep the channel open for five seconds
* We should create the transaction for SMS, CC on the CM Service Request
  but for now we will use a band aid and create a dummy operarion to wait
  five seconds for the transaction to be opened.
2010-07-05 15:36:08 +08:00
Holger Hans Peter Freyther db4ef0d369 bsc_api: Remove the lchan usage from the Paging Response handling. 2010-06-21 16:40:09 +08:00
Harald Welte a39b0f2bb7 [BSC] Implement per-timeslot ARFCN lists for frequency hopping
We now compute the Cell Channel Description for SI 1 by bit-wise
OR of the ARFCN bitmask of each timeslot on all the TRX of the BTS.

Also, support generating a GSM 04.08 Channel Description IE for
the hopping case (with HSN/MAIO instead of ARFCN).

What's still missing now: Sending the 04.08 Mobile Allocation IE
2010-06-20 10:44:53 +02:00
Holger Hans Peter Freyther 9764331062 bsc_api: Move gsm48_rcvmsg into the BSC API and dispatch.
The next step in the way to the BSC API. We have a clear a
new connection was opened signal now... and the MSC could
use it...
2010-06-17 16:41:25 +08:00
Holger Hans Peter Freyther 9ce1b27fbf bsc_api: Use gsm_subscriber_connection in rrlp.c 2010-06-16 15:42:40 +08:00
Holger Hans Peter Freyther e9ed340425 bsc_api: Cut back on direct lchan usage. 2010-06-16 15:42:21 +08:00
Holger Hans Peter Freyther 230a4d886d gsm48: Split LU Reject sending and generation into two. 2010-06-15 19:40:05 +08:00
Holger Hans Peter Freyther 2c0f16699e gsm48: Separate CM Service Reject sending and creation.
Split out the msg generation from the sending, this will
be used by the nat to send a refusal message.
2010-06-15 19:39:27 +08:00
Holger Hans Peter Freyther 9140174faa bsc_api: Remove the lchan argument from gsm48_tx_mm_info. 2010-06-15 14:16:02 +08:00
Holger Hans Peter Freyther 9c137a7819 bsc_api: Move most of GSM0408 to the DTAP API...
* gsm_04_08_utils.c will directly send the message...
* gsm_04_08.c will use the DTAP API, add a new method to pull
  in the data from the transaction...
2010-06-15 13:57:40 +08:00
Holger Hans Peter Freyther f6fb3efcba bsc_api: Switch gsm_04_08.c to use the clear request of the API. 2010-06-15 13:16:52 +08:00
Holger Hans Peter Freyther b7b9c1d4d3 gsm48: Add a generic MI from classmark+mi extraction.
This is a generic MI extraction for the MI if it is followed
after a classmark. For the Phase1 Phones the classmark2 is not
four bytes but it might be different. This code can be used
by the CM Service Request handling as well.
2010-05-16 01:51:30 +08: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
Harald Welte 3c69a4cdbe make gsm48_msgb_alloc() a static inline function
This resolves some dependency problems (i.e. osmo_sgsn not needing
to link gsm_04_08_utils.o which has RSL dependencies)
2010-05-04 07:17:32 +02:00
Harald Welte ca8d0063f9 remove gsm48_mi_to_string() as it is now in libosmocore 0.1.3 2010-03-28 18:28:29 +08: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 13f52974e6 move GSM protocol definitions to include/osmocore/protocol/* 2010-02-20 18:56:00 +01:00
Holger Hans Peter Freyther 550197fd8c [gsm48] Allow to send the assignment command on a different lchan
Change the signature to take the lchan were the message is supposed
to be sent and the lchan which is supposed to be assigned.
2010-01-28 12:45:57 +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 7a7a0d5428 make handover reference a function call argument 2009-12-17 00:25:18 +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 a43f789a0a Replace template-based SYSTEM INFORMATION with real implementation
Before this commit, OpenBSC used templates for the SYSTEM INFO
1, 2, 3, 4, 5 and 6 messages.  Those templates were patched in
various places to reflect the network config like ARFCN.

Now, we actually generate those SI messages ourselves, using
values from the configuration file, and even calculating neighbor
cell lists.

All bts'es that you have configured in OpenBSC will end up in
the neighbor cell list - which should be more than sufficient for
the current small-single-site networks.
2009-12-01 18:04:30 +05:30
Harald Welte 798418a068 [handover] Implement handover control logic
Code to implement handover control logic.  A yet-to-be-implemented
handover algorithm will call bsc_handover_start(old_lchan, new_bts)
to start the handover process.
2009-11-29 22:56:14 +01:00
Harald Welte 8c83af65c1 [handover] Implement 04.08 HANDOVER COMMAND
This is needed by a yet-to-be-implemented handover algorithm, after
it has allocated a new lchan for the MS.  Also missing: handling
the actual HANDOVER COMPLETE / FAIL messages in response.
2009-11-29 20:02:53 +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
Holger Hans Peter Freyther d61654cf54 [chan] Alloc SDCCH for certain reserved types
Follow notes:
    2.) Allocate a SDCCH for type "LMU"
    2a.)Allocate a SDCCH for the three reserved types
    2b.)Pick LCHAN type none to "ignore" the request
2009-11-22 05:28:23 +01:00
Holger Hans Peter Freyther ea52802762 [lchan] RSL and RR need the multirate config, place it in the lchan
Both GSM 04.08 RR and GSM 08.58 RSL need the multirate config
in the channel modify. Place the config in the lchan, change
the gsm48 methods to not take the argument, change the RSL
implementation to make use of it with the right IE.

The other code should use the t(l)v_put routines as well but
were left untouched for now.
2009-11-19 11:42:03 +01:00
Holger Hans Peter Freyther a6bcc74716 [gsm48] When picking AMR we need to supply the multirate config
On channel mode modify and assignment command when using
the a multirate code the multirate configuration must be
present in the packet.
Add a parameter and add a warning when using it in a
broken way.
2009-11-17 18:20:17 +01:00
Holger Hans Peter Freyther 135a7c65cd [neci] Separate handling of chan requested for paging any
Allow to handle the channel requested differently based
on the NECI value for the "paging any" case. This will allow
to open a TCH/H, TCH/F depending on the neci mode.
2009-11-17 18:19:25 +01:00
Holger Hans Peter Freyther f7d752f7ac [si] Make it possible to set the NECI value...
Allow to configure the NECI value... and change code
that is relying on the NECI value.
2009-11-17 09:46:33 +01:00
Holger Hans Peter Freyther f520e6439a [gsm48] Handle the RR CHAN MODIFY ACK in the gsm04_08_utils
Move the handling code to the gsm_04_08_utils.c and add a
note that the method value needs to be checked.
2009-10-27 04:52:30 +01:00
Holger Hans Peter Freyther ff3f260e4f [gsm48] Move RR CHANNEL MODIFY to gsm_04_08_utils.c
Be able to send RR CHANNEL MODIFY from the BSC/MSC code
as well. Move the method that knows about the IPAccess RTP
and issues the "bind" to the utils tool
2009-10-27 04:52:29 +01:00
Holger Hans Peter Freyther e81a6109f9 [gsm48] Add generation of ASSIGNMENT COMMAND to the 0408 utils
Add code to generate an assignment command for a given lchan. It
is expected that the lchan is modified already and the mode will
be picked up from their. Currently only the mandantory items
are supported.
2009-10-27 04:52:29 +01:00
Holger Hans Peter Freyther 8b77a34131 [rrlp] Fix compiler warnings
The apdu is static const u_int8_t. Change the signature to
have a const in there to make the compiler happy, include
chan_alloc.h for lchan methods.
2009-10-22 15:42:19 +02:00
Holger Hans Peter Freyther ca6bc1d10f [gsm0408] Add parameter to gsm48_send_rr_ciph_mode for controling the response
This parameter controls if the response should include the
IMEISV or not. This will be set by the MSC and this is why
this parameter was added.
2009-10-06 04:34:25 +02:00
Holger Hans Peter Freyther e48b9562a4 [lac] Do not use the reserved LAC 0x0 for two different things
We are using LAC=0 for remembering that a GSM subscriber is
detached. I recently added code to gsm_bts_by_lac that will
return every BTS in case the lac is 0. Harald highlightes
that we would now search for detached subscribers at every
BTS of our network which is clearly not what we want.

Introduce two defines for the two reserved LAC, add a
pointer to the specification, check that our config files
do not contain these reserved values, use the define
and change gsm_bts_by_lac to use the other define.
2009-10-01 04:07:15 +02:00
Holger Hans Peter Freyther 3ee5d3e8af [gsm0408] Move paging handling to gsm_04_08_utils.c
Add one method to extract the MI which will allow to load
the gsm_subscriber depending on the MSC/BSC setup and then
use gsm48_handle_paging_resp to finish the paging response
handling.
2009-09-28 12:50:49 +02:00
Holger Hans Peter Freyther adc1478a47 [gsm0408] Move send_siemens_mrpci to gsm_04_08_utils.c 2009-09-28 12:50:49 +02:00
Holger Hans Peter Freyther c4a49e3e2d [bsc] Store the cell_identity in gsm_bts and set it on the SI3 and SI6
Transfering the cell_identity from BSC to MSC is required for the
on-waves.com support. Allow to set the cell_identity in the cfg
file and patch the system information tables to set it.
2009-09-28 06:04:40 +02:00
Harald Welte 23b710fa4f Merge branch 'master' into encryption 2009-09-27 11:13:55 +02:00
Sylvain Munaut 849f554c87 [gsm_04_08] Fix gsm48_tx_mm_auth_req implementation
It was mainly missing the key_seq field, causing the
command to just be rejected by the ME.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-09-27 11:10:17 +02:00
Harald Welte 08d91a5b26 A5 support for RSL and 04.08 (not used yet)
This just adds the 04.08 and RSL bits for A5, but not the logic
for performing authentication.

The caller would first set lchan->encr and then call
gsm48_send_rr_ciph_mode(lchan), which encapsulates the 04.08
CIPHERING MODE COMMAND into a RSL ENCRYPTION COMMAND and sends it
to the BTS for execution + forwarding.
2009-08-30 15:37:11 +09:00