aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2014-11-10bssgp: Fix VTY command 'show bssgp nsei N'Jacob Erlbeck1-1/+1
Currently this command segfaults (at least when ASAN is enabled), because when getting the NSEI the index to argv is wrong and out of bounds. This patch fixes the offset. Sponsored-by: On-Waves ehf
2014-10-27sim: reader_pcsc:Remove dead codeHarald Welte1-2/+0
PCSC_ERROR() macro is already performing error checking. Found by coverity.
2014-10-27pcsc: Fix the include pathHolger Hans Peter Freyther1-2/+2
The pkg-config file already points into the PCSC directory. This is needed for FreeBSD where /usr/local/include is not in the default compiler search path. On Debian $ pkg-config --cflags libpcsclite -pthread -I/usr/include/PCSC On FreeBSD $ pkg-config --cflags libpcsclite -I/usr/local/include/PCSC -D_THREAD_SAFE -pthread
2014-10-26sttrb / loggingrb: Use GPLv2+ as license, not AGPLv3+Harald Welte2-2/+2
according to Holger, using AGPLv3+ at the time was a mistake and the license should always have indicated GPLv2+.
2014-10-26Change copyright notice of ipa.c to GPLv2+Harald Welte1-4/+4
... which it should have been all along.
2014-10-26Change license of gsm0411_smc/smr to GPLv2+Harald Welte3-12/+12
libosmocore.{so,a} should always have been GPLv2+. However, when migrating some code from OpenBSC or OsmocomBB, we sometimes introduced it with a wrong license header.
2014-10-26Change license of libosmogb from AGPLv3+ to GPLv2+Harald Welte8-32/+32
The copyright holders Harald Welte, Holger Freyther, Andreas Eversberg and sysmocom - s.f.m.c. GmbH (represented by Holger and Harald) agree that the license of libosmogb should be GPLv2+ and not AGPLv3+. The reason the source files stated AGPLv3+ is due to the history, as they were moved from OpenBSC to libosmocore at the time we needed to use them from osmo-pcu. It was an oversight back then to not re-license them accordingly.
2014-10-26make sure to register DF.TELECOM and DF.GSM for SIM, USIM + TSIMHarald Welte4-42/+56
before we only did it partially, and by exporting data from sim, rather than the new osim_int_cprof_add_{gsm,telecom}() functions.
2014-10-26sim: More talloc return NULL checkingHarald Welte1-0/+8
2014-10-26sim: Prepare infrastructure for protocols != T=0 and other driversHarald Welte3-16/+40
2014-10-26sim: Make TETRA SIM (TSIM) support compileHarald Welte2-183/+134
2014-10-26sim: Only one default_decode() function for all card typesHarald Welte5-37/+15
2014-10-26sim: Add 3GPP TS 31.103 ISIM definitionsHarald Welte2-1/+117
2014-10-26sim: Update to latest SIM/USIM specs and include size informationHarald Welte3-175/+335
2014-10-26sim: reader_pcsc.c: Avoid compiler warnings by using pcsc-lite LONGHarald Welte1-3/+3
2014-10-26sim: mark osim_msgb_cb as __may_alias__ to avoid gcc warningsHarald Welte1-0/+315
2014-10-26sim: further updates/fixesHarald Welte4-3/+16
2014-10-26sim: add decoding of status wordsHarald Welte1-2/+54
2014-10-26sim: replaced function/structure comments with doxygen commentsKevin Redon1-8/+12
affected files: sim.h, sim/core.c affected funtions/strucutres: osim_new_apdumsg, osim_apdu_case,osim_apdu_cmd_hdr, osim_msgb_cb
2014-10-26sim: renamed case to the one defined in ISO7816-3Kevin Redon2-18/+18
APDU_CASE_2 becomes APDU_CASE_2S APDU_CASE_2_EXT becmoes APDU_CASE_2E APDU_CASE_3 becomes APDU_CASE_3S APDU_CASE_3_EXT becmoes APDU_CASE_3E APDU_CASE_4 becomes APDU_CASE_4S APDU_CASE_4_EXT becmoes APDU_CASE_4E
2014-10-26sim: comment/explain signature of osim_new_apdumsgKevin Redon1-2/+9
2014-10-26sim: strip the SW from the returned data, as SW is passed in msgb->cbHarald Welte1-2/+5
2014-10-26sim: Use autotools for libpcsc-lite linkageHarald Welte1-4/+8
2014-10-26sim: add copyright notices and merge file_codec.c into core.cHarald Welte8-39/+163
2014-10-26initial checkin of 'libosmosim'Harald Welte10-0/+1487
2014-10-23gprs: Don't discard SUSPEND/RESUME in bssgp_rcvmsgJacob Erlbeck1-18/+26
Currently sending SUSPEND/RESUME messages to this function (like it is done in the osmo-sgsn) results in STATUS messages complaining about an unknown BVCI. The reason is, that these messages rely on a TLLI/RAI pair to identify the context and do not contain an explicit BVCI. This patch modifies bssgp_rcvmsg() to only complain about and unknown BVCI if one is given but a matching context is not found (except for RESET messages). The ctx argument is removed from the functions handling SUSPEND and RESUME since it will always be NULL then. Sponsored-by: On-Waves ehf
2014-10-13Move common socket routine into separate functionMax1-29/+24
Signed-off-by: Max <max.suraev@fairwaves.co>
2014-10-10bssgp: Free msgb in case of error when calling into gprs_ns_sendmsgHolger Hans Peter Freyther1-0/+3
In the OsmoSGSN we have a crash with a DEAD/BLOCKED GPRS-NS and segmented SN-UNITDATA. For the caller it is not easy to know if the passed msg buffer has been freed or not. The most easy solution is to always take the ownership and either pass it on or free it in case of an error. Adjust indirect and direct callers of gprs_ns_sendmsg. I found the following call-chains with an external msgb parameter. gprs_ns_sendmsg <- _bssgp_tx_dl_ud <- bssgp_fc_in <- bssgp_tx_dl_ud Update the test to allocate a real msgb because for the test with '1000' we will msgb_free it right away. Sponsored-by: On-Waves ehf
2014-10-09gprs-ns: Fix reset state handlingJacob Erlbeck1-5/+4
Currently the NS-VC's state is updated from within gprs_ns_tx_reset, which can lead to an inconsistent state when the RESET_ACK is lost. In this state, the NSE_S_RESET bit is set but the Tns-reset timer is not started. This patch moves the state update into gprs_nsvc_reset. This way, the state flags are consistent with the timer. Addresses: SGSN -> BSS NS_ALIVE BSS -> SGSN NS_ALIVE_ACK BSS -> SGSN BVC_RESET SGSN -> BSS NS_STATUS, Cause: NS-VC blocked, NS VCI: 0x65 and there is no BSS->SGSN NS_ALIVE Ticket: OW#1213 Sponsored-by: On-Waves ehf
2014-10-09gprs-ns: Let gprs_nsvc_reset return a valueJacob Erlbeck1-2/+7
Currently gprs_nsvc_reset does not return any value. This patch changes the function to return an integer, where a value less than zero indicates an error. The value is taken from the gprs_ns_tx_reset function. In case of failure, an error message is logged. Sponsored-by: On-Waves ehf
2014-10-03build: remove unused all_includes and use AM_CPPFLAGSJan Engelhardt5-5/+10
Preprocessor flags are best placed in AM_CPPFLAGS. Remove use of the unused all_includes variable, which is never set.
2014-09-25misc: Look into the build directory for generated filesHolger Hans Peter Freyther4-4/+4
the bits/crc files are not inside the sourcedirectory but will end in the build directory. Go and look there as well. This somehow doesn't fail with make distcheck but when building for Yocto Dizzy.
2014-09-23gprs: Set bssgph field in bssgp_msgb_alloc()Jacob Erlbeck1-1/+3
Currently the bssgph field is not set when using the bssgp_tx_* functions. This hinders unit testing of generated messages. This patch initializes the bssgph field directly after allocation a new bssgp msgb in bssgp_msgb_alloc() so that it is set by default. Sponsored-by: On-Waves ehf
2014-09-23gprs: Fix bssgp_rcvmsg to handle signalling msgs with BVCI IEJacob Erlbeck1-3/+7
Currently BSSGP messages with an NS BVCI of 0 (signalling) are discarded if they aren't RESET messages. Thus valid signalling messages (e.g. BLOCK) are not handled properly, because the BVCI IE is ignored if it present. Instead a STATUS message referring to BVCI 0 (instead of the BVCI used in the BLOCK message) is returned. This patch changes the implementation to use the BVCI contained in the BVCI IE if that is present in a signalling message. It fixes BSSGP BLOCK/UNBLOCK for the osmo-sgsn. Note that signalling messages without an BVCI IE (e.g. SUSPEND/RESUME) are still rejected. Ticket: OW#1205 Sponsored-by: On-Waves ehf
2014-09-23gprs: Fix and check BVCI in BSSGP STATUS messagesJacob Erlbeck2-1/+15
Currently the BVCI is not set in all invocations to bssgp_tx_status() when the cause is UNKNOWN_BVCI. This patch adds the argument where it is missing. It also adds a check for compliance (GSM 08.18, 10.4.14.1) to bssgp_tx_status() to emit errors when the following requirement is not fulfilled: The BVCI must be included if (and only if) the cause is either "BVCI blocked" or "BVCI unknown". Sponsored-by: On-Waves ehf
2014-09-11Fix copyright header in gan.cHarald Welte1-4/+4
When I wrote the gan.c, I used the wrong copyright/license header (AGPLv3+ intead of GPLv2+). This was a mistake and is fixed hereby.
2014-09-11add missing copyright statements to source code filesHarald Welte5-0/+106
Some source code files didn't have the usual copyright and licence statement at their top. I'm adding them baesed on information in the commitlog.
2014-08-25logging: Add ability to save/print current log filtersHarald Welte2-3/+7
This enables the persistent configuration of let's say 'log filter imsi 012345678' for a given log file in the config file.
2014-08-24libctrl: Add support for 'deferred control commands'Harald Welte2-0/+77
Sometimes a control interface command cannot be processed and responded immediately, but we need to process it asynchronously. In order to support this, we introduce the 'ctrl_cmd_def', which represents such a deferred command. It is created by the service implementing the command using ctrl_cmd_def_make(), and a response is later sent using ctrl_cmd_def_send(). ctrl_cmd_def_is_zombie() must be called to handle the case where the control connection has disconnected/died between receiving the command and sending the response.
2014-08-21ctrl: Attempt fix the build on FreeBSD and add include fileHolger Hans Peter Freyther1-0/+1
IPPROTO_TCP is defined in netinet/in.h. Include it and hope the build is fixed for FreeBSD.
2014-08-21prepare for 0.7.0 release0.7.0Harald Welte3-3/+3
2014-08-21rename controlif_setup() to ctrl_interface_setup()Harald Welte1-2/+2
which means that all control interface related functions now have the common ctrl_ prefix.
2014-08-21libctrl: Make two internal helper functions staticHarald Welte1-2/+2
2014-08-21libctrl: Move bulk of control node lookup inti libosmoctrlHarald Welte1-3/+127
The control interface user now only has to register a very short node lookup function callback. This function is optional, and only required if hierarchical command lookup should be supported.
2014-08-21libctrl: remove 'struct gsm_network' referencesHarald Welte1-4/+4
libctrl doesn't need any knowledge about the type of the user-private data that it gets passed upon setup time and includes on callbacks.
2014-08-21libctrl: adopt to recent ipaccess/ipa naming changeHarald Welte1-2/+3
2014-08-21libctrl: autotools build system integrationHarald Welte1-5/+10
Now we actually build the recently-imported libctrl
2014-08-21libctrl: Add DLCTRL as logging context for the control interfaceHarald Welte3-28/+33
... and make libctrl code use it
2014-08-21libctrl: Avoid using external tall_bsc_ctxHarald Welte1-6/+6
Instead of using one flat talloc context (and one that is specific to openbsc), we should attach the objects to whatever parent context they are being used in.
2014-08-21libctrl: remove openbsc headers, convert from make_sock to libosmocoreHarald Welte2-19/+9