aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/bsc-nat/bsc_nat_test.c
AgeCommit message (Collapse)AuthorFilesLines
2010-04-18nat: Fix the test case by allocating a config.Holger Hans Peter Freyther1-0/+1
For the statistics we do need to have an allocated config, otherwise we will nicely crash.
2010-04-18nat: Return the SCCP Connection again...Holger Hans Peter Freyther1-2/+2
We will reset the multiplex in a DLCX message and then we can reset the multiplex as well...even if the MGCP connection is staying open. or at least this is a theory. The MSC likes to leave a connection open during CallControl when hanging up early enough in the process.
2010-04-17nat: Print the LAC that was searched for and not found.Holger Hans Peter Freyther1-3/+4
2010-04-06Merge remote branch 'origin/master' into on-waves/bsc-masterHolger Hans Peter Freyther1-4/+5
* 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: 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 Freyther1-0/+35
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-30nat: Look at the assignment command and remember on which timeslot the data isHolger Hans Peter Freyther1-2/+36
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 Freyther1-1/+45
2010-03-30nat: Add a test case for the connection trackingHolger Hans Peter Freyther1-1/+141
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-24Correct the company name. It should be On-Waves (ehf)Holger Hans Peter Freyther1-1/+1
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 Freyther1-0/+170
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.