aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
AgeCommit message (Collapse)AuthorFilesLines
2011-06-30misc: Link to libosmogsm after adding our static librariesHolger Hans Peter Freyther1-2/+2
GCC 4.6.0 and LD.BFD 2.21 on ARM somehow fail to resolve the dbi symbols when we have the library in front of the static libraries, move them to the back. Without this patch the tlv_def_patch symbol and the gsm48_construct_ra.
2011-06-30misc: Link to -ldbi after adding our static librariesHolger Hans Peter Freyther1-2/+2
GCC 4.6.0 and LD.BFD 2.21 on ARM somehow fail to resolve the dbi symbols when we have the library in front of the static libraries, move them to the back.
2011-06-27update debug_test with logging system changesHarald Welte1-1/+1
Thanks to Konrad Meier
2011-06-26make channel_test build againHarald Welte1-1/+1
2011-06-01nat: Look into the TPDU/SMS-SUBMIT and use the TP-DestAddress for matchesHolger Hans Peter Freyther1-9/+17
Match the used SMSC and the destination of the SMS and change the SMSC address if both are matched.
2011-06-01nat: Patch the destination SMS address of a messageHolger Hans Peter Freyther2-3/+69
Use the same filtering infrasturcture to patch the SMSC address in a CP-DATA/RP-DATA message. Add a very simple testcase for this code.
2011-06-01nat: Prepare to patch more than the CC Setup messageHolger Hans Peter Freyther1-4/+4
Refactor the code to allow having different handlers. The goal is to be able to patch some SMS messages too.
2011-06-01nat: Allow to have a regexp to match the MSISDNHolger Hans Peter Freyther1-1/+3
The idea that MCC and MNC is enough to classify a subscriber turns out to be wrong. Certain operatos license a number range of IMSIs to others. When we see a '^' in the MCC field we treat it as a regexp. The code now turns the MCC/MNC into a regexp for the IMSI. It is not using extended POSIX regexp to match the behavior of the access list.
2011-05-12misc: Use the osmo_init code for signals and loggingHolger Hans Peter Freyther2-11/+4
Use the libosmocore code to ignore certain signals by default (e.g. SIGHUP, SIGPIPE) and use the new code to create a default stderr logging target and initialize it properly.
2011-05-07src: rename msg_entr* to osmo_config_*Pablo Neira Ayuso1-2/+2
Summary of changes: s/msg_entry_parse/osmo_config_list_parse/g s/msg_entry/osmo_config_entry/g s/msg_entries/osmo_config_list/g
2011-05-07src: use namespace prefix osmo_* for misc utilsPablo Neira Ayuso2-6/+6
Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
2011-05-06src: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso1-1/+1
Summary of changes: s/struct bsc_fd/struct osmo_fd/g s/bsc_register_fd/osmo_fd_register/g s/bsc_unregister_fd/osmo_fd_unregister/g s/bsc_select_main/osmo_select_main/g
2011-05-02nat: Rewrite the paging handling.Holger Hans Peter Freyther1-20/+3
The current code tries to find _one_ bsc for a paging message and then continues. The new code will try to find multiple BSCs for each LAC. This is done in preparation of having two BSCs handle the same LAC. This code right now is O(m*n) but it will be worse once paging groups are landed. The code to test the function was reduced to just test the lac lookup code as the other part can not be tested in a standalone setup anymore.
2011-04-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther1-3/+3
This was done with sed on the files.
2011-04-04nat: Bail out if the regexp fails to compile and avoid a crashHolger Hans Peter Freyther1-6/+9
If the regexp fails to compile the internal dfa is NULL and a regexec will crash nicely. Fail and free the string if the regexp fails to compile.
2011-03-26tests: fix bsc-nat testPablo Neira Ayuso2-4/+4
In 136f453dd2492b95004461a33c90b11732f33bd8, I forgot to update the new header path in the test/bsc-nat files (this happened to me because I forgot to configured openBSC without --enable-nat).
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso5-8/+8
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-05Fix Makefile.am for builddir != srcdir0.9.13Harald Welte1-1/+1
2011-03-04Fix build of bsc-nat testHarald Welte1-8/+10
2011-03-04prefix sub-directories containing libraries with 'lib'Harald Welte5-19/+25
... and make sure tests work again after restructuring
2011-02-28mgcp: Fix make distcheck due a copy 'n pasted Makefile.amHolger Hans Peter Freyther1-2/+0
2011-02-28mgcp: Allocate the endpoints for the E1 trunks as well.Holger Hans Peter Freyther1-1/+4
2011-02-28mgcp: Introduce a mgcp_trunk_config enum for endpoint configsHolger Hans Peter Freyther2-3/+3
We want to support real trunks in the MGCP code and we need to have some better book keeping for those. Move the code around.
2011-02-27nat: Fix some corruption in the test caseHolger Hans Peter Freyther1-0/+2
2011-02-27nat: Change number of multiplexes to the max-endpointsHolger Hans Peter Freyther1-3/+4
2011-02-26nat: Allocate endpoints from multiple multiplexes.Holger Hans Peter Freyther1-0/+45
This code allocates endpoints from multiple multiplexes but will always leave 0x0 and 0x1f unassigned in the multiplex.
2011-02-26nat: Verify that we are not assigning 0x1f as endpoint.Holger Hans Peter Freyther1-5/+5
On a classic BSC we have 32 channels but one is reserved for signalling. Make sure that we are not assigning 0x1f as we assume that this is the signalling channel. This means that from 32 possible voice channels we are only going to use 30 as we are already not using the 0x0.
2011-02-26nat: Allocate the endpoint status dynamicallyHolger Hans Peter Freyther1-2/+2
Allocate the status for an endpoint dynamically. We will support BSCs with different amount of multiplexes and need to have this flexibility in the future. Add the proper null checks to the current users of this code.
2011-02-25nat: Update the tests to make them going againHolger Hans Peter Freyther2-4/+7
We now need to have access to a mgcp_cfg and the change to the setup number patching needs new data. We now set the number to international type.
2011-02-11[BSC] Move the BTS-type specific code from bcs_init.c to bts_*.cHarald Welte5-20/+2
bsc_init.c was a big mess even only for two supported BTS models, so before adding more BTS types, this needs a cleanup. All the BTS specific code from bsc_init.c has now moved into bts_{siemens_bs11,ipaccess_nanobts}.c This has required that input_event() and nm_state_event() get both converted to proper libosmocore signals instead of referencing external symbols.
2011-01-07mgcp: We want to count trunks starting from one.Holger Hans Peter Freyther1-2/+2
2011-01-06mgcp: Parse a Digital Trunk endpoint name.Holger Hans Peter Freyther3-1/+95
2011-01-06subscr: Dump the pending requests to help with debugging state.Holger Hans Peter Freyther2-0/+2
2011-01-06subscr: Stop all paging requests if one is failing.Holger Hans Peter Freyther1-0/+1
If one paging request is timing out the others will timeout soon as well. With the current code the next timeout would expire the next request in the queue. We will now stop all paging requests and then issue a next paging request. So for both paging success and failure we will now stop all the other requests. This is mostly a workaround, one should count on how many BTSes we are paging and wait for all failures before we remove the item from the queue.
2011-01-01License change: We are now AGPLv3+ instead of GPLv2+Harald Welte5-25/+20
The reason for this is quite simple: We want to make sure anyone running a customized version of OpenBSC to operate a network will have to release all custom modifiations to the source code.
2010-12-22misc: Remove gsm_subscriber.h from the db.h fileHolger Hans Peter Freyther1-0/+1
Reduce the dependencies on the header files.
2010-12-21test: Make it compile but it is segfaulting on start nowHolger Hans Peter Freyther1-0/+2
2010-11-15misc: Introduce a --enable-coverage mode to build with gprof coverageHolger Hans Peter Freyther2-2/+4
This adds a test coverage build. One can use gcov and lcov on the resulting data afterwards to see which code paths were executed and which were not.
2010-10-28nat: Add test case for matching phone numbers0.9.10Holger Hans Peter Freyther1-0/+62
Add the test case for matching '*' and for not matching at all
2010-10-27nat: Implement rewriting, have a very basic test for that featureHolger Hans Peter Freyther2-0/+107
2010-10-21nat: Copy the IMSI, then free it or move the context to the connectionHolger Hans Peter Freyther1-1/+3
Extract the IMSI from the first message as well and safe it in the connection structure. The problem is that we do not have this structure at this point, so we will allocate the imsi as child of the bsc_connection and then move/steal it.
2010-10-19nat: Change the order of the DENY/ALLOW rule for the BSC.Holger Hans Peter Freyther1-1/+18
Currently it is not is not easily possible to disable everyone and then only allow certain SIMs. By changing the order we can do: access-list imsi-deny only-something ^[0-9]*$ access-list imsi-allow only-something ^123[0-9]*$ and still keep the usecase of only forbidding certain SIMs on certain LACs. Adjust test case, test that the other cases are still functional.
2010-10-12misc: Replace the idiom for replacing a string with a function callHolger Hans Peter Freyther1-1/+2
Remove a lot of code in favor of a new function that is freeing the old string and copying the new one. I should have gotten the context and the strings right.
2010-10-08nat: Allow a BSC to have multiple LACsHolger Hans Peter Freyther1-8/+18
Make it possible that one BSC is serving multiple cells. Introduce a list of lacs, add functions to manipulate the lists. The current test cases for paging by lac continue to work.
2010-09-20nat: Test for a bug inside the TLV definition for GSM 08.08Holger Hans Peter Freyther2-3/+22
The 0x1 inside a CIC IE could indicate a new IE... add test data and test case to verify that the patching works correctly.
2010-09-20nat: Test the endpoint finding a bit better...Holger Hans Peter Freyther1-3/+5
2010-09-18janitor: Move the * to the variable nameHolger Hans Peter Freyther3-3/+3
2010-09-15nat: Parse the id response, extract the IMSI, compare itHolger Hans Peter Freyther2-0/+62
Add a test case and also add a basic check that we got some size checks correct. The next step is to act on the result.
2010-09-15nat: Update the test for the new <0,0,1 semantic of the filter functionHolger Hans Peter Freyther1-5/+5
A test case with a TMSI is missing, this would be needed for better coverage of the filter test case.
2010-09-06chan: Store the to be assigned channel type in the GSM Network.Holger Hans Peter Freyther1-0/+1
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.