aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_sccp.c
AgeCommit message (Collapse)AuthorFilesLines
2011-01-01License change: We are now AGPLv3+ instead of GPLv2+Harald Welte1-6/+5
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-10-19nat: Find a connection by the real refHolger Hans Peter Freyther1-0/+13
2010-08-03Use new include paths of libosmo-sccp 0.0.2Harald Welte1-1/+1
2010-07-31nat: Fix compilation with nat not being enabled.Holger Hans Peter Freyther1-0/+1
common_vty.c was including bsc_nat.h which tried to get the sccp/sccp_types.h which is not required to be installed. Move all structs using/embedding SCCP structures into the bsc_nat_sccp.h and include. This should fix the compilation.
2010-07-23nat: u_int32_t -> uint32_tHolger Hans Peter Freyther1-1/+1
2010-06-17nat: Switch per BSC counters to the rate ctr.Holger Hans Peter Freyther1-1/+1
This is switching the simple statistics to the rate counter and is updating all users...
2010-06-15[nat] Make create_sccp_src_ref return the SCCP Connection.Holger Hans Peter Freyther1-6/+7
Right now it was not possible to just find a connection, by returning the connection that is created we will have direct access to it. It will be used by the local connection handling.
2010-06-15[nat] Remove parameter that is never accessed directlyHolger Hans Peter Freyther1-1/+1
The msgb needs to be around when we access the parsed structure but that needs to be guranteed by the caller handing out the parsed structure.
2010-06-15nat: When we fail to reallocate... also close down the MGCP partHolger Hans Peter Freyther1-0/+1
Give the BSC a chanche to close down MGCP ports as well.
2010-06-15nat: Store the creation time of a sccp connection.Holger Hans Peter Freyther1-0/+3
Generate it when creating the connection but also when reusing an existing connection.
2010-06-15nat: Only close connections that were fully connectedHolger Hans Peter Freyther1-0/+1
Remember that we have seen a CC and have a valid destination local reference now and only send a fake RLC to the MSC when we had connections in this state.
2010-06-15nat: Change MGCP DLCX handling and send dummy MDCX to the BTS.Holger Hans Peter Freyther1-2/+2
When setting a new MSC timeslot to a SCCP connection check if any of the existing connections have this timeslot, if so we will send a DLCX down the stream to make sure it is closed there, when we will CRCX this new timeslot we will happily reallocate it. When the SCCP connection goes away, or we get a DLCX from the network, or the BSC is gone we will send a DLCX message down the stream as well. When we receive a CRCX from the network we will forward the CRCX as usual and send a dummy MDCX after it. For the DLCX and the dummy MDCX we send a custom MGCP message that will not provoke an answer. Even if the downstream MGCP GW will answer we will ignore it due the dummy transaction id that is not used anywhere else. This change should make sure that we close the dowstream endpoint all the time, even when the DLCX arrives after the SCCP connection is torndown.
2010-06-15[nat] Lookup by BSC Connection otherwise the point of reassigning the is ↵Holger Hans Peter Freyther1-2/+5
defeated When sending a MSG to the MSC try to find the to be used "src" reference by comparing the reference on the BSC and the BSC connection. Only this tuple needs to be unique. Actually only when looking at the SRC REF we need to compare the BSC as the dest reference should be unique but we are just making the check a bit stronger to make it look symmetric.
2010-06-15[nat] Cope with a bad BSC reassigning in use SRC REFHolger Hans Peter Freyther1-0/+22
Some closed source BSC like to assign the SRC REF from a small static pool and might reuses one we have not yet given up on.
2010-06-15nat: Do not use 0/0 for mux/timeslot by defaultHolger Hans Peter Freyther1-0/+1
0 is a valid timeslot and we should not use it... use a negative value to be save.
2010-06-15nat: Add new connections to the end of the listHolger Hans Peter Freyther1-1/+1
By adding them to the end the VTY interface will only append connections and not change the order on each invocation.
2010-06-15[statistics] Provide basic statistics for the NATHolger Hans Peter Freyther1-0/+2
Count number of SCCP connections, number of BSC reconnects, number of calls. For most of them we have a per BSC and a global count. Right now all structs using the counters survive until the end of the application so we do not need to free them.
2010-06-15nat: remove is called on already patched connections..Holger Hans Peter Freyther1-5/+1
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-06-15nat: Logging improvement for the nat.Holger Hans Peter Freyther1-1/+2
Print some more information, e.g. when a BSC is connected and authenticated, print the SCCP ref number.
2010-06-15sccp: Move the destruction of the sccp connection to a new placeHolger Hans Peter Freyther1-5/+1
2010-06-15nat: Return the SCCP connection, change order of patching and updatingHolger Hans Peter Freyther1-28/+15
* 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-06-15misc: Do not prepend 0x when using %p in printf.Holger Hans Peter Freyther1-4/+4
2010-06-15nat: Fix the lookup of connections to and from the BSCHolger Hans Peter Freyther1-11/+43
When sending a message to the MSC in the case of DT1 messages we only have the address of the MSC, so we need to go with that, otherwise (e.g. in case of a CR, RLC) we do have the source address and need to patch it. When forwarding a message to the BSC we do receive a msg that should contain the patched address, we need to unpatch it...
2010-06-15nat: Keep track of both sides of the connectionHolger Hans Peter Freyther1-0/+28
On a CC message we will need to remeber where the source local reference of the network belonged so we can properly identify the connection when receiving UDT messages.
2010-06-15nat: Actually add the connection to the SCCP list of active connectionsHolger Hans Peter Freyther1-4/+15
Add the connection to the list of active connections. Otherwise we are not able to find the connection.
2010-06-15nat: Move SCCP patching to a new file, log updatesHolger Hans Peter Freyther1-0/+151
Move patching and reassigning of messages to a new file which will making testing this functionality more easy.