aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/ipaccess/ipaccess-proxy.c
AgeCommit message (Collapse)AuthorFilesLines
2016-11-26Replace local make_sock() function with libosmocore osmo_fd_init_ofd()laforge/coverityHarald Welte1-14/+29
The local 'make_sock()' function should have been deprecated since 2011, when we started to have general socket related utility functions in libosmocore. Fixes: Coverity CID 57645 Change-Id: I2329da82d2b6612e281086ca67c7836b97e03d3d
2016-11-26ipaccess-proxy: Check setsockopt() return valueHarald Welte1-1/+7
Change-Id: I34b082907b6f0b25fe2779f3a1f0a642a9002664 Fixes: Coverity CID 57642
2016-10-13msgb talloc ctx: initialize in all main() scopesNeels Hofmeyr1-0/+1
Add msgb_talloc_ctx_init() call to many main() functions still lacking a msgb talloc context. Change-Id: Ib0d6751260659cabf18a7ce80680ba2fb4228ea1
2016-02-25ipaccess_rcvmsg: fix returncode, add partial write warningNeels Hofmeyr1-1/+7
Kills a compiler warning.
2014-08-20adopt recent IPA related symbol renameHarald Welte1-5/+7
... which happened during recent migration of IPA functionality from libosmo-abis into libosmocore.
2014-08-18ipaccess-proxy: avoid namespace collision with libosmo-abisHarald Welte1-15/+17
2014-06-12proxy: Annotate the switch/case/fall throughHolger Hans Peter Freyther1-0/+1
Use the same comment as some lines earlier in that file. Fixes: Coverity CID 1040737
2013-12-12ipa-proxy: Socket creation can fail, address coverity issueHolger Hans Peter Freyther1-0/+7
Fixes: Coverity CID 1040722
2013-07-14ipaccess: The proxy code checked the array but not the elementHolger Hans Peter Freyther1-1/+1
Array compared against 0 (NO_EFFECT) array_null: Comparing an array to null is not useful: "ipbc->bsc_rsl_conn". Fixes: Coverity CID 1040718
2011-08-19src: port openBSC over libosmo-abis0.9.15Pablo Neira Ayuso1-60/+60
This is a big patch that ports openBSC over libosmo-abis. Sorry, the changes that are included here are all dependent of libosmo-abis, splitting them into smaller pieces would leave the repository in some intermediate state, which is not desired. The main changes are: - The directory libabis/ has been removed as it now lives in libosmo-abis. - new configuration file format for nanoBTS and HSL femto, we need to define the virtual e1_line and attach it to the OML link. - all the existing BTS drivers (nanoBTS, hsl femto, Nokia site, BS11 and rbs2000) now use the new libosmo-abis framework. - use r232 input driver available in libosmo-abis for bs11_config. - use ipa_msg_recv instead of old ipaccess_read_msg function. - delete definition of gsm_e1_subslot and input_signal_data. These structures now lives in libosmo-abis. Most of this patch are deletions of libabis/ which has been moved to libosmo-abis. This patch also modifies openBSC to use all the new definitions available in libosmocore and libosmo-abis. In order to do that, we have replaced the following: - DINP, DMI, DMIB and DMUX by their respective DL* correspondences. - SS_GLOBAL by SS_L_GLOBAL - SS_INPUT by SS_L_INPUT - S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN - SS_INPUT by SS_L_INPUT - S_INP_* by S_L_INP_* sub-signals - E1INP_NODE by L_E1INP_NODE vty node This patch has been tested with: - one nanoBTS - the HSL femto with the examples available under libosmo-abis - BS11 with both dahdi and misdn drivers.
2011-07-16ipaccess-proxy: use ANSI function declarations (void)Harald Welte1-2/+2
2011-07-16ipaccess-proxy: fix array bounds problemHarald Welte1-2/+2
detected by Smatch: /home/laforge/projects/git/openbsc/openbsc/src/ipaccess/ipaccess-proxy.c +173 store_idtags(14) error: buffer overflow 'ipbc->id_tags' 255 <= 255 /home/laforge/projects/git/openbsc/openbsc/src/ipaccess/ipaccess-proxy.c +173 store_idtags(14) error: buffer overflow 'ipbc->id_tags' 255 <= 255 /home/laforge/projects/git/openbsc/openbsc/src/ipaccess/ipaccess-proxy.c +175 store_idtags(16) error: buffer overflow 'ipbc->id_tags' 255 <= 255 /home/laforge/projects/git/openbsc/openbsc/src/ipaccess/ipaccess-proxy.c +178 store_idtags(19) error: buffer overflow 'ipbc->id_tags' 255 <= 255 /home/laforge/projects/git/openbsc/openbsc/src/ipaccess/ipaccess-proxy.c +500 ipaccess_rcvmsg(66) error: buffer overflow 'ipbc->rsl_conn' 4 <= 4 /home/laforge/projects/git/openbsc/openbsc/src/ipaccess/ipaccess-proxy.c +504 ipaccess_rcvmsg(70) error: buffer overflow 'ipbc->bsc_rsl_conn' 4 <= 4
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-3/+3
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_fd* and osmo_select*Pablo Neira Ayuso1-32/+32
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-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-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther1-18/+18
This was done with sed on the files.
2011-04-12ipaccess-proxy: get rid of make_gprs_sock()Pablo Neira Ayuso1-33/+7
It is similar to make_sock() available in openbsc/libcommon.
2011-04-12ipaccess-proxy: remove leftover option `--udp'Pablo Neira Ayuso1-1/+0
It seems it remains unimplemented, remove it.
2011-04-12ipaccess-proxy: more robust option parsing and checkingPablo Neira Ayuso1-0/+15
With this patch, ipaccess-proxy makes more robust option checking: $ ./ipaccess-proxy -l 1.1.1.1 -b 2.2.2.2 -e ERROR: missing mandatory argument for `-e' option And we return to shell to enforce the user to try again with the appropriate invocation. Before this patch, the default getopt_long() error handling was enabled which displayed this message: ./ipaccess-proxy: option requires an argument -- 'e' and ipaccess-proxy continued working. This is generic enough to cover other option that require mandatory arguments like `--bsc' and `--listen'.
2011-04-07ipaccess-proxy: remove hardcoded IP for options `-l' and `-b'Pablo Neira Ayuso1-4/+19
This patch removes the hardcoded IP addresses for options `-l' and `-b'.
2011-04-07libabis: ipaccess: export ipaccess_parse_unitidPablo Neira Ayuso1-39/+2
Now this is used by ipaccess-proxy, remove redundant implementation in it.
2011-04-07ipaccess-proxy: get rid of ipac_idtag_parse()Pablo Neira Ayuso1-22/+2
Use ipaccess_idtag_parse() available in libabis instead.
2011-04-07libabis: ipaccess: export ipaccess_idtag_name()Pablo Neira Ayuso1-21/+1
Now this is used by ipaccess-proxy, remove redundant implemention in it.
2011-04-07libabis: ipaccess: conclude new ipaccess_send_*() functions and use themPablo Neira Ayuso1-24/+5
This patch finishes the new ipaccess_send_*() functions and use them in the ipaccess-proxy code. I have also cleanup the definition of the PONG, ID_ACK and ID_REQ messages (including some minor documentation about them). I had to rename ipaccess_recvmsg() in ipaccess-proxy to avoid clashing with the one defined in libabis.
2011-04-07ipaccess-proxy: get rid of make_listen_sock() and use make_sock() insteadPablo Neira Ayuso1-47/+4
This patch replaces make_listen_sock() by the generic make_sock() available in libcommon/socket.
2011-04-05ipaccess: proxy: get rid of internal make_sock() implementationPablo Neira Ayuso1-39/+3
With this patch, we use the implementation available in libcommon.
2011-03-27ipaccess-proxy: fix segfault in handle_dead_socketPablo Neira Ayuso1-0/+5
This patch fixes a segfault if we or one BTS start a TCP connection and close it before any IPAC_MSGT_ID_RESP message is sent.
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-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-06misc: Once again go from "On Waves" to "On-Waves"..Holger Hans Peter Freyther1-1/+1
Try to get the company name of our sponsor right...
2010-06-10ipa-proxy: Remove printf debugging.Holger Hans Peter Freyther1-2/+0
2010-06-10ipa-proxy: Patch the IPA Set Attribute messages for NSVCIHolger Hans Peter Freyther1-1/+46
We will tell the BTS where we are listening, but the ACK will return the original settings... this should make it possible to intercept the GPRS stream..
2010-06-10ipa-proxy: Fix the send routine.. convert port to network orderHolger Hans Peter Freyther1-1/+3
2010-06-09ipa-proxy: Only handle some stuff of the CCM locally...Holger Hans Peter Freyther1-4/+11
This is a good interim solution for messages not handled by us, right now this would include the NVRAM attributes that I do not feel like caching right now.
2010-06-09ipa-proxy: Move UDP socket code to the BTS and forward messages...Holger Hans Peter Freyther1-20/+77
Forward messages from BTS to Network, Network to BTS... now we only need to fix the Set GPRS attributes on the fly...
2010-06-09ipa-proxy: Add option to locally listen to GPRS...Holger Hans Peter Freyther1-2/+67
This is just the boilerplate code, the rest is not implemted yet.
2010-06-09ipa: Print the IP addr in the listen as well..Holger Hans Peter Freyther1-2/+3
2010-06-09ipa: Say which addr could not be connected...Holger Hans Peter Freyther1-1/+2
2010-06-09ipaccess-proxy: Add getopt based config options to the proxy...Holger Hans Peter Freyther1-0/+70
Make the ip addresses configurable and such.
2010-06-09ipa: Increase msgb size for the IPA msg in the proxy.Holger Hans Peter Freyther1-1/+1
2010-03-30[ipaccess] Avoid bogus compiler warning about uninitialized varsHolger Hans Peter Freyther1-0/+1
2010-03-29[misc] Remove whitespace from the end of the line.Holger Hans Peter Freyther1-1/+1
2010-03-26move log/debug codebase to libosmocoreHarald Welte1-8/+8
The logging/debugging code is generic enough to move it into libosmocore while keeping OpenBSC specific definitions in openbsc itself. This commit uses the logging support present in libosmocore-0.1.2, you will have to update your library to this version.
2010-02-20split 'libosmocore' from openbsc codebaseHarald Welte1-4/+4
This library is intended to collect all generic/common funcitionality of all Osmocom.org projects, including OpenBSC but also OsmocomBB The library currently includes the following modules: bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer, tlv_parse, linuxlist msgb allocation error debugging had to be temporarily disabled as it depends on 'debug.c' functionality which at the moment remains in OpenBSC
2009-12-24properly check for EAGAIN in recv() callsHarald Welte1-3/+3
If recv() has no more messages on a non-blocking socket, errno will be EAGAIN, not the return value!
2009-12-24if we recv() from an abis-ip socket, don't consider -EAGAIN an errorHarald Welte1-2/+4
2009-12-24[ipaccess] Move ipaccess utilities into a dedicated subdirectoryHolger Hans Peter Freyther1-0/+1125