Commit Graph

2856 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther ecd94a4b45 misc: Introduce a --enable-coverage mode to build with gprof coverage
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-11-15 20:06:45 +01:00
Holger Hans Peter Freyther 0b369c582b e1_input: Fix compiler warning by using offsetof
Use the offsetof/__builtin_offsetof to determine the
offset of a variable inside a structure instead of going
via a NULL pointer and taking the address.

This fixes:
warning: variably modified ‘dummyhalen_offset’ at file scope
2010-11-09 23:11:29 +01:00
Andreas Eversberg 5652cfc0e8 mark andreas@eversberg.eu as 'extern' for lcr 2010-11-09 13:39:43 +01:00
Holger Hans Peter Freyther 1406977e7e nat: Verify that the endpoint from the assignment command exists
Make sure that the MSC endpoint exists on the NAT, otherwise
we end up trying to free this endpoint when the SCCP connection
is taken down and will corrupt our memory. This issue started
to pop up as we have reduced the number of endpoints to 60
to allow transcoding on them.
2010-11-04 17:14:41 +01:00
Holger Hans Peter Freyther f3d1ae7072 bsc: Add simple SCCP binding code. 2010-11-03 16:40:03 +01:00
Holger Hans Peter Freyther 0425c38feb bsc: Fix crash when making a MSC connection.
Use the right types that are passed as void..
2010-11-03 14:46:56 +01:00
Holger Hans Peter Freyther 7bf66c5a6e bsc: Add the audio codec list command to list preferred codecs 2010-11-03 13:56:27 +01:00
Holger Hans Peter Freyther fe16622bf5 bsc: Add the rtp-base command to osmo-bsc 2010-11-03 13:56:26 +01:00
Holger Hans Peter Freyther 45f9e69ac5 bsc: Add the ip.access rtp-payload command known from bsc_msc_ip 2010-11-03 13:56:26 +01:00
Holger Hans Peter Freyther 4de1116356 bsc: Readd the core network code setting
This will instruct the BSC to patch messages and replace
the old network code with the new one.
2010-11-03 13:56:26 +01:00
Holger Hans Peter Freyther 5b848f37cf bsc: Fix the name of the local vty variable. 2010-11-03 13:11:14 +01:00
Holger Hans Peter Freyther 79dcd719e0 Merge branch 'zecke/mgcp-transcoder' 2010-11-02 19:41:42 +01:00
Holger Hans Peter Freyther 8b19dee437 mgcp: Send data from the network to the transcoder too
We now should be able to transcode in both directions.
2010-11-02 19:08:09 +01:00
Holger Hans Peter Freyther 5f2cd84281 mgcp: Use the calculated remote port from the mgcp_rtp_end 2010-11-02 19:08:09 +01:00
Holger Hans Peter Freyther 3f29cc8303 mgcp: Make the transcoding forwarding work for BTS/NET
Share the implementation for the transcoded packets and
forward them to the network and the bts.
2010-11-02 19:08:09 +01:00
Holger Hans Peter Freyther 386a940736 mgcp: Refactor the network binding routines
Create another wrapper function that takes most of
the arguments from the caller.
2010-11-02 19:08:09 +01:00
Holger Hans Peter Freyther bd7b3c5e45 mgcp: Introduce trans_bts and send BTS packets from this port
Introduce the trans_bts. Right now only a port is allocated
and the packets from the BTS are sent from this socket.
2010-11-02 19:08:09 +01:00
Holger Hans Peter Freyther e97155a2af mgcp: Keep the local_port like it was set on allocation
Do not reset statically allocated local_port. The port
might be different to the calculation of endpoint number
and base port. This might be the case for the coming remote
transcoding.
2010-11-02 19:06:13 +01:00
Holger Hans Peter Freyther 2126233590 mgcp: Rename transcoder_end to trans_net
Packets arriving for trans_net will be send out to the
networking. We will introduce a trans_bts in a second.
2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther 88b597e21c mgcp: Allow to disable the transcoder in a running system. 2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther b54048fe25 mgcp: Make transcoding a per Endpoint configuration
This allows to switch off transcoding on the fly, or only enable
it for certain vessels with known problems.
2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther fbca4ea117 mgcp: Fix the indetion of this code. it should use tabs 2010-11-01 21:15:55 +01:00
Holger Hans Peter Freyther 43eb1a3db0 nat: Send a clear command in case of connection releases.
This should help the BS+ to release RF channels earlier.
2010-10-29 17:05:28 +02:00
Holger Hans Peter Freyther 74779c68f7 nat: Add test case for matching phone numbers
Add the test case for matching '*' and for not matching at all
2010-10-28 15:27:00 +02:00
Holger Hans Peter Freyther d414c06fd9 nat: Fix a thinko in allowing '*' as a wildcard...
We need to match everything BUT the wildcard and then
do the normal strcmp...
2010-10-28 13:51:28 +02:00
Holger Hans Peter Freyther 732d9c19bf Merge branch 'zecke/number-rewrite' 2010-10-27 12:41:19 +02:00
Holger Hans Peter Freyther c4fd45ccf1 Merge branch 'zecke/ussd-side-channel' 2010-10-27 12:37:42 +02:00
Holger Hans Peter Freyther afa5a394ab Require 0.1.27 for the new gsm0808 methods 2010-10-27 12:37:13 +02:00
Holger Hans Peter Freyther a8a50a87ea nat: Also send a Clear Command in case of the USSD Provider dies 2010-10-27 12:02:21 +02:00
Holger Hans Peter Freyther 54f5352e07 nat: Close SCCP connections when the USSD Provider is closed.
Send a RLSD down to the BSC in case the USSD Provider is gone. It
is not sending a Clear Command and ut depends if the BS+ will
like this kind of behavior. At least the data on the NAT will
be freed soon afterwards due the RLC message.
2010-10-27 11:01:55 +02:00
Holger Hans Peter Freyther 07dfc70276 nat: Make clear where the RLSD is send to
Add a _msc to the method as we will send a RLSD to the
MSC and will add a method to send it down to the BSC
as well.
2010-10-27 10:54:11 +02:00
Holger Hans Peter Freyther 643931db3d nat: Look at the number type to figure out if we want to rewrite it 2010-10-27 10:40:45 +02:00
Holger Hans Peter Freyther 1400310f05 nat: Explain that we do not want to have a + in the replacement rule 2010-10-27 10:40:44 +02:00
Holger Hans Peter Freyther 25adfceb3a nat: Add '*' as wildcard for the IMSI matching.
In case any rule has a '*' we will always match this
rule.
2010-10-27 10:40:44 +02:00
Holger Hans Peter Freyther 73bbf89245 nat: Implement rewriting, have a very basic test for that feature 2010-10-27 10:40:44 +02:00
Holger Hans Peter Freyther a914daf174 nat: Add hook for rewriting a setup message
Create a new function, hand the data to this function, take back
a possible modified msgb and invalidate parsed at this point.
2010-10-27 10:40:44 +02:00
Holger Hans Peter Freyther 76424392e0 nat: Add vty option for number rewriting
Parse a msg file in case we do have a list.
2010-10-27 10:40:43 +02:00
Holger Hans Peter Freyther 0586b0fa47 [vty] First set of fixes for the oml/rsl con dropping
The code had wrong documentation in the VTY, it crashed
when OML or RSL was not up yet. These issues are fixed
right now.
2010-10-26 09:44:21 +02:00
Holger Hans Peter Freyther 2484ceb2be [vty] Add ipa specific command to provoke failures to test OML/RSL reconnect
We need to simulate OML/RSL failure in an easy and fast way
and adding a command to do so seems like a good way to achieve
this. The command is a bit misplaced, in one way it is no config
and does not belong into the config node but then again it does
not belong into the VIEW_NODE either as it is manipulating content.

