Commit Graph

1563 Commits

Author SHA1 Message Date
Harald Welte e15ac060e7 fix libosmocore build for NuttX target
this fixes some compilation issues with libosmocore under NuttX,
particularly as some #defines are missing or some header files are
slightly different.
2014-12-04 14:15:36 +01:00
Harald Welte 20144f7bc5 vty/vector.c: Use string.h, not memory.h 2014-11-14 15:22:37 +01:00
Harald Welte 78a870ed0f remove references to u_long type, use 'unsigned long' instead
.. Nuttx doesn't know u_long
2014-11-14 15:22:22 +01:00
Harald Welte 7b74dda31b remove references to u_char type, use 'unsigned char' instead
... u_char not being defined on Nuttx.
2014-11-14 15:22:14 +01:00
Harald Welte b592ab71a7 strrb.c: Use string.h, not strings.h
Not all systems have strings.h
2014-11-14 15:21:18 +01:00
Harald Welte 9e166e8e08 select.c: Add missing #include lines for string.h and sys/select.h
This is needed on Nuttx.
2014-11-14 15:21:01 +01:00
Holger Hans Peter Freyther 18bcc8ab62 pcsc: Allow to disable the PCSC dependency
* PCSC is enabled by default
* --enable-pcsc is enabling it
* --disable-pcscis disabling it
* Fix the makefile of the utilities to not build pcsc and
use the right header files/libraries.
2014-11-14 15:06:09 +01:00
Ciaby 8497b0a786 Fix debian packaging
- Added debian/libosmosim0.install
- Added libosmosim definition in debian/control
2014-11-10 20:28:33 +01:00
Jacob Erlbeck 0673b70f7d bssgp: Fix VTY command 'show bssgp nsei N'
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-11-10 08:40:59 +01:00
Harald Welte d6ec984c51 osmo-sim-test: Fix read_binary() return check
if we expect rmsg to be set, we should check for it...
2014-10-27 20:46:40 +01:00
Harald Welte 881b5169e5 sim: reader_pcsc:Remove dead code
PCSC_ERROR() macro is already performing error checking.

