aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gb_proxy_main.c
AgeCommit message (Collapse)AuthorFilesLines
2014-08-24Use port number #defines for VTY and CTRL portsHarald Welte1-1/+2
.. as defined in libosmocore
2014-08-04gbproxy: Remove global state from the gbproxyHolger Hans Peter Freyther1-2/+2
Global state prevents us from writing simple units tests for single routines. Go through the code and add pointers to the gbproxy configuration. Only the vty and the test code remain using the global gbproxy instance.
2014-08-04gbproxy: Move the VTY code into the vty file and create public APIHolger Hans Peter Freyther1-0/+1
Create public accessors to the core of the peer to allow to simplify the test and separate concerns. Done with Jacob.
2014-07-22gprs: Implement BSSGP MCC/MNC patchingJacob Erlbeck1-1/+1
This adds a feature to patch the BSSGP MNC/MCC fields of messages going to and coming from the SGSN. To enable this feature, the gbproxy's VTY commands 'core-mobile-country-code' and/or 'core-mobile-network-code' must be used. All packets to the SGSN are patched to match the configured values. Packets received from the SGSN are patched to the corresponding values as last seen from the BSS side. Note that this will probably not work with a gbproxy used for several BSS simultaneously. Note also, that MCC/MNC contained in a LLC IE will not be patched. Ticket: OW#1185 Sponsored-by: On-Waves ehf
2013-10-15gbproxy: Replace NS-VC references by NSEIJacob Erlbeck1-1/+1
Currently in most places in gb_proxy.c a reference to a NS-VC object is used where the peer is meant instead. The patch changes this by using the NSEI instead in these cases. Sponsored-by: On-Waves ehf
2012-06-17libgb: make sure all BSSGP functions have bssgp_ prefixHarald Welte1-1/+1
We change the minority of functions employing the gprs_bssgp_ prefix to match with the majority without gprs_ in front.
2012-06-17libgb/gprs: don't use log_info from libcommon anymoreHarald Welte1-2/+27
2012-06-17libgb: prefix all NS related functions with gprs_Harald Welte1-1/+1
2012-06-16libgb: Remove dependency to openbsc/debug.hHarald Welte1-0/+2
2012-06-16libgb: remove dependencies to openbsc/vty.h and openbsc/gsm_data.hHarald Welte1-1/+1
Rather than using openbsc internal data/functions, we now use only internal and libosmocore-provided ones.
2012-06-16libgb: Use library SS_L_NS instead lf local SS_NSHarald Welte1-1/+1
which removes some further dependencies of libgb to openbsc internal code and data.
2012-06-16split libgb into a separate library for outside useHarald Welte1-2/+3
This also removes the dependency to osmo_sock() inside libcommon and replaces it with osmo_sock_* from libosmocore
2012-03-01misc: Use msgb_free for freeing the messagesHolger Hans Peter Freyther1-1/+1
2011-08-19src: port openBSC over libosmo-abis0.9.15Pablo Neira Ayuso1-1/+1
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-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-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-06src: use namespace prefix osmo_signal*Pablo Neira Ayuso1-2/+2
Summary of changes: s/signal_cbfn/osmo_signal_cbfn/g s/register_signal_handler/osmo_signal_register_handler/g s/unregister_signal_handler/osmo_signal_unregister_handler/g s/dispatch_signal/osmo_signal_dispatch/g
2011-05-06src: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso1-1/+1
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-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-1/+1
This was done with sed on the files.
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-23src: fix use of logging_vty_add_cmds() without log_info parameterPablo Neira Ayuso1-1/+2
This patch fixes: CC gb_proxy_main.o gb_proxy_main.c: In function ‘main’: gb_proxy_main.c:224: warning: implicit declaration of function ‘logging_vty_add_cmds’ And a similar problem in osmo-bsc_nat. This was introduced in by myself in patch: "bsc: change bsc_vty_init to take logging categories as parameter" Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-02-24Use shorter vty_app_info->name for all appsHarald Welte1-1/+1
... as this is now used as SYSLOG ident
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-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-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-04vty: Add the config node code to everyone.Holger Hans Peter Freyther1-0/+1
2010-08-25Introduce '-D' commandline option to daemonize processesHarald Welte1-1/+16
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-06-09misc: Fix the return type of the go back vty function...Holger Hans Peter Freyther1-1/+1
Without this we will get warnings about incompatible assignments
2010-05-25[VTY] use new struct vty_app_info in libvtyHarald Welte1-1/+10
2010-05-25Migrate VTY code to libosmovtyHarald Welte1-2/+2
2010-05-19[GPRS] NS: VTY: Move all local ip/port bind values into 'ns' nodeHarald Welte1-9/+6
This removes the requirement for gb_proxy and sgsn to have duplicate vty parsing code
2010-05-19[GPRS] Add Frame Relay in GRE encapsulation for NSHarald Welte1-1/+11
2010-05-19[SGSN] Gb Proxy: Simplify configurationHarald Welte1-10/+12
Almost all parameters about the SGSNs NS-VC can be specified in the NS protocol node. All that needs to remain in the gbproxy config node is "nsip sgsn nsei XXX".
2010-05-16VTY: separate VTY logging commands and OpenBSC node exit codeHarald Welte1-1/+1
2010-05-16VTY: decouple telnet_interface from 'struct gsmnet'Harald Welte1-13/+7
We want the VTY and telnet code to be independent from the BSC application(s). As a side note, we also like to eliminate static global variables for 'struct gsm_network' all over the code. As such, telnet_init() is now passed along a "private" pointer, which getst stored in telnet_connection.priv. This telnet_connection is then stored in vty->priv, which in turn gets dereferenced if anyone needs a reference to 'struct gsm_network' from the BSC vty code. Also: * vty_init() now calls cmd_init() * the ugliness that telnet_init() calls back into the application by means of bsc_vty_init() function has been removed. * telnet_init() now returns any errors, so the main program can exit e.g. if the port is already in use.
2010-05-16VTY: pass program name, version and copyright to vty_init()Harald Welte1-8/+6
This enables us to make the VTY completely independent of any compile-time program-specific information, i.e. one step closer to using VTY as a shared library from multiple programs.
2010-05-14[GPRS] gb_proxy: Initiate RESET procedure on persistent NS-VC at startupHarald Welte1-0/+4
Some BSS that connect to the proxy do not continue to perform the RESET procedure after a timeout. In order to resurrect them, we simply start a RESET procedure.
2010-05-14[GPRS] Gb_proxy: Support common command line argumentsHarald Welte1-1/+72
This allows us to use a user-specified configuration file
2010-05-13[GPRS] NS: Start to use rate_ctr_group code from libosmocoreHarald Welte1-0/+2
Every NS-VC now has a set of counters for incoming and outgoing number of packets and bytes. We also split the VTY part of the gprs_ns.c implementation into gprs_ns_vty.c to make sure the protocol can actually be used without the VTY code being present.
2010-05-12GPRS: Gb proxy memory leak debugging with SIGUSRHarald Welte1-0/+34
2010-05-12NS: Add support for persistent NS-VC configurationHarald Welte1-5/+8
With persistent NS-VC configuration (configured through VTY), we can respond properly to BSS with a somewhat strange NS implementation Such as the BSplus. It enables us to respond with a proper NS-RESET (including NSVCI/NSEI) when receiving a NS-ALIVE or other PDU for a BLOCKED/DEAD NS-VC after our end of the connection is rebooted.
2010-05-11[gprs] use TCP port 4246 for the gb_proxy vty telnetHarald Welte1-1/+1
2010-05-11[gprs] gb_proxy: Send proper BSSGP STATUS msg in error caseHarald Welte1-7/+6
In order to reuse the existing bssgp_tx_* functions without pulling in the dependencies of gprs_bssgp.c, we have to move those functions to gprs_bssgp_util.c Furthermore, we can remove gbprox_nsi and replace it with bssgp_nsi, and we can do proper processing of BVC-RESET messages coming from the SGSN on the signalling BVC. In that case we need to send RESET messages to all the BSS.
2010-05-11[gprs] gb_proxy: Forward NS-RESET/NS-BLOCK/NS-UNBLOCK from SGSN to BTSsHarald Welte1-0/+1
2010-05-04[gprs] Move all GPRS related code to src/gprs subdirectoryHarald Welte1-0/+149