Commit Graph

235 Commits

Author SHA1 Message Date
Harald Welte f51166790e cosmetic: remove some FIXME that actually are already fixed
Change-Id: I62ac36aae6da374b83e27b71ff52b0c3d52bf346
2019-04-02 20:56:16 +02:00
Harald Welte 4fa407a750 bankd: Use configured bank_id/nr_slots in ConnectBankReq
The code used hard-coded defaults instead of the user-configured values.

Change-Id: I86383aed4d5bb08ac1540eaecc0975a18e560baa
2019-04-01 21:07:02 +02:00
Harald Welte 2513d81625 bankd: move bank_id / num_slots from g_bankd to remsim_srv_conn
... and make num_slots configurable via command line argument

Change-Id: Id8f15085b397186d3470f4d943979857b6811a52
2019-04-01 21:07:02 +02:00
Harald Welte 0138bb40b4 manuals: remove <<>> from RSPRO to fix rendering
Change-Id: Ifa97f314fa5eb36785b179aeba8062948deb5ef1
2019-04-01 11:04:04 +02:00
Harald Welte 35f2b201bb manuals: Add description from README.md to manual
Change-Id: I38db6f5723b8f02920abd70bf10c2a134060d183
2019-04-01 11:01:51 +02:00
Harald Welte 56298ca4e0 server: Fix dependency on libosmo-rspro.la
Change-Id: Ia05a5f0f01999b32fd10d76694e95df9b1ccb207
2019-04-01 10:57:08 +02:00
Harald Welte 3c4d006146 Add initial osmo-remsim usermanual
Change-Id: I1d9231b24b1481afcbb5758662b7d99bd59e7fdb
2019-04-01 10:52:17 +02:00
Harald Welte b6b7bd1dff remsim_client: Reduce simtrace timeout from 100s to 1s
As we're waiting in blocking mode (and hence block things like the
IPA keepalive FSM), we cannot afford to block for 100s in one shot.

Change-Id: If316018d89367d54167fde021649fb3cfe218744
2019-04-01 10:52:17 +02:00
Harald Welte 05dc39e391 rspro_util.c: Disable printf debugging
Change-Id: I69b6f62fc3e4fc8aabb230ab9a69891894e3f7a3
2019-04-01 10:52:17 +02:00
Harald Welte 5bae20b64d bankd: Add command-line arguments for IP/port/etc configuration
Change-Id: Ifafdd7ea005347f39d9adad2b50cf81609b41cba
2019-04-01 10:48:17 +02:00
Harald Welte b54a51eec2 improve talloc memory leak debugging
* switch to talloc_report_full() on SIGUSR1
* include asn1-internal allocations in talloc report

Change-Id: I14fff863449971024002e0d5465fb7a964d67095
2019-03-31 15:57:59 +02:00
Harald Welte 3f09f634e0 fixup warnings
Change-Id: I73262ebf04640782859c5fa43b9172de3c788e3d
2019-03-31 15:51:13 +02:00
Harald Welte 13d0f8c3d3 disable slotmap debugging
Change-Id: I7f672adc1fef6616d7244f73214273236b42a0ca
2019-03-31 15:13:29 +02:00
Harald Welte 35ded29788 rspro_server: Fix Warnings about unused variables
Change-Id: Id8615062772c09d7396254fa5d1f42dd029e8a22
2019-03-31 15:13:09 +02:00
Harald Welte 4c37f66048 rspro_server: Configure client's bankd parameters (nr/slot/ip/port)
Change-Id: I821d0b2ba4390b9772097ddd3d610ba2c9393399
2019-03-31 15:00:00 +02:00
Harald Welte a8b86ceff2 client/server: log failed attempts to transmit/encode RSPRO
Change-Id: Iac56ddf7417fdee637660db34a7f0e6bdb9c4ab5
2019-03-31 14:59:20 +02:00
Harald Welte 24a3e32db7 bankd: Don't fail on RsproPDUchoice_PR_setAtrRes
Change-Id: Iaacd1d46a646de469ea5bb2c75323472cfe3635d
2019-03-31 13:08:30 +02:00
Harald Welte 736e831cc3 bankd: log incoming RSPRO
Change-Id: I276fffd6f7bad3fc38a0151ba935fd39ac1245d9
2019-03-31 13:08:16 +02:00
Harald Welte 10f7a76373 rspro_server: Treat keepalive timeouts (by closing connection)
Change-Id: I42f2d5c6c7a4387cb61cb8b46d01b7dfb86b927b
2019-03-31 12:38:47 +02:00
Harald Welte 1c691b173a rspro_server: Give proper name to IPA_KEEPALIVE FSMs
Once we know the Client / Bankd Identity, update not only the connection
FSM with that identity, but also the IPA keepalive FSM.  This will
provide proper context when logging.

