aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/sgsn_main.c
AgeCommit message (Collapse)AuthorFilesLines
2016-03-22fix build: match Iu event cb enum argument type from declarationNeels Hofmeyr1-1/+1
2016-03-16libiu: Replace RAB assignment response callback with a general oneDaniel Willmann1-2/+2
The new iu event callback will now be called for RAB assignment response, IU release and security mode complete
2016-03-03sgsn: fix use of opaque RANAP_RAB_SetupOrModifiedItemIEs_s declDaniel Willmann1-1/+1
2016-03-03libui: Don't assume gsm_network and gsm_subscriber_conncetion in libiuDaniel Willmann1-1/+1
The sgsn uses other data structs so don't require them inside libiu. Instead keep a private list of ue contexts and iterate through that. This commit reverts the libui changes of commit d03faa4bacd4d2a8b9155faf5219a948b73f481c
2016-03-03gprs/sgsn: Use RAB assignment response cb in PDP context activationDaniel Willmann1-1/+3
2016-03-03mscsplit: remove bts and lchan pointers from libmscNeels Hofmeyr1-1/+1
The diff between this and master will probably need a lot of review and fixes. The current state does compile, but I expect pretty much everything to be broken now. Future development will reinstate proper functionality piecemeal. The first goal is to get basic signalling to work, then SMS. The voice control (RTP) is completely disabled now (see "#if BEFORE_MSCSPLIT") and will be fixed last AFAICT.
2016-03-03iu_init: add addr and port argsNeels Hofmeyr1-1/+1
2016-03-03various small fixesNeels Hofmeyr1-1/+3
2016-03-03iu_common wipNeels Hofmeyr1-1/+1
2016-03-03asn_debugNeels Hofmeyr1-0/+1
2016-03-03migrate WIP osmo-iuh hack to use system-installed libosm-ranap.soHarald Welte1-2/+6
this means we no longer try to link to hard-coded files outside of the openbsc.git repository.
2016-03-03WIP: Really ugly hacks to get up to (and including) PDP CTX ACTHarald Welte1-0/+11
2016-02-25enable ctrl bind config for various programsNeels Hofmeyr1-11/+20
Add ctrl_vty_init() calls and feed the ctrl_vty_get_bind_addr() return value to ctrl_interface_setup() in the following programs: osmo-bsc osmo-bsc_nat osmo-nitb osmo-sgsn For osmo-sgsn, move the control interface setup invocation below the config parsing, so that the ctrl_vty_get_bind_addr() can return the configured address.
2016-02-25enable telnet VTY bind address config for various programsNeels Hofmeyr1-3/+8
Following the 'line vty'/'bind A.B.C.D' command added in libosmocore, use the configured address to set the telnet bind for the VTY line. It is now possible to publish the VTY on a specific local interface (including 0.0.0.0 aka "any"). Implement in all of: osmo-gbproxy osmo-gtphub osmo-sgsn osmo-bsc osmo-bsc_nat osmo-bsc_mgcp osmo-nitb In some of these main programs, move the telnet initialization below the configuration parsing. Historically, this was not a good idea for programs using bsc_init.c (aka bsc_bootstrap_network()), since they expected a gsm_network struct pointer in ((struct telnet_connection*)vty->priv)->priv, so that telnet had to be either initialized or replaced by a dummy struct. In the meantime, the gsm_network struct is not actually looked up in a priv pointer but in the static bsc_vty.c scope (bsc_gsmnet), so this limitation is mere legacy (even though said legacy is still there in an "#if 0" chunk). In the other binaries I have briefly looked at the init sequence dependencies and found no reason to initialize telnet above the config file parsing. In any case, I have tested every single one of abovementioned binaries to verify that they still parse the example config successfully and launch, allowing VTY connections on the configured address(es). I hope this suffices. In all of the above, log VTY address and port. LOGL_INFO is disabled by default in some of the logging scopes, and since it is a single log message right at program launch, I decided for the slightly more aggressive LOGL_NOTICE.
2015-11-02stats: Enable stats for sgsn, gbproxy, nitb, bsc, natJacob Erlbeck1-1/+5
This commit initialises and enables the stats subsystem for the given binaries. Sponsored-by: On-Waves ehf
2015-10-29SGSN: Fix typo in VTY license statement.Harald Welte1-1/+1
It mentioned AGPLv3+ and refers to the hyperlink of v3, but still stated "Version 2 or later". That was a typo at the time.
2015-09-24sgsn_main: in -h, print default config fileNeels Hofmeyr1-1/+1
2015-09-24vty: Change the return type from enum to intHolger Hans Peter Freyther1-1/+1
clang complained that different enums are mixed with the return type and we actually want this to be an int now.
2015-05-25sgsn: Allow to resolve the IPv4 address of a GGSN through DNSHolger Hans Peter Freyther1-0/+8
For real networks we need to check if the requested APN string is allowed and then resolve the GGSN address through DNS. There are countries with two or three digit MNCs and one could either try to keep a list of countries that have two/three digits or just try both of them. I have opted for the later for the ease of the implementation. C-Ares doesn't allow to cancel a request so we will need to have the MMCTX and the Lookup have different lifetimes. We simply set ->mmctx to NULL in case the MMCTX dies more early. The selected and verified apn_str will be copied into the out parameter. In case no static APN/GGSN config is present and the dynamic mode is enabled a request will be made.
2015-05-06sgsn: Create an initial and limited CDR moduleHolger Hans Peter Freyther1-0/+1
This is consuming the new signals and allows to install several different CDR/observing/event/audit modules in the future. For getting the bytes in/out the code would have had to undo what the rate counter is doing and at the same time adding a "total" to the ratecounter didn't look like a good idea, the same went for making it a plain counter. Begin writing the values one by one and open/closing a new FILE for every log messages. This is not efficient but easily deals with external truncation/rotation of the file (no fstat for and checking the links and size). As usual we will wait and see if this is an issue. Add some new members to our PDP context structure to see what it is about.
2015-01-26sgsn: Remove inactive LLME/MM after inactivity timeoutJacob Erlbeck1-0/+1
Currently old LLMEs and MM contexts that haven't been explicitly detached or cancelled are not removed until another request with the same IMSI is made. These stale entries may accumulate over time and severely compromise the operation of the SGSN. This patch implements age based LLME expiry, when the maximum age has been reached, the corresponding MM context is cancelled. If such an MM context doesn't exist, the LLME is unassigned directly. The implementation works as follows. - llme->age_timestamp is reset on each received PTP LLC message - sgsn_llme_check_cb is invoked periodically (each 30s) - sgsn_llme_check_cb sets the age_timestamp to the current time if it has been reset - sgsn_llme_check_cb computes the age and expires the LLME if it exceeds gprs_max_time_to_idle() Ticket: OW#1364 Sponsored-by: On-Waves ehf [hfreyther: Fix typo in comment LMME -> LLME]
2015-01-18sgsn: Integrate the GSUP client into the SGSNJacob Erlbeck1-0/+6
This commit adds GSUP client configuration (via VTY), connection set up, and real message sending. The following configuration commands are added: - gsup remote-ip A.B.C.D set server IP address - gsup remote-port PORT set server TCP port Ticket: OW#1338 Sponsored-by: On-Waves ehf
2014-12-09sgsn: Add gprs_subscriber.cJacob Erlbeck1-3/+0
This patch adds GPRS specific functions for gsm_subscriber objects (allocation, retrieval, deletion) and subscriber data requests/updates. The sgsn_update_subscriber_data callback is used to notify the sgsn about updates and is extended by a parameter that passes a reference to a gsm_subscriber. Sponsored-by: On-Waves ehf
2014-11-14sgsn: Remove explicit sgsn_instance parametersJacob Erlbeck1-1/+1
Currently the function in sgsn_auth.c either have an sgsn_config or an sgsn_instance parameter. Since then global sgsn variable is already being used in that file and since other parts of the SGSN related code also rely on a global sgsn singleton, these parameters pretend to provide a flexibility that is not really supported. Therefore this patch removes these parameters except for the ACL related functions, which do not call code that uses the sgsn variable. Sponsored-by: On-Waves ehf
2014-11-14sgsn: Add 'acl-only' authentication policyJacob Erlbeck1-1/+1
Currently the VTY 'auth-policy' command results in setting or clearing the acl_enabled flag. This also enables the matching of the MCC/MNC prefix of the IMSI. This patch adds an additional policy 'acl-only' which disables the MCC/MNC matching and relies on the ACL only. Sponsored-by: On-Waves ehf
2014-10-27sgsn: Moved IMSI ACL management to sgsn_auth.cJacob Erlbeck1-0/+1
Currently the ACL code is located in sgsn_vty.c. This commit moves this to a new file sgsn_auth.c as a first step to make authorization more flexible in order to implement remote acquisition on subsciber data. Sponsored-by: On-Waves ehf
2014-08-24Use port number #defines for VTY and CTRL portsHarald Welte1-2/+4
.. as defined in libosmocore
2014-08-21move libctrl from openbsc to libosmoctrl (libosmocore.git)Harald Welte1-1/+1
2014-03-23sgsn/ctrl: Add ctrl interface, implement listing subscribersHolger Hans Peter Freyther1-0/+13
Add the control interface with no hierachy right now and implement the first command to list IMSI + Context Address of active sessions. sgsn_cmd_handle could share more code with bsc variant. Fixes: SYS#264, SYS#265
2013-07-21sgsn: add a minimalistic ACLHarald Welte1-0/+1
This adds a minimalistic ACL by which certain, individual roaming IMSIs can be authorized to use the SGSN. So you can selectively bypass the 'MCC+MNC == first 5 digits of IMSI' checking for a couple of IMSIs
2012-11-21sms: Use the DLSMS instead of the DSMS category throughout our codeHolger Hans Peter Freyther1-6/+0
2012-08-03gb: suspend_ref was changed to a plain uint8_t, update the codeHolger Hans Peter Freyther1-1/+1
Require a 0.5.2+ libosmogb due the change of the suspend_ref type.
2012-06-17libgb: make sure all BSSGP functions have bssgp_ prefixHarald Welte1-3/+3
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/+66
2012-06-17libgb: don't call directly into GMM / LLC layerHarald Welte1-0/+29
Instead of direct function calls to individual functions, we now generate primitives (osmo_prim) and send them to one application-provided function "bssgp_prim_cb()"
2012-06-16libgb: Remove dependency to openbsc/debug.hHarald Welte1-0/+3
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-10-14gprs: Fix compiler warnings in the codeHolger Hans Peter Freyther1-2/+0
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-16sgsn_main: add comment about exit statement never reachedHarald Welte1-0/+1
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-1/+1
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-5/+5
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>