aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_nat.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-18misc: Remove the osmocom/core/process.h includeHolger Hans Peter Freyther1-1/+0
The osmo_daemonize moved from process.h to application.h (that is already included), remove the process.h include.
2011-07-13[bsc-nat] ctrlif: use llist_entry() macro and fix overly-long linesHarald Welte1-4/+9
2011-07-13[bsc-nat] ctrlif: save ourselves one level of indentationHarald Welte1-32/+30
2011-07-13[bsc-nat] ctrlif: use the 'err' label consistentlyHarald Welte1-4/+2
and propagate -ENOMEM in case we have no memory
2011-07-13bsc-nat: ctrlif: split out handle_ctrlif_msg() from ipaccess_bsc_read_cb()Harald Welte1-66/+71
We want to avoid spaghetti code by creating smaller functions, which also helps with the line lengths / indentation levels.
2011-07-13controlif: declare controlif_setup() in control_cmd.hHarald Welte1-2/+0
this avoids us to copy+paste external declarations over all 'main' files.
2011-07-13nat: Use libctrl and add command forwarding to osmo-bscDaniel Willmann1-0/+279
Passes commands beginning with "bsc.<num>" to the bsc that is responsible for LAC <num>.
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-05-12misc: Use the osmo_init code for signals and loggingHolger Hans Peter Freyther1-10/+7
Use the libosmocore code to ignore certain signals by default (e.g. SIGHUP, SIGPIPE) and use the new code to create a default stderr logging target and initialize it properly.
2011-05-07src: use namespace prefix osmo_* for misc utilsPablo Neira Ayuso1-2/+2
Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
2011-05-06src: use namespace prefix osmo_counter*Pablo Neira Ayuso1-3/+3
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-2/+2
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-8/+8
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-11/+11
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-04nat: Keep track of the error message.Holger Hans Peter Freyther1-3/+4
2011-05-02nat: Rewrite the paging handling.Holger Hans Peter Freyther1-10/+45
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-3/+3
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/+35
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-21ussd: Ignore connection release/clear from the MSCHolger Hans Peter Freyther1-0/+9
In case this is a local USSD connection we will ignore the clear command and respond with a RLC to any RLSD but will never forward that to the BSC. This way the external USSD is fully in charge of the connection. There are theoretical issues if there are multiple transactions on the same SCCP Connection but this can not be solved properly right now.
2011-04-19ussd: Keep track of used TIs for USSD and forward messagesHolger Hans Peter Freyther1-0/+2
Keep track of the used transaction identifier and always forward messages to the USSD provider. E.g. this can be used to have a dialogue going. Right now it is still possible that the MSC will close down the connection.
2011-04-18nat: Inform the USSD Provider about lost connectionsHolger Hans Peter Freyther1-7/+36
2011-04-18nat: Remove magic numbers, use enum values for conn classificationHolger Hans Peter Freyther1-4/+4
Remove the usage of 0, 1, 2 and start using enum values. We can still assume con_local is a number.
2011-04-13nat: And out the skip_indicator/transaction id from the gsm48 headerHolger Hans Peter Freyther1-2/+3
We need to and out the protocol discriminator as call control might have use transactions. This has only failed for the USSD filter so far as this must deal with transactions.
2011-04-12src: more robust ipaccess_idtag_parse()Pablo Neira Ayuso1-1/+7
Now ipaccess_idtag_parse() returns -EINVAL instead of -1. We also check for the return value of this function in every invocation to skip further processing in case of messages with malformed TLVs. This idea was suggested by Zecke.
2011-04-07nat: Fix the call to make_sock and pass a 0 priv_nr and the nat as dataHolger Hans Peter Freyther1-1/+1
2011-04-06nat: Remember if the MSC accepted the connection on principleHolger Hans Peter Freyther1-0/+32
For the USSD module we only want to handle requests that are legitimate. This is achieved by looking for the CM Service Accept or the BSSAP CIPHER MODE COMMAND.
2011-03-23Fix build of bsc-nat and GPRS code after include path changeHarald Welte1-2/+2
The last patch changed the osmocore include paths, this fixes some build problems caused by it
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-4/+4
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-03-19bsc: change bsc_vty_init to take logging categories as parameterPablo Neira Ayuso1-1/+2
This change is required to finish the integration of the VTY and the per-application logging categories that provides: "vty: integration with logging framework" in libosmocore. It has been tested with osmo-nitb. The other just compiled tested.
2011-03-03Rename bsc_nat -> osmo-bsc_nat and bsc_mgcp -> osmo-bsc_mgcpHarald Welte1-0/+1387
This now enforces a unique structure: All of our main daemon programs start with an "osmo-" prefix.