Commit Graph

179 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 10ca3799e7 Merge remote branch 'origin/master' into on-waves/sccp 2010-02-26 20:18:24 +01:00
Holger Hans Peter Freyther 140f6e9b12 [misc] Add LIBOSMOCORE_CFLAGS to the includes 2010-02-26 20:10:58 +01:00
Holger Hans Peter Freyther e1d5067789 [sccp] Implement parsing the rather easy IT messages. 2010-02-26 19:26:35 +01:00
Harald Welte f98a4974d7 finish openbsc / libosmocore separation
* use pkg-config from openbsc to find header and library
* move sms and timer tests to libosmocore itself
* ensure "make distcheck" works on both packages
2010-02-20 17:29:27 +01:00
Holger Hans Peter Freyther 7184c2d7d2 Merge branch 'on-waves/sccp' 2010-02-12 22:52:12 +01:00
Holger Hans Peter Freyther 8a69cb2d99 [sccp] Make the file includable outside of OpenBSC 2010-02-12 22:51:24 +01:00
Holger Hans Peter Freyther b19dc286aa liblaf0rge: Make the other targets depend on the liblaforge...
Everything is linking fine here.
2010-02-09 22:04:09 +01:00
Holger Hans Peter Freyther 6ae657228c [sccp] Refer to the right Company in the Copyright/Copyleft line
Use On-Waves instead of the name I made up from the domain name.
2010-02-03 18:17:49 +01:00
Holger Hans Peter Freyther 98657d5dee misc: Fix compilation of the test cases. 2010-01-11 16:42:07 +01:00
Holger Hans Peter Freyther 5dbd71e31d [sccp] Provide dummy db_store_counter... 2009-12-23 05:13:48 +01:00
Holger Hans Peter Freyther 3b05a7affa [channel] Compile statistics.c into the test. 2009-12-23 05:13:29 +01:00
Holger Hans Peter Freyther f9b1f30558 [debug] Make the test case compile and it is still passing 2009-12-23 05:08:12 +01:00
Holger Hans Peter Freyther b61e3b2158 Import the new logging architecture
This is the new logging architecture, including

* support for multiuple logging targets like stderr and vty
* log levels in addition to categories/subsystems
* filtering based on imsi, i.e. only see events for one subscriber
* dynamically change log level for each category for each vty
2009-12-22 22:32:51 +01:00
Holger Hans Peter Freyther fdd0ddf7e9 [sms] Fix compile warning by including gsm_data.h
In file included from sms_test.c:27:
../../include/openbsc/gsm_utils.h:33: warning: `enum gsm_band' declared inside parameter list
../../include/openbsc/gsm_utils.h:33: warning: its scope is only this definition or declaration, which is probably not what you want
../../include/openbsc/gsm_utils.h:34: warning: `enum gsm_band' declared inside parameter list
2009-11-22 18:01:42 +01:00
Holger Hans Peter Freyther 3b9516e0d8 [sccp] Implement sending the Inactivity Test on a connection..
Currently this will send a dummy inactivity test message,
there is currently no parsing or API to receive the messages.

The sequencing and credit entries are empty as sequencing
is currently not used at all.

The test is currently limited to send the message and see
if the application is crashing or not.
2009-11-20 13:09:15 +01:00
Holger Hans Peter Freyther ac96770ad7 [sccp] Implement parts of ITU SCCP for use in the A-Interface
include/sccp/sccp_types.h contain Q.713 and GSM definitions
include/sccp/sccp.h is the application interface resembling
                    the esentials of the UNIX socket interface.

src/sccp.c is the actual implementation of SCCP featuring
           connection and UDT1 support.

tests/sccp/sccp.c is testing connection creation and formating
                  of the SCCP messages used by the A-interface. And
                  it contains a simple fuzzing test to test the
                  robustnes of the implementation.
2009-11-20 13:09:15 +01:00
Holger Hans Peter Freyther 2223025e21 [tmsi] Make the tmsi a 4 octet number
tmsi is four octets long, there is no need to make it a string
and then jump through hoops to convert it to a number. Keep the database
using it as a string to benefit from the NULL handling of the db.

Introduce the reserved tmsi which has all bits set to 1 according
to GSM 03.03 §2.4 and start checking for it and make sure the db
code will never allocate such a tmsi.
2009-09-28 05:14:25 +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 e4e8bf4dd0 [subscr] Change the signature... the gsm_network is in the subscr
Remove the extra parameter from the method, the network can be
taken from the subscriber.
2009-08-20 13:56:45 +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
Holger Hans Peter Freyther 93d4394d1d [msc] Move gsm_04_08.c, mncc and various others to libmsc
Currently we have circular dependencies from libbsc to libmsc
and this requires to play some linker tricks. The problem will
be solved in two ways, first we will get rid of the circular
dependencies and second we can start using --start-group and
--end-group of the linker to play the tricks for us.
2009-08-17 09:52:42 +02:00
Holger Hans Peter Freyther 857e5e6e30 [subscr] Split gsm_subscriber.c in BSC and MSC part
For the BSC part we still assign a gsm_subscriber to lchan but it
might only contain the TMSI of this subscriber.

For the MSC part we will need the HLR/VLR feature of the gsm_subscriber,
specially the lookup's by number...

So if libbsc.a/libmsc.a are compiled in one app and used the
subscribers will be shared, and if only libbsc.a gets used we will
have more empty gsm_subscriber.c..
2009-08-17 09:52:42 +02:00
Holger Hans Peter Freyther 42e327b52f [msc] Introduce a libmsc.a library
Attempt to split up bsc/msc functionality according to the specs. The
libbsc.a will be responsible for communicating with the BTS, configuring
it, paging, channel allocation and passing layer3 messages in both
ways. libmsc.a will implement the policy and such.
2009-08-17 09:52:42 +02:00
Holger Hans Peter Freyther 9085cda959 tests: Remove the sms sending from the sms test
The test for the 7bit encoding and decoding remains in the code. The
test didn't compile and the code changed too much so the current test
didn't make any sense.
2009-08-17 06:35:59 +02:00
Holger Hans Peter Freyther 7673ce4ebe misc: Firs round of fixing compilation of test cases
Next round should be using them again
2009-08-10 06:40:05 +02:00
Holger Hans Peter Freyther b45649460d db_test.c: Make it compile again 2009-07-29 06:46:07 +02:00
Harald Welte 6bfda782b9 make tests compile again after talloc branch changes 2009-06-26 20:30:46 +02:00
Holger Hans Peter Freyther 800d29d798 [channel] Add a test case for the request foo in gsm_subscriber.c
This is simulating a successfull request and is causing
a segfault. The test is done with a "mock object" in this
case a minimalistic paging implementation which is enough
to show the crash.

Compare that the callback data is supposed to be the same....
2009-06-10 13:26:47 +02:00
Harald Welte 13e10daa33 move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00