Harald Welte
a4e0a2396b
move DMAIN definition to new debug.h
...
This way both client.h and bankd.h don't conflict with each other
Change-Id: I68ffd64e1f32b90206f98c7f3ea707d7b2e11e61
2018-10-15 00:20:42 +00:00
Harald Welte
b0cef1d776
configure.ac: Explicitly check for -lcsv and csv.h
...
unfortuantely libcsv doesn't ship with a pkg-config file, so we have
to resort on those manual checks
Change-Id: I52260a4e3f7a12039f054a55a211045085f1c5ff
2018-10-15 00:19:30 +00:00
Harald Welte
8bb639ac3b
libusb_util.c: Avoid gcc warning about strncpy()
...
What we're doing is actually legal: We copy the full size of the
destination array, and then overwrite the last byte with NUL. However,
gcc isn't smart enough to see that:
libusb_util.c:162:5: warning: ‘strncpy’ specified bound 20 equals destination size [-Wstringop-truncation]
strncpy(out[out_idx].path, path, sizeof(out[out_idx].path));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Let's copy one byte less to make it happy.
Change-Id: Iae13f7a4cf89230f308eb0183d993d7c31024907
2018-10-15 01:52:20 +02:00
Harald Welte
61df6c309c
contrib/jenkins.sh: Fix project name printed during build
...
Change-Id: I3189ff095559e630fcf1d995fb36b330bceda526
2018-10-15 01:52:20 +02:00
Harald Welte
72f702c243
contrib/jenkins.sh: Ensure PKG_CONFIG_PATH is set before build
...
... otherwise, there will be trouble finding the 'stow' libraries we
build.
Change-Id: I3ab09c8d35b7835ffbbd1e4bfdd0570a756b43df
2018-10-15 01:52:20 +02:00
Harald Welte
80a83cc166
contrib/jenkins.sh: Harmonize with other projects
...
In other projects, only libosmocore is called with '""
--disable-doxygen' arguments, no other libraries.
Change-Id: I85ee61fec9c10b283734105eaecd1b8422fbb8a7
2018-10-15 01:48:48 +02:00
Harald Welte
c7b5c7aaf2
Add contrib/jenkins.sh for build verification
...
Change-Id: I09a020966c3903673626e6d6bbe097d4ba69774b
2018-10-14 20:49:25 +02:00
Martin Hauke
058457542a
Fix compiler warning: no-return-in-nonvoid-function main.c
...
RPM post-build-checks found some issue and marks these as error:
[ 31s] I: Program returns random data in a function
[ 31s] E: osmo-remsim no-return-in-nonvoid-function main.c:49
Change-Id: I18705488d0ef8a445004e6a7e81dd2483afb9bdb
2018-10-13 20:43:57 +02:00
Kevin Redon
3428e415b3
add sim switch and modem reset for OWHW
...
Change-Id: I9d395c2c7e10a0e7e5f7c84bc7d951431bfc68ba
2018-10-12 14:58:20 +02:00
Kevin Redon
fbca97a87e
add client id and slot number as command line argument
...
Change-Id: I832ea69b303bf52561e4245991bb25af62558ea0
2018-10-12 14:58:20 +02:00
Kevin Redon
3ec265bca1
move main print output closer to main (minor)
...
Change-Id: Ib866f8b8b879a3a23bdc31eafe8735c7420bb353
2018-10-12 14:58:20 +02:00
Kevin Redon
19c97ed22a
set client name (minor)
...
Change-Id: Iebb486ede19bd44e49a975c1b5e6c5a26378ba09
2018-10-12 14:58:20 +02:00
Kevin Redon
efbf249e08
remove duplicate print output (minor)
...
the URB content is also shown in process_usb_msg
Change-Id: I3985449daf71d6a450b3339e9feaa26528b86535
2018-10-12 14:58:20 +02:00
Kevin Redon
21e31de068
indicate more clearly SIMtrace traffic in output log
...
Change-Id: Ie18c8aaace7c7f7cfef9119a01140b8f500de213
2018-10-12 14:58:20 +02:00
Kevin Redon
193a8c19c3
remove unused remote UDP variable
...
Change-Id: I3256ead1d6c4b8d64468fe1635b10a47e37e4df8
2018-10-12 14:58:20 +02:00
Kevin Redon
39eb9dce71
add command line arguments to set bankd host and port
...
these replace the remove UDP port not used in this SIMtrace2 host
application.
Change-Id: I16fef1a13da23e5395985320b59647d29680fc9d
2018-10-12 14:58:20 +02:00
Kevin Redon
79126566f5
minor: disable ASN1 debug
...
this removes a large number of compiler warnings
Change-Id: I2cf88280ad1d6407c91ff18f476eb3ca145c3aa5
2018-10-12 14:58:20 +02:00
Kevin Redon
9b69a3f4b9
send response APDU from bankd (card) to SIMtrace (modem)
...
Change-Id: I50270dbba8eb93133d1a48ba62a7f8a7dfc555d0
2018-10-12 14:58:20 +02:00
Kevin Redon
bc08db5cee
send correct APDU to bankd
...
Change-Id: I777f739793dfeec85823519f9d3d43b22090f209
2018-10-12 14:58:20 +02:00
Kevin Redon
9e34247231
add missing library flags to compile simtrace2-remsim_client.c
...
Change-Id: If01aca606ff920941db739baa41de52a1a08c434
2018-10-12 14:58:20 +02:00
Kevin Redon
e0b837cfcb
adapt remsim-client to use simtrace2 cardem
...
simtrace2-remsim_client.c combines simtrace2-remsim and
remsim_client.c.
it compiles but is short of sending the modem APDU from simtrace2
cardem to bankd.
2018-10-12 14:58:20 +02:00
Kevin Redon
70a8486cb3
add simtrace2 host libraries
...
these are copies of files from simtrace2
2018-10-12 14:57:29 +02:00
Harald Welte
d6f051edc8
fix 'make distcheck' by adding missing client.h to noinst_HEADERS
...
Change-Id: Ib2c450c902529f7327a187c612380a1f2b3ca534
2018-10-12 14:57:08 +02:00
Kevin Redon
38cd4f7f63
move ClientSlot_t from fsm to client
...
this allows to reuse the client slot information in as client for
other rspro_utils methods
2018-10-12 14:09:05 +02:00
Kevin Redon
ff5db6e81e
ensure the local asn1c library is used
...
Change-Id: Icc91c8f422965fec9c247aa9006e993c15f86d93
2018-10-12 14:09:04 +02:00
Kevin Redon
6811e4f65c
ensure RsproPDU_t client and bank are not NULL
...
Change-Id: I3ba6cf466e3002911842edff0884b38fee09ba26
2018-10-12 14:07:15 +02:00
Harald Welte
5a3613a57f
bankd: Ignore IPA CCM and don't terminate if we receive it
...
The IPA multiplex has a built-in sub-protocol called "CCM", which
we are not implemnting so far. We still don't implement it, but
at least we don't terminate the TCP connection anymore if any such
unsupported IPA CCM is received.
Change-Id: Ibf7bf2aa973c3f7503479c35adfdc135d7165618
2018-10-12 14:04:19 +02:00
Harald Welte
f1d7016397
RSPRO.asn: Clarify use of optional ClientSlot in ConnectClientReq
...
Change-Id: Icca78725d64627b40d589bdeacc33390e5522ae2
2018-10-12 14:04:19 +02:00
Harald Welte
43ab79f8c2
remove libasn1c dependency and use asn1c without libasn1c
...
TODO: re-introduce talloc integration for asn1 runtime
Change-Id: I2140509c5359727f304470249be2a726b9a8deb1
2018-10-03 23:34:21 +02:00
Harald Welte
8f893ff208
bankd: Add FIXME to the main thread
...
Change-Id: I5d36afdf2417023d09e7029244e2e649f08266b2
2018-10-03 23:23:44 +02:00
Harald Welte
511c51313d
remove rspro_client.c which is not used anyway.
...
This was more or less a copy+paste of other related code we already
have for other IPA based protocols in libosmo*.
Change-Id: I21ade32fec3c1badfcf6bc9cd4ec845efed138e0
2018-10-03 23:21:02 +02:00
Harald Welte
7b41d9c863
bankd: Remove second \n after PC/SC OK statements
...
Change-Id: I80cc727d0260599d8114b1050f04cf17977944f2
2018-10-03 23:15:10 +02:00
Harald Welte
150d6d6788
bankd: more timeout/retry handling, including resolving slotmap
...
Change-Id: I6541456700d2615a391d8163424b3e39561a29c0
2018-10-03 23:13:21 +02:00
Harald Welte
694df83f35
bankd: Implement re-opening/connecting to card/reader
...
Change-Id: I5f4b12a76f82776cfd929bd56a4a1f0d4217be65
2018-10-03 22:47:52 +02:00
Harald Welte
31c9eca75a
bankd_main: Set the pthread name for easier debugging
...
Change-Id: Ib1bf2b392ee161ba0d2d01bec927c2c0293a8f3b
2018-10-03 21:03:34 +02:00
Harald Welte
f94b9ee67b
bankd: Initialize logging early.
...
In case libosmocore wants to log e.g. a failure to bind the port,
we must have initialized logging before that point.
Change-Id: I86e805a66da6269748e6bd3164e5c0342e014f77
2018-09-25 15:04:21 +02:00
Harald Welte
703d686c20
fix double-free of msgb
...
Change-Id: I3eefed9ed2954a378327569949c944847e78dcf3
2018-09-24 17:46:05 +02:00
Harald Welte
9ebbacc801
correctly use asn1c API: PDU pointers must be NULL when calling decoder
...
If the pointers are != NULL, asn1c assumes their memory has already been
allocated, rather than dynamically allocating storage for it.
Change-Id: I6b78be75d8927f032ca4051520a3053b3fbf9e13
2018-09-24 17:46:05 +02:00
Harald Welte
7b94dc231d
add ffasn1c example for RSPRO
...
This can help us for debugging using an independent decoder compared to asn1c
Change-Id: I15293014cddb75190e7f848fff6d07a3401461ff
2018-09-24 17:46:05 +02:00
Harald Welte
10f6c21736
rspro_util: Add rspro_gen_ConnectClientRes() function
...
Change-Id: I32fe32b24c87e20c57a2e448c2b183050b84adaf
2018-09-24 14:56:04 +02:00
Harald Welte
7585286466
rspro_util: More error messages
...
Change-Id: I5006bbf88df17a6e76954ca51af7f443dcc526f9
2018-09-24 14:55:34 +02:00
Harald Welte
e1176cf510
bankd: Print error messages in more error cases during IPA read
...
Change-Id: I5b9720688ebda8ad37109c0cd32e8804678f46ac
2018-09-24 14:54:58 +02:00
Harald Welte
f1dd16291e
bankd: Add app_comp_id to use repro_util helpers
...
Change-Id: Ie981388220ed0612e427d076f8741fec73e6026b
2018-09-24 14:54:23 +02:00
Harald Welte
417b961ef2
client: Generate CLIENT_CONN_RES event to FSM on RSPR rx of ClientConnRes
...
Change-Id: Ic17c72f4fc8bbd43187552892186cdb3e50e2efe
2018-09-24 14:53:41 +02:00
Harald Welte
3e689874ff
bankd: Handle errors during PC/SC open/connect
...
Change-Id: I304b4f73433d6027409aeef7faf04d4e8acd2e54
2018-09-24 14:52:56 +02:00
Harald Welte
fd47119111
use msb->l2h as pointer to the RSPRO part inside msgb
...
Change-Id: Ib8d02047ec64178f9ee235534dab3d9bf4ead296
2018-09-24 14:52:17 +02:00
Harald Welte
293478cf76
RSPRO: don't use "default 1" for protocol version
...
I suspect there may be some bugs in the handling of DEFAULT values
in asn1c (or maybe I don't understand them fully?), so let's simply
make the version field a normal ASN.1 field.
Change-Id: I08077e715a901dfa5193855be7040d550f6fc2e8
2018-09-24 14:49:41 +02:00
Harald Welte
52cc7db6ed
remsim_client_fsm: Handle re-connect timeout and initial connection failure
...
Change-Id: Id229459a8fa484276c0ca0413356c16930269c36
2018-09-24 11:51:51 +02:00
Harald Welte
e72e57383d
bankd: Add hack for hard-coded slotmap
...
As we don't yet have any software that would dynamically install
slot mappings into bankd, let's add a bunch of them as compiled-in
defaults during bankd_init(). This must of course be removed once
the dynamic slot mapping configuration from remsim-server exists.
Change-Id: I04d6ed68c9b9bfb559a41c705884cce4394ea926
2018-09-23 19:31:55 +02:00
Harald Welte
796a7492c7
bankd: Add code to handle TPDUs in rx and tx direction
...
Change-Id: Icb35ad28939392e75a17b732834d9d570452164f
2018-09-23 19:31:28 +02:00