aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
AgeCommit message (Collapse)AuthorFilesLines
2010-04-06Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther2-11/+12
* Move to the new log code and update binaries * Catch up with lchan changes from master Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/src/Makefile.am openbsc/src/bsc_rll.c openbsc/src/chan_alloc.c openbsc/src/debug.c openbsc/src/gsm_04_08.c openbsc/src/gsm_04_11.c openbsc/src/gsm_subscriber_base.c openbsc/src/handover_logic.c openbsc/src/silent_call.c openbsc/src/transaction.c openbsc/src/vty_interface.c openbsc/src/vty_interface_cmds.c
2010-04-06nat: Store the config in the connection instead of the lacHolger Hans Peter Freyther1-2/+4
This allows that we can print the Nr. next to the lac and it allows us to change the lac at runtime without reconnecting the BSC.
2010-04-06Revert "nat: Remember where the BTS is listening for things."Holger Hans Peter Freyther1-14/+0
Remove the code to parse port as we need to discover the BTS behind the nat and most likely it will have a different port than the one advertised by the BTS. This reverts commit c6a1fe773d16eb20d4cb1d3097761419436f4537.
2010-04-06nat: Test forwarding Inactivity Test messages.Holger Hans Peter Freyther1-0/+19
No change needed to the code.
2010-04-05nat: remove is called on already patched connections..Holger Hans Peter Freyther1-0/+4
Fix the test to search for the original message instead of the already patched one that should not find any items anyway. The remove is called on already patched connections so we need to match it with the patch reference count.
2010-04-05nat: Remember where the BTS is listening for things.Holger Hans Peter Freyther1-0/+14
Extract the port from the BSS's MGCP Gateway so we know where to forward the data to.
2010-04-04nat: Remove the broken empty line check, follow \n vs \r\n of inputHolger Hans Peter Freyther1-0/+10
Instead of checking the token for NULL we need to check if running was set to null. Look at the data of the token and check if the line was ending with a \r\n or \n and then when rewriting a line use that line ending as well. Add a new test for that.
2010-04-04nat: Make rewrite work on string, read to a string first, copy to msgbHolger Hans Peter Freyther1-7/+4
The MGCP protocol parsing is adding '\0' to make sure we do not parse beyond where we should parse. This does not mix with strtok or similiar routines. For now we will read the msg into a global array first, then copy it to the msgb for mgcp protocol handling and if we are required to forward it to the MGCP we have a untouched copy we will modify into our own msgb.
2010-04-01nat: Return MGCP messages to the call agentHolger Hans Peter Freyther1-0/+30
Attempt to find the message by transaction id, then patch the response and use the IP/PORT of the local network, update the ci with the one from the BSC. This is currently not tracking any state of the MGCP and will not handle two bsc's... this will need to happen later. With this in we should be feature complete and now enter the mode of making all of this work reliable and fixing thinko's and other bugs.
2010-04-01nat: Allow to send MGCP messages from the BSC to the networkHolger Hans Peter Freyther1-0/+12
2010-04-01nat: Test rewriting of MGCP messages to patch ip and portHolger Hans Peter Freyther2-0/+90
Add code to change the ip and port for audio data inside MGCP messages. This is needed because the BSS might be behind the NAT and can not reach the network directly and might be behind a nat so the announced sourceport is not the one as we see it.
2010-04-01nat: Add code to find a BSC connection by the given msc multiplexHolger Hans Peter Freyther1-2/+43
2010-03-31nat: In the case of losing the MSC, reset all endpointsHolger Hans Peter Freyther1-0/+2
When losing the SCCP connection make sure that we free all endpoints. The disconnection of the BSC should already make sure they are closed but this makes sure everything is properly reset.
2010-03-30nat: Look at the assignment command and remember on which timeslot the data isHolger Hans Peter Freyther3-2/+44
This information will be needed when we are trying to forward MGCP connections to and from the BSC through the IPA protocol.
2010-03-30nat: Return the SCCP connection, change order of patching and updatingHolger Hans Peter Freyther1-7/+8
* Return the SCCP connection. This will be needed to store the assigned timeslot in there. * Update code to work with this change * This uncovered a bug in the CC handling, at the time the BSC was passed it was still a null pointer and the code would have failed.
2010-03-30misc: Do not prepend 0x when using %p in printf.Holger Hans Peter Freyther1-5/+5
2010-03-30nat: Add test case and data for paging by lac test.Holger Hans Peter Freyther2-1/+55
2010-03-30nat: Move paging by lac handling code into the utils fileHolger Hans Peter Freyther1-1/+2
Moving it here means we can more easily test this code, there is one behaviour change with the code that we only support paging messages with one LAC and will silently ignore the others.
2010-03-30nat: Add a test case for the connection trackingHolger Hans Peter Freyther3-2/+219
This test case tests connectiont tracking by sending a CR, getting a CC, sending a DTAP, receiving a DTAP, receiving a RLSD, sending a RLC. It verifies that the messages are properly patched specially the references at the BSC.
2010-03-26move log/debug codebase to libosmocoreHarald Welte1-7/+7
The logging/debugging code is generic enough to move it into libosmocore while keeping OpenBSC specific definitions in openbsc itself. This commit uses the logging support present in libosmocore-0.1.2, you will have to update your library to this version.
2010-03-26Merge branch 'on-waves/sccp' into on-waves/bsc-masterHolger Hans Peter Freyther1-10/+14
2010-03-26sccp: Change the ownership of the msgb passed to the callbackHolger Hans Peter Freyther1-10/+14
Instead of deleting the msgb within the SCCP library the implementor of the write callback needs to free it. This is required for non blocking io with the server.
2010-03-25channel request: Store the to be assigned channel type in the GSM NetworkHolger 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.
2010-03-24Correct the company name. It should be On-Waves (ehf)Holger Hans Peter Freyther1-1/+1
2010-03-24Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther15-160/+145
* Move to libosmocore * Move to new debugging architecture * Register the BTS types * Has only been compile tested Conflicts: openbsc/include/openbsc/Makefile.am openbsc/include/openbsc/gsm_data.h openbsc/include/openbsc/ipaccess.h openbsc/include/openbsc/mgcp.h openbsc/include/openbsc/msgb.h openbsc/include/openbsc/tlv.h openbsc/src/Makefile.am openbsc/src/abis_rsl.c openbsc/src/bsc_init.c openbsc/src/bsc_mgcp.c openbsc/src/chan_alloc.c openbsc/src/debug.c openbsc/src/gsm_subscriber_base.c openbsc/src/msgb.c openbsc/src/rest_octets.c openbsc/src/sccp/sccp.c openbsc/src/vty/command.c openbsc/src/vty_interface.c openbsc/tests/Makefile.am
2010-03-04move some gsm48 utility functions to libosmocoreHarald Welte1-2/+6
* gsm48_generate_lai() gsm48_generate_mid_from_tmsi() gsm48_generate_mid_from_imsi() * gsm48_cc_msg_names[]
2010-02-26Merge remote branch 'origin/master' into on-waves/sccpHolger Hans Peter Freyther12-151/+17
2010-02-26[misc] Add LIBOSMOCORE_CFLAGS to the includesHolger Hans Peter Freyther5-3/+5
2010-02-26[sccp] Implement parsing the rather easy IT messages.Holger Hans Peter Freyther1-0/+100
2010-02-20finish openbsc / libosmocore separationHarald Welte12-148/+10
* 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-12Merge branch 'on-waves/sccp'Holger Hans Peter Freyther1-1/+1
2010-02-12[sccp] Make the file includable outside of OpenBSCHolger Hans Peter Freyther1-1/+3
2010-02-09liblaf0rge: Make the other targets depend on the liblaforge...Holger Hans Peter Freyther4-4/+4
Everything is linking fine here.
2010-02-04[nat] Add missing Makefile.am..Holger Hans Peter Freyther1-0/+8
2010-02-03[sccp] Refer to the right Company in the Copyright/Copyleft lineHolger Hans Peter Freyther1-1/+1
Use On-Waves instead of the name I made up from the domain name.
2010-01-30[nat] Specify the direction of the messageHolger Hans Peter Freyther1-9/+18
Do not run into the situation where we need to filter in one direction but it should not be filtered..
2010-01-30[nat] Prepare more sophisicated filtering and patchingHolger Hans Peter Freyther2-1/+171
Introduce a bsc_nat_parse method to parse a IP Access method into various parts. Write out the IPA Proto, in case SCCP is used, store the msg type, pointers to the source/dest local reference and other information. Use the result of bsc_nat_parse inside the bsc_nat_filter method to decide if the message should be dropped or not. In the future the bsc_nat_parse result will be used for patching SCCP references and other parts of the message. The filter language should be able to filter the msg type of SCCP messages and gain the "NOT" word in the filter language.
2010-01-11misc: Fix compilation of the test cases.Holger Hans Peter Freyther2-1/+6
2009-12-23[sccp] Provide dummy db_store_counter...Holger Hans Peter Freyther1-0/+2
2009-12-23[channel] Compile statistics.c into the test.Holger Hans Peter Freyther1-1/+2
2009-12-23[debug] Make the test case compile and it is still passingHolger Hans Peter Freyther1-7/+14
2009-12-22Import the new logging architectureHolger Hans Peter Freyther1-1/+1
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-11-24Merge branch 'master' into on-waves/bsc-masterHolger Hans Peter Freyther1-0/+1
Conflicts: openbsc/src/abis_nm.c openbsc/src/bsc_init.c openbsc/src/vty_interface.c
2009-11-22[sms] Fix compile warning by including gsm_data.hHolger Hans Peter Freyther1-0/+1
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-20[lchan] Release the channel ones its' usecount drops to zeroHolger Hans Peter Freyther1-0/+1
Remove the timer handling from the LCHAN and release the channel ones the use count is dropping to zero. Change code that was sending/using the lchan after the release and change the send data method to warn in case the lchan is used after it has been freed.
2009-11-20[sccp] Implement sending the Inactivity Test on a connection..Holger Hans Peter Freyther1-0/+1
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[sccp] Implement parts of ITU SCCP for use in the A-InterfaceHolger Hans Peter Freyther3-1/+732
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-09-28[tmsi] Make the tmsi a 4 octet numberHolger Hans Peter Freyther1-2/+2
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-08-20[gsm48] Introduce a gsm48_generate_mid_from_imsi methodHolger Hans Peter Freyther1-2/+38
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[subscr] Change the signature... the gsm_network is in the subscrHolger Hans Peter Freyther1-1/+2
Remove the extra parameter from the method, the network can be taken from the subscriber.