On this merge I have changed it to the ENABLE_NODE.
2010-10-26 09:40:13 +02:00
Holger Hans Peter Freyther f3ca2eeede Merge branch 'zecke/ussd-side-channel' 2010-10-25 21:08:37 +02:00
Holger Hans Peter Freyther 90bbccfca9 nat: Forward the data coming from the USSD module to the BSC. 2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther 4c401e7a1a nat: Forward extra state and the message to the USSD provider
Forward the SCCP state and the data to the USSD provider,
also mark the connection as local.
2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther ec8a4e23d3 ipaccess: Add a structure for informing the USSD provider about the state
This is used to inform the USSD provider about the state of the
connection.
2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther c16c2dc5d3 nat: Implement accepting a USSD Provider connection, do authentication 2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther 64b12924bf nat: Replace the idiom for replacing a string with a function call
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-25 21:04:46 +02:00
Holger Hans Peter Freyther e393f273e7 nat: Keep a ussd token in the config
We will have the USSD provider connecting to us and we
will use the IPA protocol, including the auth mechanism.
2010-10-25 21:04:46 +02:00
Holger Hans Peter Freyther 3229f442f4 nat: Implement the matching of certain USSD messages
Have various checks, check if the IMSI should be handled,
if there is a USSD query set and then decode and compare
the value.
2010-10-25 21:04:46 +02:00
Holger Hans Peter Freyther c1578bc747 nat: Add an option to set the query string to match
Allow the query string to be set. The ussd matching code
will check for this string and then forward it to the bypass.
2010-10-25 21:04:46 +02:00
Holger Hans Peter Freyther c1cac1e31a nat: Make the imsi checking function public.
We will use this method in the USSD module to check if the
IMSI should be handled for USSD queries.
2010-10-25 21:04:45 +02:00
Holger Hans Peter Freyther d1effd835f nat: Provide a USSD access list to check for which to play HLR. 2010-10-25 21:04:45 +02:00