aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/bsc_nat.h
AgeCommit message (Collapse)AuthorFilesLines
2010-09-01nat: We have 1 to 31 available to the BSC.Holger Hans Peter Freyther1-1/+1
2010-08-30nat: Replace the MGCP Endpoint if that is requiredHolger Hans Peter Freyther1-1/+1
Add code to replace the Endpoint number for the mgcp.
2010-08-29nat: Attempt to assign the BSC Timeslot based on a free listHolger Hans Peter Freyther1-1/+5
Do attempt to not reassign an endpoint immediately but go to the next free one.
2010-08-06nat: Keep the state (CRCX,MDCX,DLCX) of the operation..Holger Hans Peter Freyther1-0/+2
This will allow to have additional debug information and to use the state inside the forwarding code.
2010-08-06mgcp: Make the CI uint32_t all the way to avoid mismatchHolger Hans Peter Freyther1-1/+1
2010-07-31nat: Fix compilation with nat not being enabled.Holger Hans Peter Freyther1-63/+2
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-27nat: Rename ip-tos to ip-dscp and provide an alias...Holger Hans Peter Freyther1-1/+1
2010-07-23nat: u_int8_t -> uint8_tHolger Hans Peter Freyther1-2/+2
2010-07-05nat: Remove the first_contact variable.Holger Hans Peter Freyther1-1/+0
2010-07-05nat: Create a method to determine if any MSC is connected.Holger Hans Peter Freyther1-0/+2
In the future we will have multiple MSC connections so we will need to figure if any of them is active.
2010-07-05nat: Keep track of the MSC handling the connection.Holger Hans Peter Freyther1-0/+1
In the future we might have multiple MSCs connected and need to dispatch it to the right one.
2010-06-17nat: Count the number of dropped SCCP and MGCP calls as well.Holger Hans Peter Freyther1-0/+2
Count the number of dropped calls and lost SCCP connections due the loss of a connection to the BSC...
2010-06-17nat: Switch per BSC counters to the rate ctr.Holger Hans Peter Freyther1-7/+7
This is switching the simple statistics to the rate counter and is updating all users...
2010-06-15nat: Allow to specify multiple entries in the access-list...Holger Hans Peter Freyther1-0/+7
Inside the access-list we have a list of entries that have either one allow or one deny rule... we do not allow to remove a single rule but one has to remove the whole list, in that case talloc will handle cleaning all entries. Right now the matching is O(n*m) as we traverse the list (multiple times) and run the regexp multiple times. One way to make it faster would be to concat all regexps into one.
2010-06-15nat: Shorten the access-list struct and method names (still way too long)Holger Hans Peter Freyther1-4/+4
2010-06-15[nat] Implement the removal of an access-list.Holger Hans Peter Freyther1-0/+1
2010-06-15[nat] Introduce the concept of access-listHolger Hans Peter Freyther1-7/+21
One can set one access-list to one BSC and one access-list to one NAT. The matching of IMSIs remains the same for now, also applying the white/blacklist. Access lists can not be deleted for now and no perf opt is done (e.g. one could cache the result of the last lookup in the bsc struct).
2010-06-15[nat] Add ip-tos option to the nat.Holger Hans Peter Freyther1-0/+1
This is applied to all incoming BSC connections.
2010-06-15[nat] Make the refusal more complicated to support more MSCsHolger Hans Peter Freyther1-0/+1
We will need to confirm the connection, then we can send the GSM48 message, then we need to close the connection... the embedding in the refusal method was way too easy..
2010-06-15[nat] Make create_sccp_src_ref return the SCCP Connection.Holger Hans Peter Freyther1-1/+1
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-15[nat] Add the notion of a "local" connection.Holger Hans Peter Freyther1-0/+1
A local connection is only between the MUX and the real BSC. We will not forward anything to the MSC. This will be needed for the IMSI filtering as sending a CREF is not liked by every BSC...
2010-06-15[nat] Use and print the connection type of a SCCP connection.Holger Hans Peter Freyther1-0/+5
2010-06-15[nat] Set the connection type/reason as out parameterHolger Hans Peter Freyther1-1/+10
We are analyzing each CR message and it is nice to know the reason these connections were created. Change the nat method.
2010-06-15[nat] Remove the imsi allow option on the nat level.Holger Hans Peter Freyther1-2/+0
For now we have: 1.) bsc imsi deny to deny at the BSC level 2.) bsc imsi allow to allow a SIM at the BSC level 3.) nat imsi deny to deny at the global level
2010-06-15[nat] Add a token to the nat config and handle ID GETHolger Hans Peter Freyther1-0/+1
This allows to chain a nat with a nat by answering to the id get code and sending the token.
2010-06-15[nat] Allow to set the description for the bsc.Holger Hans Peter Freyther1-0/+2
This will allow to add description to each BSC.
2010-06-15[nat] Make the string -> regexp parsing publicHolger Hans Peter Freyther1-0/+3
This way it can be used from within a test case to test the regexps..
2010-06-15nat: Introduce a nat filter that is working on the CR message.Holger Hans Peter Freyther1-0/+5
Currently there is no implementation but the refusal code is in place and will send a refusal back to the BSC.
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: Print the MSC status with a new vty command.Holger Hans Peter Freyther1-0/+1
2010-06-15nat: Make ping/pong timeout configurable.Holger Hans Peter Freyther1-0/+5
2010-06-15nat: Send a IPA PING down the stream and wait for the pong.Holger Hans Peter Freyther1-0/+4
We will send a ping every 20 seconds and if we have no pong within 5 seconds we will close down the BSC connection and wait for a reconnect. We will start this after having authenticated the BSC and we stop the timer when destructing the BSC connection.
2010-06-15nat: Add a command to close a given BSC ConnectionHolger Hans Peter Freyther1-0/+1
This can be used to clear stale connections for a given BSC or to force a reconnect of the BSC.
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: Only send DLCX when we have send a CRCX to the BSC on this endpointHolger Hans Peter Freyther1-0/+1
2010-06-15nat: Change MGCP DLCX handling and send dummy MDCX to the BTS.Holger Hans Peter Freyther1-5/+3
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] Add option to forbid the paging to the BSC.Holger Hans Peter Freyther1-0/+2
This can be done for testing purposes and to allow making a BTS crash that can not handle paging requests properly.
2010-06-15[nat] Lookup by BSC Connection otherwise the point of reassigning the is ↵Holger Hans Peter Freyther1-1/+1
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-15nat: Return the SCCP Connection again...Holger Hans Peter Freyther1-1/+1
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-06-15nat: Print the LAC that was searched for and not found.Holger Hans Peter Freyther1-1/+1
2010-06-15nat: Make the MSC configurable.Holger Hans Peter Freyther1-0/+1
2010-06-15nat: Move MSC ip address into the config..Holger Hans Peter Freyther1-0/+2
The address can still be specified on the cli and it will overwrite the config in the config file.
2010-06-15nat: Add config option to filter/handle certain imsi'es.Holger Hans Peter Freyther1-0/+15
2010-06-15[statistics] Provide basic statistics for the NATHolger Hans Peter Freyther1-0/+39
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: Attempt to have a single BSC write methodHolger Hans Peter Freyther1-1/+3
This method currently prepends the IPA header and sends the data. In the future we might be able to use SCTP for it. We have to remove the IPA header from the static messages for that to work. This code is untested.
2010-06-15nat: Send the reset after we have received the init ackHolger Hans Peter Freyther1-0/+3
Sending the reset right away will upset the MSC and we need to wait for the first contact.
2010-06-15nat: Store the config in the connection instead of the lacHolger Hans Peter Freyther1-2/+2
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-06-15Revert "nat: Remember where the BTS is listening for things."Holger Hans Peter Freyther1-1/+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-06-15nat: Close all endpoints used by a BSC when the BSC is goneHolger Hans Peter Freyther1-0/+1
Cleanup all endpoints that belonged to a given BSC. This is one part of the cleanup, the other is to bring down the SCCP link properly.