aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/nat/bsc_nat.c
AgeCommit message (Collapse)AuthorFilesLines
2011-03-03Rename bsc_nat -> osmo-bsc_nat and bsc_mgcp -> osmo-bsc_mgcpHarald Welte1-1387/+0
This now enforces a unique structure: All of our main daemon programs start with an "osmo-" prefix.
2011-02-24Use shorter vty_app_info->name for all appsHarald Welte1-1/+1
... as this is now used as SYSLOG ident
2011-02-11[BSC] Move the BTS-type specific code from bcs_init.c to bts_*.cHarald Welte1-13/+0
bsc_init.c was a big mess even only for two supported BTS models, so before adding more BTS types, this needs a cleanup. All the BTS specific code from bsc_init.c has now moved into bts_{siemens_bs11,ipaccess_nanobts}.c This has required that input_event() and nm_state_event() get both converted to proper libosmocore signals instead of referencing external symbols.
2011-01-07ipa: Only use one IPA number for Osmo extensionsHolger Hans Peter Freyther1-1/+1
Instead of using more numbers from the proto range we will use the 0xee and then have a mini header with our new proto id in there. For a start rename the use types to _OLD.
2011-01-01License change: We are now AGPLv3+ instead of GPLv2+Harald Welte1-7/+6
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-29nat: Send a clear command in case of connection releases.Holger Hans Peter Freyther1-7/+29
This should help the BS+ to release RF channels earlier.
2010-10-27Merge branch 'zecke/number-rewrite'0.9.9Holger Hans Peter Freyther1-1/+11
2010-10-27nat: Also send a Clear Command in case of the USSD Provider diesHolger Hans Peter Freyther1-0/+23
2010-10-27nat: Close SCCP connections when the USSD Provider is closed.Holger Hans Peter Freyther1-0/+37
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-27nat: Make clear where the RLSD is send toHolger Hans Peter Freyther1-2/+2
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-27nat: Implement rewriting, have a very basic test for that featureHolger Hans Peter Freyther1-1/+1
2010-10-27nat: Add hook for rewriting a setup messageHolger Hans Peter Freyther1-1/+11
Create a new function, hand the data to this function, take back a possible modified msgb and invalidate parsed at this point.
2010-10-25nat: Forward extra state and the message to the USSD providerHolger Hans Peter Freyther1-4/+2
Forward the SCCP state and the data to the USSD provider, also mark the connection as local.
2010-10-25nat: Implement accepting a USSD Provider connection, do authenticationHolger Hans Peter Freyther1-0/+6
2010-10-25nat: Create a USSD module to filter out USSDs...Holger Hans Peter Freyther1-0/+7
2010-10-21nat: Copy the IMSI, then free it or move the context to the connectionHolger Hans Peter Freyther1-1/+9
Extract the IMSI from the first message as well and safe it in the connection structure. The problem is that we do not have this structure at this point, so we will allocate the imsi as child of the bsc_connection and then move/steal it.
2010-10-19nat: Convert the ip to host order to allow to bind to other ipsHolger Hans Peter Freyther1-1/+1
2010-10-19nat: Use the make_sock routine to listen for incoming connections.Holger Hans Peter Freyther1-38/+4
2010-10-19nat: Use strncmp on the string in case it is not null terminatedHolger Hans Peter Freyther1-1/+2
2010-10-13nat: Make the write_queue write callback a public functionHolger Hans Peter Freyther1-12/+1
2010-10-13ipaccess: Put our extensions to the protocol into the same enumHolger Hans Peter Freyther1-1/+1
Rename NAT_IPAC_PROTO_MGCP to IPAC_PROTO_MGCP and place it in the enum. We need to be prepared to change this number if IPA is ever going to use it for something else.
2010-10-08nat: Allow a BSC to have multiple LACsHolger Hans Peter Freyther1-2/+2
Make it possible that one BSC is serving multiple cells. Introduce a list of lacs, add functions to manipulate the lists. The current test cases for paging by lac continue to work.
2010-10-06nat: Possible crash fix, only filter non local connectionsHolger Hans Peter Freyther1-10/+13
For local connections con_msc is not set and sending a RLSD to the network would have ended up in a segfault.
2010-10-06nat: Work around trying to forward a msg to a msc that does not existHolger Hans Peter Freyther1-1/+7
Instead of segfaulting warn the user that the MSC Connection does not exist...
2010-10-03nat: Provide statistics about amount of different messages.Holger Hans Peter Freyther1-0/+16
Provide simple statistics on how many LUs, Paging Responses etc. we are seeing in the network.
2010-09-25nat: Keep track of how many connections we rejectHolger Hans Peter Freyther1-1/+29
Keep track of how many connections we reject due the IMSI filter itself or due not being able to parse the message.
2010-09-24nat: Fix the filter when searching for a identity responseHolger Hans Peter Freyther1-5/+5
The filter code will return < 0 for error, 0 for unknown subscriber, 1 for subscriber checked. Use the same if construct as for the CR message. This should fix passing LU when it starts with a TMSI of a different network.
2010-09-18janitor: Move the * to the variable nameHolger Hans Peter Freyther1-3/+3
2010-09-16nat: Fix a crash when a BSC disconnects while a rejected IMSIHolger Hans Peter Freyther1-1/+2
When we reject the IMSI we do not have the msc_con set on the SCCP connection, but we do have a remote_ref. So the nat_send_rlsd will end up with a crash due the msc_con being zero. Fix the crash by only sending a released to the MSC when the connection is not local.
2010-09-16nat; Start to use gcc attribute to say that parameter may not be zeroHolger Hans Peter Freyther1-0/+1
This is an attempt to hint the compiler that it should check the parameters and warn when something is null. Sadly it does not work as expected.
2010-09-15nat: Check if the connection was filtered before the msc connectionHolger Hans Peter Freyther1-4/+4
This way we avoid seeing many warnings that we will not forward data to the MSC. For the con_local connections that is actually the idea, we will not forward them to the MSC.
2010-09-15nat: Attempt to disconnect a connection when IMSI filtering happensHolger Hans Peter Freyther1-4/+60
Attempt to disconnect the connection and make both sides happy about this. Right now it only handles the LU and should be extended to the CM Service Request.
2010-09-15nat: Start inspecting every message coming from the BSC for the IMSIHolger Hans Peter Freyther1-3/+11
Return early in case the IMSI was already checked, if not we need to look at the connection and check if the message could contain a imsi we want/need to filter.
2010-09-15nat: Remember if we have check the imsi.Holger Hans Peter Freyther1-1/+2
Return -1 if the IMSI should be filtered, 0 if the IMSI could not be checked and 1 if the IMSI was checked and allowed to pass. In the future this will be used to inspect every message coming by.
2010-09-15nat: Keep the fiter status in the return message.Holger Hans Peter Freyther1-1/+3
2010-09-15nat: Improve the log message in case we have SCCP data without a connectionHolger Hans Peter Freyther1-1/+4
Describe which kind of data we have and where it was coming from as this makes debugging a bit easier.
2010-09-11vty: Use \r\n in the copyright messagesHolger Hans Peter Freyther1-4/+4
We should use VTY_NEWLINE but our strings are static, always use \r\n as unix terminals can handle that as well.
2010-09-05nat: Use ':' to separate the message and strerrorHolger Hans Peter Freyther1-1/+1
2010-09-04vty: Add the config node code to everyone.Holger Hans Peter Freyther1-0/+1
2010-08-29nat: Attempt to assign the BSC Timeslot based on a free listHolger Hans Peter Freyther1-1/+1
Do attempt to not reassign an endpoint immediately but go to the next free one.
2010-08-25Introduce '-D' commandline option to daemonize processesHarald Welte1-1/+13
This uses the osmo_daemonize() function of libosmocore >= 0.1.18, and is now implemented for bac_nat, osmo-bsc, bsc_hack, osmo-gbproxy and bsc_mgcp. This means only osmo-sgsn is missing, which currently has no option parsing at all.
2010-08-06nat: Do not report paging to every BTS...Holger Hans Peter Freyther1-1/+1
2010-08-05nat: Use the mgcp_config_alloc to have defaults initializedHolger Hans Peter Freyther1-1/+1
Initialize the net_base properly and benefit from future config changes but also reset certain defauls that we do not want at the nat.
2010-08-04nat: Count the number of connects to the MSC.Holger Hans Peter Freyther1-2/+6
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-31sccp: Use the external libosmo-sccp as sccp implementationHolger Hans Peter Freyther1-0/+1
Add --enable-nat and --enable-osmo-bsc to build applications requiring the Osmo SCCP library to be installed. We are not using autodiscover as this is out of fashion.
2010-07-27nat: Rename ip-tos to ip-dscp and provide an alias...Holger Hans Peter Freyther1-1/+1
2010-07-23nat: Clang reported two places with garbage dataHolger Hans Peter Freyther1-1/+5
Initialize the variables to NULL to fix it.
2010-07-23nat: u_int8_t -> uint8_tHolger Hans Peter Freyther1-10/+10