Found by coverity.
2014-10-27 20:46:40 +01:00
Holger Hans Peter Freyther b0310dd376 pcsc: Fix the include path
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-27 12:00:37 +01:00
Harald Welte 33e940b862 sttrb / loggingrb: Use GPLv2+ as license, not AGPLv3+
according to Holger, using AGPLv3+ at the time was a mistake and the
license should always have indicated GPLv2+.
2014-10-26 20:52:25 +01:00
Harald Welte fd5ad17c5c Change copyright notice of ipa.c to GPLv2+
... which it should have been all along.
2014-10-26 20:50:31 +01:00
Harald Welte 388fb03406 Change license of gsm0411_smc/smr to GPLv2+
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-26 20:50:31 +01:00
Harald Welte 7fa89c2e88 Change license of libosmogb from AGPLv3+ to GPLv2+
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-26 20:50:19 +01:00
Harald Welte a97ebc9599 Merge branch 'laforge/sim'
This contains some work from 2012 about creating a general library about
the data structure of data contained on SIM cards.  This 'libosmosim' is
supposed to be used by (among others)
* tools to review/modify/personalize SIM card filesystem data
* virtual SIM card implementation
2014-10-26 20:14:04 +01:00
Harald Welte 534163bade remove doxygen_sqlite3.db during 'make clean' 2014-10-26 20:09:17 +01:00
Harald Welte 6729a9776a make sure to register DF.TELECOM and DF.GSM for SIM, USIM + TSIM
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-26 19:50:55 +01:00
Harald Welte db2b52ee84 sim: More talloc return NULL checking 2014-10-26 19:50:55 +01:00
Harald Welte 67354b1b4e sim: add missing const to reader_ops member of reader_handle 2014-10-26 19:50:55 +01:00
Harald Welte 55790aa09a sim: Prepare infrastructure for protocols != T=0 and other drivers 2014-10-26 19:50:51 +01:00
Harald Welte 586d710e05 sim: More comments in sim.h 2014-10-26 19:09:24 +01:00
Harald Welte aad7e0664b sim: Make TETRA SIM (TSIM) support compile 2014-10-26 19:09:24 +01:00
Harald Welte 30115dbd72 sim: Only one default_decode() function for all card types 2014-10-26 19:09:24 +01:00
Harald Welte 171c5b1ec7 sim: Add 3GPP TS 31.103 ISIM definitions 2014-10-26 19:09:24 +01:00
Harald Welte bb5f3c7e04 sim: Update to latest SIM/USIM specs and include size information 2014-10-26 19:09:23 +01:00
Harald Welte 3fc3f068b3 sim: Make osmo-sim-test compile again 2014-10-26 19:09:23 +01:00
Harald Welte 0d24644f52 sim: reader_pcsc.c: Avoid compiler warnings by using pcsc-lite LONG 2014-10-26 19:09:23 +01:00
Harald Welte e8dd2bd4b5 sim: mark osim_msgb_cb as __may_alias__ to avoid gcc warnings 2014-10-26 19:09:23 +01:00
Harald Welte 2656e65bed sim: Add sfi to EF_*() macros 2014-10-26 19:09:23 +01:00
Harald Welte 1e0dfdad69 sim: Add minimal/recommended size of file / record 2014-10-26 19:09:23 +01:00
Harald Welte d83d29610a sim: further updates/fixes 2014-10-26 19:09:23 +01:00
Harald Welte 7674960ffa sim: add decoding of status words 2014-10-26 19:09:23 +01:00
Kevin Redon 43eabeeeaa sim: replaced function/structure comments with doxygen comments
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-26 19:09:23 +01:00
Kevin Redon dede831fcd sim: add comment/explaination for structure osim_msgb_cb 2014-10-26 19:09:23 +01:00
Kevin Redon 1707306da5 sim: add comment/explaination for structure osim_apdu_cmd_hdr 2014-10-26 19:09:23 +01:00
Kevin Redon 5985760a61 sim: added utils/osmo-sim-test to .gitignore 2014-10-26 19:09:23 +01:00
Kevin Redon e07967f689 sim: renamed case to the one defined in ISO7816-3
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-26 19:09:23 +01:00
Kevin Redon 6956ee1ba1 sim: add comment/explaination for structure osim_apdu_case 2014-10-26 19:09:22 +01:00
Kevin Redon 0f0ee32d81 sim: comment/explain signature of osim_new_apdumsg 2014-10-26 19:09:22 +01:00
Harald Welte a5c9255baa sim: strip the SW from the returned data, as SW is passed in msgb->cb 2014-10-26 19:09:22 +01:00
Harald Welte 495fe2682c sim: Use autotools for libpcsc-lite linkage 2014-10-26 19:09:22 +01:00
Harald Welte ad41863b8d sim: add copyright notices and merge file_codec.c into core.c 2014-10-26 19:09:22 +01:00
Harald Welte a0ba4d9438 sim: osmo-sim-test: Also dump binary files 2014-10-26 19:09:22 +01:00
Harald Welte d54c2ee8c5 initial checkin of 'libosmosim' 2014-10-26 19:09:22 +01:00
Harald Welte cac3cd6fcd msgb: make msgb_get() finally work as expected 2014-10-26 19:08:43 +01:00
Holger Hans Peter Freyther 42645d7d78 misc: Ignore the new test file as well 2014-10-25 12:20:24 +02:00
Holger Hans Peter Freyther e0a1a8021f bssgp: Include sys/socket.h for AF_INET on FreeBSD 2014-10-25 12:19:56 +02:00
Jacob Erlbeck b43baf20c5 gprs: Don't discard SUSPEND/RESUME in bssgp_rcvmsg
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-23 18:53:02 +02:00