Change-Id: I92bf47b6b0072c8062449ed3bb51ddf0b7aaf9a1
2019-03-31 10:58:11 +02:00
Harald Welte 19dee08862 rspro_server: Print human-readable message type instead of numeric value
Change-Id: I0c26e1be1ae9ddee663fee582a44d4449e6beea7
2019-03-31 10:53:45 +02:00
Harald Welte f30ff9eeb0 rspro_server: Add client_conn_by_slot() API function
Change-Id: Ie2eefad358b45541cf90d0cacac2d03953f0c367
2019-03-30 19:17:37 +01:00
Harald Welte 697141223e rspro_util: We don't deal with network byte order, asn1c takes care of that
Change-Id: I12523c748298a23c23bba81acc97e5f6d346dbef
2019-03-30 19:16:30 +01:00
Harald Welte 0a64da6e2d rspro_server: Split CONNECTED into CLIENT and BANKD specific states
Change-Id: I5b2205393de62b16439b49fb7a39ee640f750cc5
2019-03-30 17:38:04 +01:00
Harald Welte 1b07f7fbc9 rspro_server: Add more comments
Change-Id: Iafe8674161a117b70e97ffeac4e988ba9a45db93
2019-03-30 17:33:07 +01:00
Harald Welte ba781c065f rspro_server: Fix log output in client_conn_send()
Change-Id: I4b089011dcdc261837d1d9a7dc184568027f6df0
2019-03-30 17:32:53 +01:00
Harald Welte eae30c3e3f rspro_util: Fix typo in rspro_gen_ConfigClientIdReq()
Change-Id: I40bdbc714b975bace89b196f24d02a476c060d10
2019-03-30 17:32:37 +01:00
Harald Welte 72cde1052b client: Allow specification of clientId / slotNr as command line arguments
Change-Id: I0a96a49af8bceb5f14db056f11619a12ef42f4f1
2019-03-30 12:01:51 +01:00
Harald Welte fd5a62ab47 client: Sort getopt-long like getopt like help message
Change-Id: I150bf89c3b0652c860a90d728dc7a6e1d23f2961
2019-03-30 12:01:51 +01:00
Harald Welte 2f89b965a6 client: transmit RSPRO via bankd_conn_fsm
This fixes a crash where the modem/phone would sent APDUs at a time
when there is no connection to the bankd yet.  If we transmit the
RSPRO PDUs via the FSM, this cannot happen.

Change-Id: I965666ae4622c403e63c060deaa4d80e9249d155
2019-03-30 12:01:51 +01:00
Harald Welte 2eee4507ca bankd/client: Fix memory leak if rspro_enc_msg() fails
Change-Id: Ib72b077d82939be0627b9dd7c905fb2a33db9ca5
2019-03-30 08:50:35 +01:00
Harald Welte 972a1e892e client: Fix initialization order: logging first
otherwise some sub-system might want to log without the logging being
initialized first.

