aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/sgsn_main.c
AgeCommit message (Collapse)AuthorFilesLines
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>
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-27[gprs] Add option parsing to SGSNHarald Welte1-1/+75
2010-07-02[SGSN] Call libosmocore helper to load cipher pluginsHarald Welte1-0/+3
2010-07-01[SGSN] Add VTY interface for SNDCPHarald Welte1-0/+1
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-1/+2
2010-05-19[GPRS] Make SGSN more verbose when startup failsHarald Welte1-2/+13
2010-05-19[GPRS] NS: VTY: Move all local ip/port bind values into 'ns' nodeHarald Welte1-2/+3
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/+2