aboutsummaryrefslogtreecommitdiffstats
path: root/utils/osmo-sim-test.c
AgeCommit message (Collapse)AuthorFilesLines
2021-12-14treewide: remove FSF addressOliver Smith1-4/+0
Remove the paragraph about writing to the Free Software Foundation's mailing address. The FSF has changed addresses in the past, and may do so again. In 2021 this is not useful, let's rather have a bit less boilerplate at the start of source files. Change-Id: I5050285e75cf120407a1d883e99b3c4bcae8ffd7
2020-05-05sim: When decoding SW, take application specific SW into accountHarald Welte1-2/+2
So far we only looked at SW definitions of the card profile. However, if we have a currently selected application, we also must check that application for SW definitions. This breaks ABI and API all over the place, but as there are no known users beyond osmo-sim-test, this is acceptable. Change-Id: I3a1d60898529c173f73587e34c155660ba5f5fb1
2020-03-22osmo-sim-test: Avoid double-closeHarald Welte1-4/+1
Change-Id: Ibd67a5461085a77dd9e804a4f1266d67ee91a04a Closes: CID#208960
2020-03-21osmo-sim-test: Also [attempt to] dump DF.GSM on USIM cardsHarald Welte1-2/+2
an USIM application can very well exist on a UICC without supporting classic DF.GSM access. However, most commonly, both are found on cards. Change-Id: I6180a3f81a7d3006e8ece4302c2433db2588bfaa
2020-03-21sim: re-structure how we support cards + applicationsHarald Welte1-51/+98
Before this change, a card application (USIM, ISIM, ...) didn't exist as a separate concept from a card profile. This meant, we had a manual combination of UICC card profile with USIM application, and another one of UICC card profile and ISIM application. But what if there's a combined USIM+ISIM? In reality, applications exist as separate objects, on top of an ETSI UICC. Lets therefore register all known applications to the osim library core, and add code to osmo-sim-test which dynamically detects all applications present on a given card (by reading EF.DIR). Change-Id: Ic4b4ac433a9976842b30a017fb0fc347d87201cd
2020-03-21osmo-sim-test: Optionally dump card files to host filesystemHarald Welte1-11/+97
Using the new '--output-dir' command line argument, the user can instruct osmo-sim-test to dump the file content to a local directory. osmo-sim-test will create one sub-directory per DF, and create a text file for each EF. The contents of the text files are a hexdump of the contents. Transparent EF are dumped as one line of hex, while linear fixed EF are dumped as one record per line, i.e. the number of lines corresponds to the number of records. Change-Id: I35176f4a13c3537eaa8de550e231818a22b4c07c
2020-03-21osmo-sim-test: don't print SW in successful case of dump_file()Harald Welte1-1/+0
Change-Id: Ie5a58a89052400d76a8607a2e0063917385beb25
2020-03-21osmo-sim-test: Use stderr for error messagesHarald Welte1-7/+7
Change-Id: I8f36b07b8601af2b0d54d95c3c6374d6c54bafd1
2020-03-04osmo-sim-test: check tlv_parsed struct tp before accessPhilipp Maier1-4/+8
The variable struct tlv_parsed tp in dump_file() conditionally initalized by tlv_parse() but later it is accessed under a different condition without a check that makes sure that tp is only accessed when tlv_parse() was called beforehand. Lets introduce a check that makes sure tp can not be accessed when it is uninitalized. Change-Id: I6b0209b966127a4195e6f4bcb43d49387c7646ce Fixes: CID#208435
2020-02-15osmo-sim-test: Fall-back to classic SIMHarald Welte1-20/+103
If selection of ADF_USIM fails, let's fall-back to reading/dumping a classic TS 11.11 (51.011) SIM card. Change-Id: I5a986fc65de76c24c5af52ce7e8c699cf302fda9
2020-02-15osmo-sim-test: Recurse through subdirectoriesHarald Welte1-13/+39
Don't just iterate over all files in the current working directory (cwd), but also recurse through all sub-directories. Change-Id: I737b01d9a845e37d8be9d4709ef0de04e749daec
2019-12-09sim: allow opening reader# > 0Eric Wild1-1/+49
Change-Id: I4b1abc8d8aae4bd9a32f927269d7ebfef902d7c5
2018-07-27cosmetic: osmo-sim-test.c: use memcpy instead of strncpyNeels Hofmeyr1-1/+2
gcc 8.1.0 complains that the terminating \0 is not copied by strncpy, while this code intends to do exactly that. Use memcpy instead. Change-Id: I8d66fa22502c04d11ae153b9856d7e54f3492dd6
2017-06-22osmo-sim-test.c: Remove unused functionsPau Espin Pedrol1-37/+0
Change-Id: I3060cfee8ece86c4c89a65f93c9f5424df0c410b
2017-05-17utils/osmo-sim-test.c: strip unused variablesVadim Yanitskiy1-5/+1
Change-Id: Id577d9df5a814ad5aa00e1d04c4790d75d17ad7e
2017-02-08fix various compiler warnings (on FreeBSD-11.0)Harald Welte1-3/+3
FreeBSD 11.0 uses clang version 3.8.0 which spits various warnings during libosmocore compilation. Let's clean this up a bit. Change-Id: Ic14572e6970bd0b8916604fabf807f1608fa07e5
2016-11-26osmo-sim-test.c: Fix rmsg checkHarald Welte1-1/+1
we wanted to check for !rmsg, but used to check for !msg, missing error returns from read_record_nr(). Change-Id: I79b6a94b1aa947c8329317b0626865c3cd4159c1 Fixes: Coverity CID 57672
2016-03-11rename osim_file_find_* to osim_file_desc_find_*Harald Welte1-1/+1
they return an osim_file_desc, and not an osim_file, so fix the naming
2015-11-07osmo-sim-test: add missing includeAlexander Huemer1-0/+1
2014-10-27osmo-sim-test: Fix read_binary() return checkHarald Welte1-1/+1
if we expect rmsg to be set, we should check for it...
2014-10-26sim: Prepare infrastructure for protocols != T=0 and other driversHarald Welte1-2/+2
2014-10-26sim: Make osmo-sim-test compile againHarald Welte1-1/+1
2014-10-26sim: add decoding of status wordsHarald Welte1-0/+3
2014-10-26sim: strip the SW from the returned data, as SW is passed in msgb->cbHarald Welte1-3/+3
2014-10-26sim: add copyright notices and merge file_codec.c into core.cHarald Welte1-6/+23
2014-10-26sim: osmo-sim-test: Also dump binary filesHarald Welte1-10/+39
2014-10-26initial checkin of 'libosmosim'Harald Welte1-0/+370