aboutsummaryrefslogtreecommitdiffstats
path: root/src/sim
AgeCommit message (Collapse)AuthorFilesLines
2018-05-03Bump version: 0.10.2.284-bc47-dirty → 0.11.00.11.0Pau Espin Pedrol1-1/+1
Remark: For libosmogb and libosmogsm, LIBVERSION was already bumped in c4fce1425e19d604c199c895e227dc2519110456. Change-Id: Ib4fa53a9bb9954ae48d0a610ba9a81dd8e8b4ef6
2018-04-08fix spellingThorsten Alteholz2-2/+2
fix for some spelling issues found by lintian Signed-off-by: Thorsten Alteholz <osmocom@alteholz.de> Change-Id: I69976ecae6939d9ff51bfe4ce7374890c6563b82
2018-02-28implement support for 3-digit MNC with leading zerosNeels Hofmeyr1-0/+1
Enable representing three-digit MNC with leading zeros. The MNCs 23 and 023 are actually different; so far we treated both as 23. Re-encode an incoming BCD or string of 023 as it were, i.e. not dropping the leading zero as 23. Break ABI compatibility by changing the size and ordering of structs gprs_ra_id, osmo_plmn_id, osmo_cell_global_id, ... by adding an mnc_3_digits flag. Change ordering in gprs_ra_id because the canonical oder is {Mobile Country Code, Mobile Network Code}, so have the mcc member first. ABI compatibility cannot be maintained for struct gprs_ra_id, since it is a direct member of structs bssgp_bvc_ctx and bssgp_paging_info, and even just adding a flag to the end would cause ABI changes of those structs. Similarly, osmo_plmn_id is a direct member of osmo_location_area_id, and so forth. Add new API to set and read this additional flag to preserve leading zeros: - osmo_plmn_to_bcd(), osmo_plmn_from_bcd() after gsm48_mcc_mnc_to_bcd() and gsm48_mcc_mnc_from_bcd(). - gsm48_decode_lai2(), gsm48_generate_lai2() after gsm48_decode_lai(), gsm48_generate_lai(). - gsm0808_create_layer3_2() after gsm0808_create_layer3() and gsm0808_create_layer3_aoip(). - various osmo_*_name() functions in gsm23003.h (osmo_rai_name() still in gsm48.h close to struct gprs_ra_id definition). The amount and duplication of these may seem a bit overboard, but IMO they do make sense in this way. Though most code will soon see patches unifying the data structures used, in some cases (vty, ctrl) they are required singled out. Without these functions, the formatting ("%0*u", mnc_3_digits ? 3 : 2, mnc) would be duplicated all over our diverse repositories. In various log output, include the leading MNC zeros. Mark one TODO in card_fs_sim.c, I am not sure how to communicate a leading zero to/from a SIM card FS. The focus here is on the core network / BSS. To indicate ABI incompatibility, bump libosmogsm and libosmogb LIBVERSIONs; adjust debian files accordingly. Implementation choices: - The default behavior upon zero-initialization will be the mnc_3_digits flag set to false, which yields exactly the previous behavior. - I decided against packing the mnc with the mnc_3_digits field into a sub-struct because it would immediately break all builds of dependent projects: it would require immediate merging of numerous patches in other repositories, and it would make compiling older code against a newer libosmocore unneccessarily hard. Change-Id: Id2240f7f518494c9df6c8bda52c0d5092f90f221
2017-11-13Fix/Update copyright notices; Add SPDX annotationHarald Welte8-0/+16
Let's fix some erroneous/accidential references to wrong license, update copyright information where applicable and introduce a SPDX-License-Identifier to all files. Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
2017-10-30Move additional libraries to appropriate placeMax1-1/+1
According to https://www.gnu.org/software/automake/manual/automake.html#Libtool-Flags the libraries supposed to be added to *_LDADD or *_LIBADD while *_LDFLAGS should contain additional libtool linking flags. Previously we used both. Let's unify this and move all the libraries into proper automake variable. While at it - also add libosmocore.la for tests to LDADD since all the tests link against it anyway. Change-Id: Ia657a66db75df831421af5df1175a992da5ba80f
2017-10-27Tag/Release version 0.10.00.10.0Harald Welte1-1/+1
It's been way too long since the last release. Almost one year and 468 commits. A brief summary of the changes below: * Doxygen for libosmo{coding,gb} * pseudotalloc for embedded builds, jenkins for arm-none-gnueabi * --disable-doxygen, --disable-ctrl, --disable-simd * update debian packaging * gsm0503 coding routines * osmo_hton[sl] * statistics.h -> counter.h * QCDIAG in gsmtap * llist_{first,last}_entry() * llist_count() * LOGPSRC() macro * msgb_pull_to_l2() * msgb_printf() * prbs * osmo_sock_init2() * osmo_sock_mcast_{name,loop_set,ttl_set,all_set,subscribe,ip}() * OSMO_STRINGIFY() * OSMO_VALUE_STRING() * OSMO_BYTES_FOR_BITS() * osmo_talloc_asprintf() * osmo_sub_auth_type_name() * osmo_sub_auth_data support for IND/SQN_MS * osmo_fsm ctrl interface * ctrl_handle_alloc2() * ctrl_interface_setup_dynip2() * OSMO_CTRL_PORT_HLR * bssgp_tx_bvc_ptp_reset() * gprs_ns_inst connect/remote_{ip,port} * osmo_gprs_{ul,dl}_block_size_{bits,bytes}() * osmo_gprs_{dl,ul}_cs_by_block_bytes() * gprs_ns_pdu_strings[] * more BSSGP cause values * abis_nm_admin_name() * AoIP support in gsm0808 * gsm_fn_as_gsmtime_str() * osmo_dump_gsmtime() * gsup charging support * ipa_ccm_make_id_resp() * ipa_ccm_make_id_resp_from_req() * struct gsm48_gprs_susp_req * gsm_04_14.h * rsl measurement preprocessing related IEs * abis_nm_event_cause_names[] * abis_nm_sw_desc and friends * more SYSINFO_TYPE_ values * osmo_earfcn_bit_size_ext() * t16lv_put() * msgb_t16lv_put() * tlvp_val16be() * tlvp_val32be() * osmo_tlvp_copy() * osmo_tlvp_merge() * many additional VTY nodes * cmd_node.name member * bitvec_set_u64() * bitvec_rl_curbit * ctrl_lookup_register() * osmo_fsm_find_by_name() * osmo_fsm_inst_find_by_name() * osmo_fsm_inst_find_by_id() Change-Id: Ieb5db2e910a90db780ea058b3280f2facbd68d76
2017-06-23doxygen: unify use of \file across the boardNeels Hofmeyr11-10/+23
Considering the various styles and implications found in the sources, edit scores of files to follow the same API doc guidelines around the doxygen grouping and the \file tag. Many files now show a short description in the generated API doc that was so far only available as C comment. The guidelines and reasoning behind it is documented at https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation In some instances, remove file comments and add to the corresponding group instead, to be shared among several files (e.g. bitvec). Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
2017-06-23doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr1-1/+1
Especially for short descriptions, it is annoying to have to type \brief for every single API doc. Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes the first sentence of an API doc as the brief description. Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
2017-06-18card_fs_uicc.c: Fix unused compilation warningPau Espin Pedrol1-1/+1
This array of bytes is not yet used but is referring to some specs. They may be used in the future, so leave it there but mark it explicitly as unused. Change-Id: I0a61d17f9989ecddafbc68d4b9446853e4c15159
2017-06-13sim/core.c: drop useless double assignmentVadim Yanitskiy1-1/+1
Change-Id: I3bfcabd80b57aeb7f110b306350802e6e82c847a
2017-01-24sim: Link to libtalloc as symbols of it are used hereHolger Hans Peter Freyther1-0/+1
A DSO should link to the libraries that it is using. Linking to libtalloc will resolve these warnings: Change-Id: I4c8d5e80e194b9d9b4fa2424c4a22377ecee9c7a dpkg-shlibdeps: warning: symbol _talloc_zero used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol _talloc_free used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol talloc_strndup used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol talloc_strdup used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol _talloc_memdup used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries
2016-12-21Catch-up with git version tagsMax1-1/+2
* update debian/changelog * update TODO-RELEASE * add comments to Makefile.am and TODO-RELEASE to simplify the process in future * add link to libtool docs to Makefile.am to simplify LIBVERSION maintenance Related: OS#1861 Change-Id: I22c257e357f597519120232d742d6a61289db021
2016-05-25misc: Some spelling errors correctedRuben Undheim1-1/+1
Change-Id: Ibfc239b84879556624ca6020ae6a63d102640c94 Reviewed-on: https://gerrit.osmocom.org/114 Tested-by: Jenkins Builder Reviewed-by: Neels Hofmeyr <nhofmeyr@sysmocom.de>
2016-03-19sim: make osim_reader_ops publicHarald Welte1-7/+0
2016-03-17sim: add class_tables / card profilesHarald Welte2-2/+316
The tables permit code to determine the APDU class of an APDU based on it APDU/TPDU header (CLA/INS/P1/P2/P3).
2016-03-11rename osim_file_find_* to osim_file_desc_find_*Harald Welte1-3/+5
they return an osim_file_desc, and not an osim_file, so fix the naming
2016-03-11sim: Add osim_file_find_{fid,sfid}() functionsHarald Welte1-0/+25
We don't always want to look-up by name, but the latter is the only implemented 'find' function so far. Let's change that.
2015-12-05remove our internal copy of talloc, use system libtallocHarald Welte1-2/+2
Shipping our own private copy of talloc was a good idea in 2008, when it was not readily available on most target platforms. Today, the situation is quite different, as it is a standard library on major Linux distributions.
2015-05-17build: Fix out-of-tree buildsAndreas Rottmann1-1/+1
Fixes: In file included from ../../../include/osmocom/core/msgb.h:25:0, from ../../../include/osmocom/sim/sim.h:4, from ../../../src/sim/reader_pcsc.c:30: ../../../include/osmocom/core/bits.h:6:35: fatal error: osmocom/core/bit16gen.h: No such file or directory #include <osmocom/core/bit16gen.h> In file included from ../../include/osmocom/core/msgb.h:25:0, from ../../utils/osmo-sim-test.c:26: ../../include/osmocom/core/bits.h:6:35: fatal error: osmocom/core/bit16gen.h: No such file or directory #include <osmocom/core/bit16gen.h>
2015-04-11sim: Use extern for these structs to generate a linkageHolger Hans Peter Freyther1-1/+1
Fixes: duplicate symbol _ts102221_fcp_vals in: .libs/core.o .libs/card_fs_usim.o duplicate symbol _pcsc_reader_ops in: .libs/reader.o .libs/card_fs_usim.o
2015-04-10msgb: Check the return value of msgb_alloc (Coverity)Jacob Erlbeck1-0/+3
In some places, the return value of msgb_alloc/msgb_alloc_headroom is not checked before it is dereferenced. This commit adds NULL checks to return with -ENOMEM from the calling functions if the alloc function has failed. Fixes: Coverity CID 1249692, 1293376 Sponsored-by: On-Waves ehf
2015-01-18sim: Link to libosmocore and libosmogsmHolger Hans Peter Freyther1-2/+5
The big LIBOSMOCORE_CFLAGS and LIBOSMOCORE_LIBS macros are not defined when building linosmocore. Use the .la files directly Fixes: dpkg-shlibdeps: warning: symbol osmo_hexdump used by debian/libosmosim0/usr/lib/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol gsm48_parse_ra used by debian/libosmosim0/usr/lib/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol _talloc_zero used by debian/libosmosim0/usr/lib/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol _talloc_memdup used by debian/libosmosim0/usr/lib/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol talloc_strndup used by debian/libosmosim0/usr/lib/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol msgb_length used by debian/libosmosim0/usr/lib/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol msgb_alloc used by debian/libosmosim0/usr/lib/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol msgb_free used by debian/libosmosim0/usr/lib/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol talloc_strdup used by debian/libosmosim0/usr/lib/libosmosim.so.0.0.0 found in none of the libraries dpkg-shlibdeps: warning: symbol talloc_free used by debian/libosmosim0/usr/lib/libosmosim.so.0.0.0 found in none of the libraries
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-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