aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/sgsn.h
AgeCommit message (Collapse)AuthorFilesLines
2016-12-13rename oap.h to oap_client.hNeels Hofmeyr1-1/+1
Related: OS#1592 Change-Id: I05bd65ff81b0f70f68217b2e0a9466e160bdbdec
2016-12-13oap: rename public API from oap_ to oap_client_Neels Hofmeyr1-1/+1
Mainly to differentiate the OAP messaging API (osmo_oap_ in libosmocore) from the OAP client. This is in preparation for moving the oap client to libcommon, which is in turn preparation for libvlr. Add the osmo_ prefix, as all public Osmocom API should have. We also have OAP messages code in libosmocore, so clarify by naming this osmo_oap_client, and by also renaming the oap_test to oap_client_test. This reshuffling will allow an easy move of OAP to libosmocore if we should want to do that. A number of patches will follow up on this. Related: OS#1592 Change-Id: Id447d2bebc026a375567654adafa5f82439ea7e1
2016-12-13gprs_gsup_client*: remove the gprs_ prefixNeels Hofmeyr1-1/+1
Make sure everything is named gsup_client_ / GSUP_CLIENT_. Rename static gsup_client_send() to client_send() to avoid clash with public gprs_gsup_client_send() being renamed to gsup_client_send(). This is in preparation for moving gsup to libcommon, which is in turn preparation for libvlr. libvlr and osmo-sgsn will use the same GSUP client code. A number of patches will follow up on this, also for the the OAP client. Related: OS#1592 Change-Id: I57433973b1c4f6cc1e12e7b1c96b5f719f418b51
2016-09-24SNDCP: add V.42bis data compression functionalityPhilipp1-0/+9
- Add compression control for V.42bis Add code to handle compression (gprs_sndcp_dcomp.c/h) - Add Adjustments in SNDCP - Add VTY commands Change-Id: I6d36cbdf2f5c5f83ca9ba57c70452f02b8582e7e
2016-09-24SNDCP: add RFC1144 header compression functionalityPhilipp1-0/+7
- Add module to handle compression entities - Add module to control header compression - Introduce VTY commands for heade compression configuration - Add changes in sndcp and llc to integrate header compression Change-Id: Ia00260dc09978844c2865957b4d43000b78b5e43
2016-09-02IuPS: Change GTP-U endpoint to SGSN in PMM_IDLE and page UE when data arrivesDaniel Willmann1-0/+1
Change-Id: I47b73a40cbdda6b7c31fb2767f74f9f93d84056b
2016-08-27sgsn: add statistics counter for LLC packetsAlexander Couzens1-0/+4
new counters are: llc.dl_bytes llc.ul_bytes llc.dl_packets llc.ul_packets The ip payload bytes are waiting for payload compression because those data are known then. Change-Id: I068376d35e84283cb98523cd3097a12c55cdb709
2016-07-25sgsn: add statistics counter for GPRS and PDP packetsAlexander Couzens1-0/+26
Changing the test to allow still allocated block from the rate counters. Change-Id: Ie30e4c3084ee3a138d6b39bb5000234ac814e65f
2016-07-04SGSN: add vty config for choosing GPRS encryptionMax1-1/+2
Change-Id: I07d65205be1c75d59744426629ed04cf3cd99f79 Related: OS#1582
2015-11-02gsup/oap: add OAP to GSUP client.Neels Hofmeyr1-0/+3
Trigger an OAP registration upon IPA connect. Feed incoming OAP messages to oap_handle() and send replies returned by it. Add oap_config to sgsn_config (todo: vty). Sponsored-by: On-Waves ehf [hfreyther: Fix coding style]
2015-08-18sgsn: make all SGSN timers configurable via the VTYHarald Welte1-0/+15
2015-05-25sgsn: Allow to specify the DNS servers that should be usedHolger Hans Peter Freyther1-0/+1
If no server is specified the default list will be used. This allows to separate the servers for the local network and GRX from each other.
2015-05-25sgsn: Allow to resolve the IPv4 address of a GGSN through DNSHolger Hans Peter Freyther1-0/+3
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-25sgsn: Integrate c-ares with the osmocom event loopHolger Hans Peter Freyther1-0/+14
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-0/+14
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 the "permanent" subscriber cacheHolger Hans Peter Freyther1-4/+0
The subscriber cache would help in case: * GPRS DETACH, GPRS ATTACH. In that case we might still have some cached authentication tuples we avoid another sendAuthenticationInfo request. * After a detach the cache expiry would make sure to eventually send a purgeMS to the HLR (which might be ignored). At the same time to make the cache work we will need to make sure to start and stop timers. In case we don't start we might accumulate subscribers. I am afraid that the above two benefits do not outweight the complexity of this implementation.
2015-01-26sgsn: Remove inactive LLME/MM after inactivity timeoutJacob Erlbeck1-0/+2
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: Add expiry timeout for subscriber entriesJacob Erlbeck1-0/+4
Set the expiry delay after the subscriber has been deleted (e.g. by freeing the MM context). If cancelled, the subscriber will be deleted immediately and no timeout will be set. If the expiry time is set to SGSN_TIMEOUT_NEVER, no timer will be started and the subscriber entry will be kept until it is cancelled. The following VTY command is added to the sgsn node: - subscriber-expiry-time <0-999999> set expiry time in seconds - no subscriber-expiry-time set to SGSN_TIMEOUT_NEVER The default is an expiry time of 0 seconds, which means that the subscriber entries are wiped out immediately after an MM context is destroyed. Note that unused MM contexts are not expired yet. Therefore the subscriber will only be expired after a successful MM detach. Sponsored-by: On-Waves ehf
2015-01-18sgsn: Add global require_update_location flagJacob Erlbeck1-0/+1
This flag is used to determine, whether the Update Location procedure shall be invoked. This is currently only set, when the 'remote' authorization policy is set. When the flag is set, sgsn_auth_update will not never be called directly by sgsn_auth_request, if an Attach Request procedure is pending, even if the remote connection fails for some reason. Sponsored-by: On-Waves ehf
2015-01-18sgsn: Replace subscr.authenticate by global require_authentication flagJacob Erlbeck1-0/+2
Currently the flag 'authenticate' is managed per subscriber. This patch replaces that flag by a global cfg.require_authentication flag that enables/disables the use of the Auth & Ciph procedure for every subscriber. The flag is set by the VTY, if and only if the authorization policy is 'remote'. The VTY command - update-subscriber imsi IMSI insert authenticate <0-1> is removed. Sponsored-by: On-Waves ehf
2015-01-18sgsn: Integrate the GSUP client into the SGSNJacob Erlbeck1-0/+7
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: Integrate subscriber handling into the SGSNJacob Erlbeck1-1/+2
This commit adds a new authorization policy 'remote' and uses the subscriber cache for authorization when this policy is being used. Note that there is no remote backend implemented yet. After the IMSI/IMEI have been acquired, a request would be sent to the remote peer. The attach/auth-ciph procedure continues when authorization info has been received from the peer. This means, that gprs_subscr_update() must be called then to tell the GMM layer that it can proceed. A later commit will add VTY commands to do this manually. Sponsored-by: On-Waves ehf
2014-11-14sgsn: Add 'acl-only' authentication policyJacob Erlbeck1-1/+7
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
2013-07-21sgsn: Add "auth-policy" VTY command to enable/disable ACLHarald Welte1-0/+1
2013-07-21sgsn: add a minimalistic ACLHarald Welte1-0/+2
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-06-16split libgb into a separate library for outside useHarald Welte1-1/+1
This also removes the dependency to osmo_sock() inside libcommon and replaces it with osmo_sock_* from libosmocore
2011-10-14gprs: Fix various compiler warningsHolger Hans Peter Freyther1-0/+2
2011-05-06src: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso1-3/+3
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-1/+1
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-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-1/+1
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>
2010-07-01[SGSN] Fix segfault when passing re-assembled SN-PDU to GMMHarald Welte1-2/+2
sgsn_rx_sndcp_ud_ind() can no longer make the assumption that msgb_bcid() is valid, as this is only true for an un-fragmented SN-PDU. So instead, we now store the RAID in the SNDCP Entity and pass it as an explicit argument to sgsn_rx_sndcp_ud_ind().
2010-06-03[GPRS] SNDCP: Implement fragmentation of N-PDUs to SN-PDUs in downlinkHarald Welte1-0/+2
Using the code of this commit, it was possible to provision GPRS services and access a website from a G1 phone (Qualcomm MSM7k baseband chipset) using a nanoBTS, Osmo-SGSN and OpenGGSN. There is still no fragment re-assembly in the uplink path yet, despite the (untested) code present in the gprs_sndcp.c file
2010-06-03[GPRS] implement GTP->SNDCP->LLC downlink user-data pathHarald Welte1-0/+2
This only works for packets that are small enough to not need fragmentation at the SNDCP layer (dns queries, ntp and the like). It requires libgtp built from OpenGGSN dc3744fda045f9fca83de6881176987335a309a8 or later. Plain 0.90 will NOT work. Using this version, I could see bi-directional traffic from various phones going all the way through BTS, OsmoSGSN, OpenGGSN and being routed to and from the real internet. Time to celebrate...
2010-06-01[GPRS] hand SNDCP N-PDUs to the GTP to the GGSNHarald Welte1-0/+8
This so far only works for UNIT-DATA and only if the N-PDU is not fragmented at the SNDCP layer.
2010-05-19[GPRS] NS: VTY: Move all local ip/port bind values into 'ns' nodeHarald Welte1-2/+0
This removes the requirement for gb_proxy and sgsn to have duplicate vty parsing code
2010-05-18[GPRS] SGSN: properly delete a PDP context after receiving PDP CTX DEACT REQHarald Welte1-1/+3
2010-05-18[GPRS] Properly connect GPRS SM with LIBGTP for PDP context activationHarald Welte1-0/+6
* store LLC SAPI as part of PDP ctx * store NSEI + BVCI as part of MM ctx * export gsm48_tx_gsm_act_pdp_acc() and call it from sgsn_libgtp.c * create and use gsm48_tx_gsm_act_pdp_rej for error cases * print SAPI as part of VTY show pdp
2010-05-17[SGSN] remove the mmctx->sgsn pointerHarald Welte1-0/+1
We never want to support multiple sgsn's within one process, so there is no point in passing them around all the time.
2010-05-17[GPRS] Initial untested support for libgtpHarald Welte1-0/+16
libgtp of the OpenGGSN project will allow us to speak the GTPv0/v1 protocol of the interface between SGSN and GGSN. This commit includes code for the main libgtp integration (file descriptor, select loop, timer) as well as code to encode/send a CREATE PDP CONTEXT request.
2010-05-04[gprs] Build the SGSN stand-alone and not as part of bsc_hackHarald Welte1-0/+30
Instead of continuing to add more and more functionality to the bsc_hack binary, we should have the new SGSN code run as a separate executable. After this commit we now build a 'osmo_sgsn' executable, using its own osmo_sgsn.cfg config file. However, the SGSN is not yet functional, mainly due to the fact that the BSSGP and GMM code are written with the assumption that there is a msgb->trx->bts and the according 'sturct gsm_bts' data model around - which clearly is no longer the case outside of bsc_hack.