aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/bsc_nat.h
AgeCommit message (Collapse)AuthorFilesLines
2011-08-30mgcp: Add a per BSC option to use compression or not use it.Holger Hans Peter Freyther1-1/+4
2011-08-25misc: Move the bsc_parse_reg to libcommom and name it gsm_parse_regHolger Hans Peter Freyther1-1/+0
Move the regexp parsing code from the NAT to libcommon as it will be used by the NAT and BSC code. This also adds the #include <regex.h> include to gsm_data. This header should be split up.
2011-07-28libctrl: Change controlif_setup so it returns the ctrl handleDaniel Willmann1-0/+3
nat: Catch up with controlif_setup API change We now save a control handle reference in the nat osmo-bsc: Catch up with controlif_setup API change We now save a control handle reference in the gsm network
2011-07-13nat: Use libctrl and add command forwarding to osmo-bscDaniel Willmann1-0/+22
Passes commands beginning with "bsc.<num>" to the bsc that is responsible for LAC <num>.
2011-06-01nat: Look into the TPDU/SMS-SUBMIT and use the TP-DestAddress for matchesHolger Hans Peter Freyther1-0/+2
Match the used SMSC and the destination of the SMS and change the SMSC address if both are matched.
2011-06-01nat: Patch the destination SMS address of a messageHolger Hans Peter Freyther1-1/+4
Use the same filtering infrasturcture to patch the SMSC address in a CP-DATA/RP-DATA message. Add a very simple testcase for this code.
2011-06-01nat: Prepare to patch more than the CC Setup messageHolger Hans Peter Freyther1-1/+1
Refactor the code to allow having different handlers. The goal is to be able to patch some SMS messages too.
2011-06-01nat: Allow to have a regexp to match the MSISDNHolger Hans Peter Freyther1-1/+15
The idea that MCC and MNC is enough to classify a subscriber turns out to be wrong. Certain operatos license a number range of IMSIs to others. When we see a '^' in the MCC field we treat it as a regexp. The code now turns the MCC/MNC into a regexp for the IMSI. It is not using extended POSIX regexp to match the behavior of the access list.
2011-05-07src: rename msg_entr* to osmo_config_*Pablo Neira Ayuso1-1/+1
Summary of changes: s/msg_entry_parse/osmo_config_list_parse/g s/msg_entry/osmo_config_entry/g s/msg_entries/osmo_config_list/g
2011-05-06src: use namespace prefix osmo_counter*Pablo Neira Ayuso1-6/+6
Summary of changes: s/struct counter/struct osmo_counter/g s/counter_inc/osmo_counter_inc/g s/counter_get/osmo_counter_get/g s/counter_reset/osmo_counter_reset/g s/counter_alloc/osmo_counter_alloc/g s/counter_free/osmo_counter_free
2011-05-06src: use namespace prefix osmo_wqueue*Pablo Neira Ayuso1-4/+4
Summary of changes: s/struct write_queue/struct osmo_wqueue/g s/write_queue_init/osmo_wqueue_init/g s/write_queue_clear/osmo_wqueue_clear/g s/write_queue_enqueue/osmo_wqueue_enqueue/g s/write_queue_bfd_cb/osmo_wqueue_bfd_cb/g
2011-05-06src: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso1-2/+2
Summary of changes: s/struct bsc_fd/struct osmo_fd/g s/bsc_register_fd/osmo_fd_register/g s/bsc_unregister_fd/osmo_fd_unregister/g s/bsc_select_main/osmo_select_main/g
2011-05-06src: use namespace prefix osmo_timer* for timer functionsPablo Neira Ayuso1-4/+4
Summary of changes: s/struct timer_list/struct osmo_timer_list/g s/bsc_add_timer/osmo_timer_add/g s/bsc_schedule_timer/osmo_timer_schedule/g s/bsc_del_timer/osmo_timer_del/g s/bsc_timer_pending/osmo_timer_pending/g s/bsc_nearest_timer/osmo_timers_nearest/g s/bsc_prepare_timers/osmo_timers_prepare/g s/bsc_update_timers/osmo_timers_update/g s/bsc_timer_check/osmo_timers_check/g
2011-05-02nat: Create a Paging Group that BSCs can refer toHolger Hans Peter Freyther1-0/+7
Introduce a paging group that a BSC can refer to and is used during the LAC lookup. This way paging can be flooded through the network and just filtered at the last element in the core.
2011-05-02nat: Introduce the concept of a paging group and use itHolger Hans Peter Freyther1-0/+14
A paging group is a list of LACs, different BSCs can point to a paging group and use it for the LAC lookup.
2011-05-02nat: Rewrite the paging handling.Holger Hans Peter Freyther1-1/+1
The current code tries to find _one_ bsc for a paging message and then continues. The new code will try to find multiple BSCs for each LAC. This is done in preparation of having two BSCs handle the same LAC. This code right now is O(m*n) but it will be worse once paging groups are landed. The code to test the function was reduced to just test the lac lookup code as the other part can not be tested in a standalone setup anymore.
2011-04-26bsc: Allow to have a list of MSCs/MUXs to connect toHolger Hans Peter Freyther1-4/+4
Be able to configure a list of destinations (duplicates allowed) that will be tried in a round robin fashion. The change is in the bsc_msc_connection to operate on a list. We achieve the round robin nature with the same trick used in the paging code to delete and append the current entry. The nat code was updated to compile but one can only configure one destination.
2011-04-26nat: Introduce a block on the NAT to slowly get rid of BSCsHolger Hans Peter Freyther1-0/+3
For restarting the NAT we can now block it, it will not accept new connections and for existing connections it will attempt to drop them over time. A blocked NAT will end up with no BSC connections left and then can be safely restarted.
2011-04-18nat: Inform the USSD Provider about lost connectionsHolger Hans Peter Freyther1-0/+8
2011-04-18nat: Remove magic numbers, use enum values for conn classificationHolger Hans Peter Freyther1-0/+10
Remove the usage of 0, 1, 2 and start using enum values. We can still assume con_local is a number.
2011-04-18misc: Remove sys/types.h includes from the filesHolger Hans Peter Freyther1-1/+0
These are not needed any more. We used them for u_int types but we now use uint which comes from stdint.h
2011-04-04nat: Bail out if the regexp fails to compile and avoid a crashHolger Hans Peter Freyther1-1/+1
If the regexp fails to compile the internal dfa is NULL and a regexec will crash nicely. Fail and free the string if the regexp fails to compile.
2011-04-01nat: Make the USSD number matching a regexpHolger Hans Peter Freyther1-0/+1
This allows to match multiple numbers and multiple patterns
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-8/+8
libosmogsm is a new library that is distributed in the libosmocore. Now, openbsc depends on it. This patch gets openbsc with this change. This patch also rewrites all include path to the new osmocom/[gsm|core] Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-02-27nat: Fix some corruption in the test caseHolger Hans Peter Freyther1-0/+1
2011-02-27nat: Change number of multiplexes to the max-endpointsHolger Hans Peter Freyther1-1/+3
2011-02-26nat: Allocate endpoints from multiple multiplexes.Holger Hans Peter Freyther1-1/+1
This code allocates endpoints from multiple multiplexes but will always leave 0x0 and 0x1f unassigned in the multiplex.
2011-02-26nat: Start making the number of multiplexes configurableHolger Hans Peter Freyther1-0/+1
Introduce a VTY setting that right now needs to be set to one. To make updating this setting possible we will now store the number of endpoints in the bsc connection as well.
2011-02-26nat: Allocate the endpoint status dynamicallyHolger Hans Peter Freyther1-1/+4
Allocate the status for an endpoint dynamically. We will support BSCs with different amount of multiplexes and need to have this flexibility in the future. Add the proper null checks to the current users of this code.
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-27Merge branch 'zecke/number-rewrite'0.9.9Holger Hans Peter Freyther1-0/+7
2010-10-27nat: Close SCCP connections when the USSD Provider is closed.Holger Hans Peter Freyther1-0/+1
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: 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-0/+2
Create a new function, hand the data to this function, take back a possible modified msgb and invalidate parsed at this point.
2010-10-27nat: Add vty option for number rewritingHolger Hans Peter Freyther1-0/+5
Parse a msg file in case we do have a list.
2010-10-25nat: Implement accepting a USSD Provider connection, do authenticationHolger Hans Peter Freyther1-0/+8
2010-10-25nat: Keep a ussd token in the configHolger Hans Peter Freyther1-0/+2
We will have the USSD provider connecting to us and we will use the IPA protocol, including the auth mechanism.
2010-10-25nat: Add an option to set the query string to matchHolger Hans Peter Freyther1-0/+1
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-25nat: Make the imsi checking function public.Holger Hans Peter Freyther1-0/+1
We will use this method in the USSD module to check if the IMSI should be handled for USSD queries.
2010-10-25nat: Provide a USSD access list to check for which to play HLR.Holger Hans Peter Freyther1-0/+3
2010-10-25nat: Create a USSD module to filter out USSDs...Holger Hans Peter Freyther1-0/+3
2010-10-25nat: Introduce a new connection type for Supplementary ServicesHolger Hans Peter Freyther1-0/+2
If we have a CM Service Request we will look into the message to see if it is a Supplementary Service Activation.
2010-10-21nat: Move the DTAP unpacking into a new methodHolger Hans Peter Freyther1-0/+3
DTAP unpacking will be used by the USSD checking code
2010-10-21nat: Copy the IMSI, then free it or move the context to the connectionHolger Hans Peter Freyther1-1/+1
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: Add a method to add a proper message to the queue.Holger Hans Peter Freyther1-0/+1
This will be used by the USSD module to forward the data without creating another copy of the data.
2010-10-19nat: Find a connection by the real refHolger Hans Peter Freyther1-0/+2
2010-10-13nat: Make the write_queue write callback a public functionHolger Hans Peter Freyther1-0/+1
2010-10-13nat: Make the queue routine work on any write_queueHolger Hans Peter Freyther1-0/+1
2010-10-13ipaccess: Put our extensions to the protocol into the same enumHolger Hans Peter Freyther1-2/+0
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/+12
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.