aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/Makefile.am
AgeCommit message (Collapse)AuthorFilesLines
2016-03-03put Iu-common and Iu-CS stuff in proper placesNeels Hofmeyr1-2/+2
Add libiu to contain the parts used by both Iu-CS (in osmo-cscn) and Iu-PS (in gprs) into libiu. It's rather thin and may make sense to move to osmo-iuh altogether, eventually. iu.c is half moved to libiu/, and half to osmo-cscn/iu_cs.c.
2016-03-03rename sgsn_iu.c to iu.c.Neels Hofmeyr1-1/+1
That code seems to be usable for the CS side, as well. A more general name is applicable. todo: move out of gprs even.
2016-03-03remove dead code from Makefile.amHarald Welte1-2/+0
2016-03-03migrate WIP osmo-iuh hack to use system-installed libosm-ranap.soHarald Welte1-12/+5
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-4/+20
2016-01-26gprs: use libgtp cflagsAlexander Huemer1-1/+1
2015-12-03gtphub: wrap gtphub_write() for test suite.Neels Hofmeyr1-2/+2
Sponsored-by: On-Waves ehi
2015-12-03gtphub: cosmetic: rename a file.Neels Hofmeyr1-1/+1
gtphub_ext.c's initial purpose was to wrap a specific function. The file then turned into everything related to DNS, which fits pretty well. Rename to gtphub_ares.c. Tweak the header comment to reflect the new file name. Sponsored-by: On-Waves ehi
2015-11-21Fix compilation with no libc-ares present on the systemHarald Welte1-2/+1
This build failure was introduced with the OAP and gtphub changes.
2015-11-16gtphub: add first bits of GRX aresNeels Hofmeyr1-2/+4
For the resolving function, change the function signature to return a gtphub_peer_port. In consequence, publish two functions concerned with gtphub_peer_port instances for use in test and gtphub_ext.c. Add GGSN resolution queue, callback and cache. Simple implementation: if an SGSN asks for a GGSN, it will first get no answer, and I hope it will ask again once the GGSN is in the cache. Within gtphub_ext.c, have a dummy sgsn struct, as the sgsn_ares code currently depends on it (half the functions pass an sgsn instance pointer around, but the other half use the global one). In the unit tests, wrap away the ares initialization so that they can work without a DNS server around. The netcat test breaks because of this, will remove it. Using sgsn_ares, implement the gtphub_resolve_ggsn_addr() function, I hope: untested. Minor cosmetics just to see if you're paying attention... ;) Sponsored-by: On-Waves ehi
2015-11-16Add GTP hub initial code base.Neels Hofmeyr1-0/+6
First steps towards a new GTP hub. The aim is to mux GTP connections, so that multiple SGSN <--> GGSN links can pass through a single point. Background: allow having more than one SGSN, possibly in various remote locations. The recent addition of OAP to GSUP is related to the same background idea. (This is a collapsed patch of various changes that do not make sense to review in chronological order anymore, since a lot of it has thorougly transmorphed after it was first committed.) Sponsored-by: On-Waves ehf
2015-11-02oap: implement initial OAP API.Neels Hofmeyr1-1/+2
Add oap.[hc] and oap_messages.[hc]. Sponsored-by: On-Waves ehf
2015-10-13gprs/gb_proxy: Use RAND_bytes for gbproxy TLLI/TMSI allocationDaniel Willmann1-2/+2
This change has some implications for the test case. It manipulated bss_ptmsi_state and sgsn_tlli_state variables to make the output of rand_r() and thus the TLLI/TMSI used predictable. This possibility is gone when using RAND_bytes() so instead it is overridden by a function that returns a deterministic sequence of values (0x00dead00, 0x00dead01, ...). The test cases are adapted to expect these values instead of the pseudo random values before. The gbproxy_test stdout file changes as well, but only where the TLLI/TMSI is displayed (in the hex dumps as well as the TLLI cache entries). All other output is the same.
2015-10-13gprs: Use RAND_bytes for p-tmsiDaniel Willmann1-1/+2
[hfreyther: Link to libcrypto, include header, add uint8_t* cast]
2015-10-12Revert "gprs: Use RAND_bytes for p-tmsi"Holger Hans Peter Freyther1-2/+1
The commit not compiling/linking should have been a strong indicator that it has not been tested either. This reverts commit 6cf0249dacc4ae46eb0857c007906c9a3f128a3e.
2015-10-12gprs: Use RAND_bytes for p-tmsiDaniel Willmann1-1/+2
[hfreyther: Link to libcrypto, include header, add uint8_t* cast]
2015-05-25sgsn: Integrate c-ares with the osmocom event loopHolger Hans Peter Freyther1-6/+9
c-ares is an asynchronous DNS resolver and we need it to resolve the GGSN address. This is integrating the library into our infrastructure. We will create and maintain a list of registered FDs (c-ares is currently only using one of them) and (re-)schedule the timer after events occurred.
2015-05-06sgsn: Create an initial and limited CDR moduleHolger Hans Peter Freyther1-1/+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-1/+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-18gprs: Move protocol value_strings to gsm_04_08_gprs.cJacob Erlbeck1-1/+2
Currently the mapping between GSM 04.08 (GPRS) protocol specific numbers and their textual description was put into gprs_gmm.c and not exported. This commit moves the mappings to a new file gsm_04_08_gprs.c, renames some of them, and exports them via gsm_04_08_gprs.h. The following identifiers are renamed to match the corresponding type names: - gmm_cause_names -> gsm48_gmm_cause_names - gsm_cause_names -> gsm48_gsm_cause_names Sponsored-by: On-Waves ehf
2015-01-18gprs: Add GSUP clientJacob Erlbeck1-1/+1
This commit adds the client code to get subscriber information from a remote server. It provides an IPA over TCP connection to transmit and receive GSUP messages. Sponsored-by: On-Waves ehf
2015-01-10gprs: Add encoder/decoder for the Subscriber Update ProtocolJacob Erlbeck1-1/+2
This patch adds functions to encode and decode GSUP messages. This does not include the layer 1 framing (IPA). The messages so far supported are: send_auth_info_*, update_location_*, location_cancellation_*. Sponsored-by: On-Waves ehf
2014-12-09sgsn: Add gprs_subscriber.cJacob Erlbeck1-1/+1
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-10-27sgsn: Moved IMSI ACL management to sgsn_auth.cJacob Erlbeck1-1/+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-25gprs: Link gbproxy to -lrt for clock_gettimeHolger Hans Peter Freyther1-1/+1
On older GNU libc systems we need to link to this library to use the clock_gettime symbol.
2014-08-24gbproxy: Move peer definitions to gb_proxy_peer.cJacob Erlbeck1-1/+1
This patch moves the peer related definitions from gb_proxy.c to gb_proxy_peer.c and adjusts the prefix of each global symbol to gbproxy_: Peer definitions (prefix adjusted to gbproxy_): peer_ctr_description -> gprs/gb_proxy_peer.c (static) peer_ctrg_desc -> gprs/gb_proxy_peer.c (static) *peer_by_* -> gprs/gb_proxy_peer.c gbproxy_peer_alloc -> gprs/gb_proxy_peer.c gbproxy_peer_free -> gprs/gb_proxy_peer.c gbprox_cleanup_peers -> gprs/gb_proxy_peer.c Sponsored-by: On-Waves ehf
2014-08-24gbproxy: Refactor gb_proxy.c into several filesJacob Erlbeck1-1/+2
This patch moves several functions and declarations out of gb_proxy.c to make them reusable by other components and to separate them by context and task. Counter enums (prefix is changed to gbproxy_): enum gbprox_global_ctr -> gprs/gb_proxy.h enum gbprox_peer_ctr -> gprs/gb_proxy.h Generic Gb parsing (prefix is changed to gprs_gb_): struct gbproxy_parse_context -> openbsc/gprs_gb_parse.h gbprox_parse_dtap() -> gprs/gprs_gb_parse.c gbprox_parse_llc() -> gprs/gprs_gb_parse.c gbprox_parse_bssgp() -> gprs/gprs_gb_parse.c gbprox_log_parse_context() -> gprs/gprs_gb_parse.c *_shift(), *_match() -> gprs/gprs_gb_parse.c (no prefix) gbprox_parse_gmm_* -> gprs/gprs_gb_parse.c (static) gbprox_parse_gsm_* -> gprs/gprs_gb_parse.c (static) MI testing/parsing (prefix gprs_ added): is_mi_tmsi() -> gprs/gprs_utils.c is_mi_imsi() -> gprs/gprs_utils.c parse_mi_tmsi() -> gprs/gprs_utils.c TLLI state handling (prefix is changed to gbproxy_): gbprox_*tlli* -> gprs/gb_proxy_tlli.c (except gbprox_patch_tlli, gbproxy_make_sgsn_tlli) Message patching (prefix is changed to gbproxy_): gbprox_*patch* -> gprs/gb_proxy_patch.c gbprox_check_imsi -> gprs/gb_proxy_patch.c Sponsored-by: On-Waves ehf
2014-08-21move libctrl from openbsc to libosmoctrl (libosmocore.git)Harald Welte1-3/+2
2014-08-04gprs: Create a gprs_utils file and move to be shared code in thereHolger Hans Peter Freyther1-1/+1
We intend to move some of these routines to libosmocore but to avoid a feature symbol clash we are prefixing these routines with gprs_. Done with Jacob
2014-07-22gprs: Implement BSSGP MCC/MNC patchingJacob Erlbeck1-1/+2
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
2014-06-04gprs: Separate LLC parsing from LLC state handlingJacob Erlbeck1-1/+1
Currently LLC parsing is part of gprs_llc.c which needs large parts of the SGSN code parsing to fulfill its link dependencies. This patch moves the functions that just do plain parsing, dumping, and FCS computation to a different file to avoid these dependencies if LLC stateful processing is not needed. It also exposes struct gprs_llc_hdr_parsed and enum gprs_llc_cmd publically. Sponsored-by: On-Waves ehf
2014-03-23sgsn/ctrl: Add ctrl interface, implement listing subscribersHolger Hans Peter Freyther1-3/+6
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-06-12Makefile.am: Use AM_CPPFLAGSAlexander Huemer1-1/+1
Since automake 1.13 INCLUDES is depricates and causes a warning
2012-06-17use new external libosmogb (part of libosmocore.git)0.12.0Harald Welte1-6/+5
This removes the libgb (GPRS NS/BSSGP) code from the openbsc.git repository and uses the new version from libosmocore.git instead.
2012-01-15abis: gsm_data_shared.h includes libosmo-abis header, add abis to cflagsHolger Hans Peter Freyther1-2/+3
gsm_data_shared.h includes e1_input.h of libosmo-abis, add the LIBOSMOABIS_CFLAGS to Makefile.am, remove AM_LDFLAGS at the same time as we only build .a archives.
2011-10-16misc: Linking fixes for Ubuntu 11.10 CompilerHolger Hans Peter Freyther1-3/+5
Ubuntu 11.10 has changed some linker/compiler flags. Some fixes for this can be seen here[1]. In general the to be linked libs need to be moved into the LDADD section of parameters. This is with the old BFD linker (not gold). This is likely to end in some ping-pong with other versions of the linker. [1] https://bugs.launchpad.net/ubuntu/+source/nis/+bug/771034 Errors: /usr/bin/ld.bfd.real: bsc_hack.o: undefined reference to symbol 'osmo_init_ignore_signals' /usr/bin/ld.bfd.real: note: 'osmo_init_ignore_signals' is defined in DSO /home/ich/install/openbsc/lib/libosmocore.so so try adding it to the linker command line /home/ich/install/openbsc/lib/libosmocore.so: could not read symbols: Invalid operation ... ../../src/libbsc/libbsc.a(rest_octets.o):/home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:381: more undefined references to `bitvec_set_bit' follow ../../src/libbsc/libbsc.a(rest_octets.o): In function `rest_octets_si13': /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:382: undefined reference to `bitvec_set_uint' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:383: undefined reference to `bitvec_set_uint' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:385: undefined reference to `bitvec_set_bit' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:402: undefined reference to `bitvec_set_bit' /home/ich/source/gsm/openbsc/openbsc/src/libbsc/rest_octets.c:403: undefined reference to `bitvec_set_uint'
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-2/+2
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-04prefix sub-directories containing libraries with 'lib'Harald Welte1-2/+5
... and make sure tests work again after restructuring
2011-03-03Move 'Gb' protocol stack into its own src/gb subdirectoryHarald Welte1-9/+4
2011-03-03re-structure the OpenBSC directory layoutHarald Welte1-6/+4
The new structure divides the code into a number of libraries for the BSC core functionality, MSC core functionality, Abis transport, TRAU and other bits. This doesn't introduce any functional code change but simply moves around files and alters Makefile.am accordingly. Next step would be to disentangle a lot of the inter-library dependencies and make the individual bits of code more independent.
2011-02-19Install programs into $(prefix)/bin, not /sbinHarald Welte1-2/+2
At least in many configurations, there is no need to run any of our programs as root. Thus, we shouldn't install them in sbin.
2010-11-15misc: Introduce a --enable-coverage mode to build with gprof coverageHolger Hans Peter Freyther1-2/+2
This adds a test coverage build. One can use gcov and lcov on the resulting data afterwards to see which code paths were executed and which were not.
2010-08-24Add gprs_sndcp.h to noinst_HEADERSHarald Welte1-0/+1
2010-07-01[SGSN] Add VTY interface for SNDCPHarald Welte1-1/+1
2010-06-01[GPRS] hand SNDCP N-PDUs to the GTP to the GGSNHarald Welte1-1/+1
This so far only works for UNIT-DATA and only if the N-PDU is not fragmented at the SNDCP layer.
2010-05-25Migrate VTY code to libosmovtyHarald Welte1-2/+2
2010-05-23gprs: Disable strict aliasing as we are breaking the rules right nowHolger Hans Peter Freyther1-1/+1
2010-05-19[GPRS] Add Frame Relay in GRE encapsulation for NSHarald Welte1-8/+9
2010-05-18[GPRS] LLC: Add VTY interface for LLCHarald Welte1-1/+2
2010-05-18[GPRS] Make sure libsgsn.a is only built when libgtp is availableHarald Welte1-1/+1