Commit Graph

39 Commits

Author SHA1 Message Date
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
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 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 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
Holger Hans Peter Freyther 1b891fd7ba [gsm48] Use optional Chan Mode 1 for the assignment command
Specify how we intend to use the assigned channel. This is
needed to make CC with early assignment work properly.
2010-01-28 12:46:04 +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 ef24dff2a2 [signal] Differentiate paging success from expiration in SS_PAGING
This is useful information to know and actually fixes a segfault
in rllp.c where lchan is accessed even tough it could be NULL in
case of failure.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-07 10:37:40 +01:00
Harald Welte (local) 6589858167 [meas rep] fix parsing of BSIC in third reported neighbor cell 2009-12-26 22:47:33 +01:00
Harald Welte eaa95d545e fix off-by-one error when mapping from meas rep to neighbor cell 2009-12-26 00:28:45 +01:00
Harald Welte 950eca9b76 [meas_rep] Add raw neighbor index into per-cell parsed meas rep 2009-12-26 00:28:37 +01:00
Harald Welte a06c35e9e3 [meas rep] cosmetic cleanup 2009-12-26 00:28:27 +01:00
Harald Welte 469b001b19 [meas rep] Correctly parse neighbor cell index of first reported neighbor cell 2009-12-26 00:28:23 +01:00
Harald Welte 50720e76fe 04_08: Differentiate between DEBUG and ERROR messages
also, don't use stderr directly anymore
2009-12-24 11:50:20 +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 7a7a0d5428 make handover reference a function call argument 2009-12-17 00:25:18 +01:00
Harald Welte 9385c11727 If we establish a TCH/H voice call, the reason is CALL, not OTHER 2009-12-12 20:57:52 +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
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 25b1e25dd4 [gsm48] Send the IPA CRCX after the chan modify ack
Change the CRCX after the channel has been modified.
2009-11-19 09:40:03 +01:00
Holger Hans Peter Freyther 231163d365 [ipa] Change names of RTP methods to follow MGCP naming
IPA is naming these functions CRCX, MDCX, DLCX to follow
the naming of the MediaGatewayControlProtocol. Change the
code to go from BIND to CRCX (create connection) and from
CONNECT to MDCX (modify connection).

Connect indicates that it is only possible to call it once
while it is possible to call it more than once to modify
the audio parmaters and such. So the IPA terminology is
making a bit more sense here (now that we know it).
2009-11-19 09:40: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 843b44d261 [neci] Use the correct length when going over the array
Use the correct length when going over the array instead
of using the neci0 values. Remove the fixme from the method
as well as the issue has been addressed by adding a parameter
to the method.
2009-11-17 18:19:19 +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 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 ea4088a7ea [gsm0408] Move encryption message creation to gsm_04_08_utils.c
Be able to use the cipher mode command message from the MSC code.
2009-10-06 04:34:25 +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 5d0e56f722 [gsm48] Introduce a gsm48_generate_mid_from_imsi method
Prefix generate_mid_from_tmsi with a gsm48_, create a new method
to binary encode the imsi. Add a unit test for parsing and decoding.

The implementation can parse the data it generated and the
last octet seems to be filled with the end mark.
2009-08-20 13:59:14 +02:00
Holger Hans Peter Freyther d1862d7cf9 [gsm48] Move parsing of the MI from to gsm_04_08_utils.c
The parsing of the IMSI is needed for the MSC part as well. Move
it to the gsm_04_08_utils.c so it can be used.
2009-08-20 13:57:12 +02:00
Holger Hans Peter Freyther 1494a768c1 [bsc] Move the GSM 04.08 helper functions to gsm_04_08_utils.c
The existing gsm_04_08.c implementation is mixing BSC and MSC
behavior. Move some simple parsing and generation functions over
to gsm_04_08_utils.c to allow a different MSC to define the policy.
2009-08-17 09:52:42 +02:00