Change-Id: I179d937bd4eae0e82d9ebdb07748a0663a244756
2019-03-30 08:34:30 +01:00
Harald Welte 7817b20e04 client: Default server port is 9998, not 9999
Change-Id: Ifd19cb2aaff7e53c0d142cea07ca75c064a7ee12
2019-03-30 08:34:14 +01:00
Harald Welte 2ea20b92fd client: Use stack instead of heap when possible
Change-Id: If555d7cf2d7ef2152dd9d78e7ed1ba65e83ed59b
2019-03-30 08:33:49 +01:00
Harald Welte 9bfc6b3ba6 remsim_client: Use bankd_conn_send_rspro() where applicable
Change-Id: I63b3b07379ae66208a03d3a27500e7973ddfb9e7
2019-03-28 20:29:53 +01:00
Harald Welte f14dc04627 cosmetic: fix typo in comment
Change-Id: I3a1be1b8adc74a2f2ef51b766ef4e17ac88a7ce9
2019-03-28 20:29:36 +01:00
Harald Welte fa365593cb remsim_client: Process SetAtrReq() and set ATR in SIMtrace2 firmware
Change-Id: Iddcb13c8f4e98aac4e44bda32b8ad4cdeead50e7
2019-03-28 20:28:57 +01:00
Harald Welte 297d72ef47 bankd: Move all PC/SC specific code to bankd_pcsc
Change-Id: I435b42982b54d74447c435dcefa26d1e317d15e0
2019-03-28 18:58:21 +01:00
Harald Welte 1f699b405a bankd_main: Obtain ATR of card via PC/SC API
Change-Id: Ie73806e2190e604cab96b3f632b4bbfffb7d0112
2019-03-28 18:58:21 +01:00
Harald Welte e57334ed9d rspro_client_fsm: Use osmocom logging API instead of direct printf
Change-Id: Iaf004e1839340371052d4e36baed4faee9f3744e
2019-03-27 22:58:10 +01:00
Harald Welte 8d8d4f162b remsim_client: Use osmocom logging instead of printf
Change-Id: I7e695335b4c4652a534cefa073dcea9f424d6744
2019-03-27 22:53:47 +01:00
Harald Welte 94ba99b5d0 bankd_main: Add more logging in error situations
Change-Id: I48e01d4517da1ac2983946d84c7a95ea9797e5b8
2019-03-27 22:42:11 +01:00
Harald Welte eb971b5209 bankd_main: don't use fprintf if we can use osmocom logging API
Change-Id: I0b6ed933ffb3e3d689b344bd215357577e3120aa
2019-03-27 22:41:45 +01:00
Harald Welte e1d3289ed9 bankd: Verify bankd/client slot in tpduModemToCard rx handler
Change-Id: I58fce1392f418b36f5f61f224e03a9dbbe34f01f
2019-03-27 20:47:42 +01:00
Harald Welte 4e7a285427 rspro_client_fsm: Disconnect if Connect{Client,Bank}Res != ok
Change-Id: Id199f9c4cb4c86fd0dba8939334ac69878f4a3f5
2019-03-17 21:01:50 +01:00
Harald Welte ce638d8fd7 client, bankd: Add SIGUSR1 handling for talloc context debugging
Change-Id: I9153f4cc89b3911a4f9ea4f02fe1b108420d2eed
2019-03-17 09:36:04 +01:00
Harald Welte 75f560338c bankd_client_fsm: Fix ESTABLISH signal handling
Change-Id: Ib7a09ff6cad0b0eba17908cba733df35b7ee767d
2019-03-17 09:35:41 +01:00
Harald Welte 7a950888f5 client: Don't ntohs() integer values from asn1 decoder
The ASN1 decoder takes care of endianness for us.

Change-Id: I9c3127b4fb195db5e81702e043e4fe595474b561
2019-03-17 09:35:16 +01:00
Harald Welte 9cf013a343 remsim_client: Store and use BankSlot received in ConfigClientBankReq
Change-Id: I6858b68590789d38741e541b9028d2b9b142e0c0
2019-03-11 22:19:19 +01:00
Harald Welte cf8b89ad84 Move client/bank slot conversion functions to rspro_util.c
Change-Id: I18f1d1cb1fb712b01a0991419743db52338688af
2019-03-11 22:16:22 +01:00