aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests
AgeCommit message (Collapse)AuthorFilesLines
2013-06-12Makefile.am: Use AM_CPPFLAGSAlexander Huemer8-8/+8
Since automake 1.13 INCLUDES is depricates and causes a warning
2013-04-16nat: Extract the LAC/CI from the Complete Layer3 InformationHolger Hans Peter Freyther2-0/+36
Find the Cell Identifier from the Complete Layer3 Information and store it for future reference. We could begin to verify that the LAC/CI used really belongs to the BSC.
2013-04-16nat: Rename "struct sccp_connections" to "struct nat_sccp_connection"Holger Hans Peter Freyther1-7/+7
The name sccp_connection is used in the osmo-sccp code, sccp_connections was used in the NAT for tracking a sccp_connection. Rename it so it is obvious that the struct belongs to the nat. The rename was done with sed: $ sed -i s,"struct sccp_connections","struct nat_sccp_connection",g \ include/openbsc/*.h src/osmo-bsc_nat/* tests/*/*
2013-04-16nat: Allow to re-write international numbers in the CC Setup messagesHolger Hans Peter Freyther2-2/+75
Prepend the international number with a '+' and then do the normal re-writing on it. There are a couple of ways to handle this: \+([0-9]), \+[0-9][0-9]([0-9]), \+49([0-9]) Add a test case for the international re-write based on an already internationalized number.
2013-04-16nat: We want the remote to respond to our DLCX requestHolger Hans Peter Freyther4-0/+30
We want to send a TRAP with the MGCP statistics from the NAT and the connected BSC. The BSC endpoint can be either released because of a DLCX from the MGCP CallAgent or the SCCP Connection release on the A-link. This is why we need to queue the statistics when the deleting the endpoint on the BSC. The processing is continued once the response arrives. This code assumes that the response of the DLCX will be sent by the remote side. The current amount of outstanding responses can be seen on the VTY. This assumption is based on the fact that the BSC has already responded to the CRCX and maybe to the MDCX. The MGCP RFC is bended to prefix the transaction identifier with "nat-" to easily detect the response and hand it to the handler. This will then parse the response and generate the TRAP. The current version is v1. We assume that the transaction space is big enough and we will not re-assign the transaction identifier too early.
2013-04-16nat: Make it possible to send MGCP messages through the IPA multiplexHolger Hans Peter Freyther1-0/+6
Instead of handling MGCP through the UDP socket, read and write messages through the ipa connection to the MSC.
2013-03-21db: Link to the VTY library for the vty_config_unlock symbolHolger Hans Peter Freyther1-1/+1
Linking started to fail for me due the symbol coming from the vty library and the db code not linking to it.
2013-01-07nat: Introduce a global IMSI barr list using red-black treesHolger Hans Peter Freyther6-1/+97
2013-01-07nat: Allow the filter to select the reject causeHolger Hans Peter Freyther1-5/+10
In preparation for another kind of black-list allow the filter code to decide how the connection should be rejected. Introduce a new struct that will carry the reject causes for certain operations.
2013-01-07nat: Move the IMSI/TMSI filtering to a new and dedicated fileHolger Hans Peter Freyther1-0/+1
Move all routines related to filtering to a separate file.
2013-01-07nat: Extract the message re-writing from the utils to a dedicated fileHolger Hans Peter Freyther1-0/+1
Move the code around to make it more clear what the routines should do.
2012-12-26tests: Don't delete atconfig in cleanDaniel Willmann1-1/+1
This file is created in ./configure so we shouldn't remove it with make. Otherwise ./configure && make clean && make check fails with: make[3]: *** No rule to make target `atconfig', needed by `check-local'. Stop.
2012-12-26abis_test: Fix the test case and calculate the right offsetHolger Hans Peter Freyther2-4/+4
We parse the load_config, take the ptrdiff_t from start and load_config and from the previous array as the alignment can differ on different ABIs. This was found by Daniel when executing the tests on a 64 bit userspace.
2012-12-19abis: Activate the newest available installed on the BTSHolger Hans Peter Freyther2-8/+67
Select thew newest software from all available file versions.
2012-12-19abis: Create a routine that can parse all SW Descriptions of a SW ConfigHolger Hans Peter Freyther5-1/+151
Be able to parse the entire SW Config IE. Parse the SW Descruption into a struct provided by the caller.
2012-12-10mgcp: Test and implement re-transmission handlingHolger Hans Peter Freyther2-5/+64
MGCP is used over UDP and a response might be lost. The MGCP RFC asks for keeping a list of responses and then using the previous response to answer a duplicate request. I tried to conserve memory and just wanted to remember the last transaction identifier and result-code and re-generate the result from that. This made the code look bad and this is why the entire response will now be stored. It sadly increases the memory usage but can not be avoided at this time. Remove the msg->l3h pointer for the RQNT callback as strtok has modified the content of it.
2012-12-10mgcp: Add testdata for MDCX handlingHolger Hans Peter Freyther2-0/+21
2012-12-10mgcp: Test the second CRCX as a CRCX and not as a re-transmissionHolger Hans Peter Freyther2-2/+14
The second CRCX would be mostly ignored and be handled by the retransmission layer of MGCP.
2012-11-29mgcp: Begin handling of the RQNT message as needed for DTMFHolger Hans Peter Freyther2-0/+60
Introduce a callback for the request and forward the signalrequest to the callback. This is not a full implementation of MGCP RQNT.
2012-11-24tests: Fix build of 'db' test after smpp mergeHarald Welte1-2/+2
2012-11-12mgcp: Send the jitter statistics at the end of the callHolger Hans Peter Freyther1-1/+1
2012-11-12mgcp: Calculate the packet loss as of Appendix A of RFC 3550Holger Hans Peter Freyther2-3/+58
Calculate the expected packages and packet loss as of RFC 3550. The values should be clamped but our packet loss counter is 32 bits and not 24 and we should clamp at other values but I am waiting for some issues first before dealing with that.
2012-11-12mgcp: Include statistics at the end of a connectionHolger Hans Peter Freyther2-0/+9
Follow the MGCP specification and send the collected statistics at the end of a call. Right now this does not include jitter, packet loss and delay.
2012-11-07nat: Inject a a=fmtp:%d to force the right AMR codeHolger Hans Peter Freyther1-3/+3
This assumes that AMR is used and/or the mode-set is ignored for other codecs by the remote end.
2012-10-22si: Partially implement the range encoding for the SI.Holger Hans Peter Freyther5-1/+195
I saw the old copy of the "Appendix J" code too late and I have discovered some quirks and I am more familar with my implementation. Most noticable 'w' only needs to be as big as the input arfcn but requires the 'w' to be initialized. The power_of_2 implementation differs as well (mine matches the output of wirehsark). The f0 could be chosen in a better way but right now picking the lower bound is the easiest. It is not clear if to use modulo if the range is chosen in the middle. This can be improved in the future. Right now I have no bit fiddling for range128, 256 and 1024 as I was running out of time.
2012-10-04tests: Remove the debug/logging test as it is in libosmocore nowHolger Hans Peter Freyther3-50/+1
2012-03-26nat: Add another test case for TP-SRR clearing and number rewriteHolger Hans Peter Freyther2-3/+42
2012-03-16mgcp: implement a more tolerant parser based on strtok_r()Harald Welte1-2/+0
Instead of building complex manual byte-wise parsers, we simply use two strtok_r loops: one iterating over all the lines, the next one iterating over the invididual space-separated elements in the first line. The benefit is that we now accept \r, \n or \r\n, or any multiple of them as line ending. This works around incompliant MGCP implementations like that of Zynetix MSC. Addition: mgcp_analyze_header returns 0 when all out parameters have been set. Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2012-03-16mgcp_test: Add wrong messages as input and check what happensHolger Hans Peter Freyther2-2/+30
Test parsing some invalid messages and see if we start to crash.
2012-03-16mgcp_test: Rename method as it now operates on an array of messagesHolger Hans Peter Freyther1-2/+2
This code was cleaned up, catch up and rename the method.
2012-01-27MGCP: Add CRCX test casesHarald Welte1-0/+29
The second test case (CRCX_ZYN) fails as the message is not compliant with the spec. However, our parer should be more tolerant, just in case...
2012-01-27further generalize mgcp testing codeHarald Welte1-19/+30
use a data-structure driven approach
2012-01-27mgcp_test: remove duplicate codeHarald Welte1-13/+6
2012-01-18nat: Internationalize the TP-DA if it starts with a 00Holger Hans Peter Freyther1-4/+4
Internationalize the number like we do it for Call Control. Update the test result to match this new behavior.
2012-01-18nat: Prepare to rewrite the TP-DA number of a SMS submit.Holger Hans Peter Freyther3-2/+56
Introduce number rewriting of SMS-SUBMIT. Introduce a new list, move code around to help with finding a new number, somehow the number encoding for TP-DA is borked, 03.40 references 04.11 but the length appears to be strlen(number) without taken the type field into account.
2012-01-18nat: Print the sizes and the offending data in case of a failureHolger Hans Peter Freyther1-1/+5
2012-01-15nat: Add the bsc_data.c file to the EXTRA_DISTHolger Hans Peter Freyther1-1/+1
2012-01-15abis: gsm_data_shared.h includes libosmo-abis header, add abis to cflagsHolger Hans Peter Freyther2-2/+2
gsm_data_shared.h includes e1_input.h of libosmo-abis, add the LIBOSMOABIS_CFLAGS to Makefile.am, remove AM_LDFLAGS at the same time as we only build .a archives.
2012-01-10nat: Implement clearing of TP-SRR flags from TPDUsHolger Hans Peter Freyther3-3/+67
Match IMSI and destination address against a set of entries, if it is matching the header will be modified and no sender report will be requested. Change the test case to request the sender report and then verify that this bit is reset to 0.
2012-01-10nat: Reduce copy and paste in the test, create a verify_msgHolger Hans Peter Freyther1-50/+23
2012-01-10nat: Use the link_id from the original message in the new DTAP messageHolger Hans Peter Freyther1-1/+1
SMS went from SAPI=3 to SAPI=0 and nobody notices on the NAT->MSC direction.
2012-01-09tests: Use atlocal/atlocal.in to enable/disable the NAT testHolger Hans Peter Freyther3-7/+4
Kill the hacking, use atlocal to remember if the NAT test should be enabled and then skip the test (exit with 77).
2012-01-09Revert "tests: Make the test setup more abusive to fix the build"Holger Hans Peter Freyther1-7/+5
This reverts commit 41b42c72294d181217bae59e37ddf50c490df17f.
2012-01-09tests: Make the test setup more abusive to fix the buildHolger Hans Peter Freyther1-5/+7
Paolo says I will need to use atconfig/atlocal, need to read up on it first though.
2012-01-06gprs: Honor GSM 04.64 8.4.2 Receipt of unacknowledged informationHolger Hans Peter Freyther4-1/+76
GSM 04.64 8.4.2 asks to ignore UI frames if the DLCI is not known, or if the "(V(UR)- 32) <= N(U) < V(UR)". E.g. if we want to have V(UR) == 511 and this frame is dropped, we would ignore N(U)'s 0 to 510. Calculate the delta. The code is based on Jonathan Santos's "LLC UI window" fix but the issue was discovered independly.
2012-01-06tests: Introduce running tests with GNU autotest in OpenBSCHolger Hans Peter Freyther12-1/+126
The quality of the tests is of different value but it is good to get started and improve from here.
2012-01-06mgcp: Print message when the test is finishedHolger Hans Peter Freyther1-2/+8
2012-01-06gsm0408: Print message when the test is doneHolger Hans Peter Freyther1-1/+2
2012-01-06db: Fix the test codeHolger Hans Peter Freyther1-14/+27
* Initialize logging * use a dummy net before calling subcr_put as the keep in ram option is going to be set.
2012-01-06channel: Make the test not crash again.Holger Hans Peter Freyther1-4/+15
* Initialize logging * The callback expects NULL or a subscriber connection