Harald Welte
3c4d006146
Add initial osmo-remsim usermanual
...
Change-Id: I1d9231b24b1481afcbb5758662b7d99bd59e7fdb
4 years ago
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
4 years ago
Harald Welte
05dc39e391
rspro_util.c: Disable printf debugging
...
Change-Id: I69b6f62fc3e4fc8aabb230ab9a69891894e3f7a3
4 years ago
Harald Welte
5bae20b64d
bankd: Add command-line arguments for IP/port/etc configuration
...
Change-Id: Ifafdd7ea005347f39d9adad2b50cf81609b41cba
4 years ago
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
4 years ago
Harald Welte
3f09f634e0
fixup warnings
...
Change-Id: I73262ebf04640782859c5fa43b9172de3c788e3d
4 years ago
Harald Welte
13d0f8c3d3
disable slotmap debugging
...
Change-Id: I7f672adc1fef6616d7244f73214273236b42a0ca
4 years ago
Harald Welte
35ded29788
rspro_server: Fix Warnings about unused variables
...
Change-Id: Id8615062772c09d7396254fa5d1f42dd029e8a22
4 years ago
Harald Welte
4c37f66048
rspro_server: Configure client's bankd parameters (nr/slot/ip/port)
...
Change-Id: I821d0b2ba4390b9772097ddd3d610ba2c9393399
4 years ago
Harald Welte
a8b86ceff2
client/server: log failed attempts to transmit/encode RSPRO
...
Change-Id: Iac56ddf7417fdee637660db34a7f0e6bdb9c4ab5
4 years ago
Harald Welte
24a3e32db7
bankd: Don't fail on RsproPDUchoice_PR_setAtrRes
...
Change-Id: Iaacd1d46a646de469ea5bb2c75323472cfe3635d
4 years ago
Harald Welte
736e831cc3
bankd: log incoming RSPRO
...
Change-Id: I276fffd6f7bad3fc38a0151ba935fd39ac1245d9
4 years ago
Harald Welte
10f7a76373
rspro_server: Treat keepalive timeouts (by closing connection)
...
Change-Id: I42f2d5c6c7a4387cb61cb8b46d01b7dfb86b927b
4 years ago
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
4 years ago
Harald Welte
19dee08862
rspro_server: Print human-readable message type instead of numeric value
...
Change-Id: I0c26e1be1ae9ddee663fee582a44d4449e6beea7
4 years ago
Harald Welte
f30ff9eeb0
rspro_server: Add client_conn_by_slot() API function
...
Change-Id: Ie2eefad358b45541cf90d0cacac2d03953f0c367
4 years ago
Harald Welte
697141223e
rspro_util: We don't deal with network byte order, asn1c takes care of that
...
Change-Id: I12523c748298a23c23bba81acc97e5f6d346dbef
4 years ago
Harald Welte
0a64da6e2d
rspro_server: Split CONNECTED into CLIENT and BANKD specific states
...
Change-Id: I5b2205393de62b16439b49fb7a39ee640f750cc5
4 years ago
Harald Welte
1b07f7fbc9
rspro_server: Add more comments
...
Change-Id: Iafe8674161a117b70e97ffeac4e988ba9a45db93
4 years ago
Harald Welte
ba781c065f
rspro_server: Fix log output in client_conn_send()
...
Change-Id: I4b089011dcdc261837d1d9a7dc184568027f6df0
4 years ago
Harald Welte
eae30c3e3f
rspro_util: Fix typo in rspro_gen_ConfigClientIdReq()
...
Change-Id: I40bdbc714b975bace89b196f24d02a476c060d10
4 years ago
Harald Welte
72cde1052b
client: Allow specification of clientId / slotNr as command line arguments
...
Change-Id: I0a96a49af8bceb5f14db056f11619a12ef42f4f1
4 years ago
Harald Welte
fd5a62ab47
client: Sort getopt-long like getopt like help message
...
Change-Id: I150bf89c3b0652c860a90d728dc7a6e1d23f2961
4 years ago
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
4 years ago
Harald Welte
2eee4507ca
bankd/client: Fix memory leak if rspro_enc_msg() fails
...
Change-Id: Ib72b077d82939be0627b9dd7c905fb2a33db9ca5
4 years ago
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
4 years ago
Harald Welte
7817b20e04
client: Default server port is 9998, not 9999
...
Change-Id: Ifd19cb2aaff7e53c0d142cea07ca75c064a7ee12
4 years ago
Harald Welte
2ea20b92fd
client: Use stack instead of heap when possible
...
Change-Id: If555d7cf2d7ef2152dd9d78e7ed1ba65e83ed59b
4 years ago
Harald Welte
9bfc6b3ba6
remsim_client: Use bankd_conn_send_rspro() where applicable
...
Change-Id: I63b3b07379ae66208a03d3a27500e7973ddfb9e7
4 years ago
Harald Welte
f14dc04627
cosmetic: fix typo in comment
...
Change-Id: I3a1be1b8adc74a2f2ef51b766ef4e17ac88a7ce9
4 years ago
Harald Welte
fa365593cb
remsim_client: Process SetAtrReq() and set ATR in SIMtrace2 firmware
...
Change-Id: Iddcb13c8f4e98aac4e44bda32b8ad4cdeead50e7
4 years ago
Harald Welte
297d72ef47
bankd: Move all PC/SC specific code to bankd_pcsc
...
Change-Id: I435b42982b54d74447c435dcefa26d1e317d15e0
4 years ago
Harald Welte
1f699b405a
bankd_main: Obtain ATR of card via PC/SC API
...
Change-Id: Ie73806e2190e604cab96b3f632b4bbfffb7d0112
4 years ago
Harald Welte
e57334ed9d
rspro_client_fsm: Use osmocom logging API instead of direct printf
...
Change-Id: Iaf004e1839340371052d4e36baed4faee9f3744e
4 years ago
Harald Welte
8d8d4f162b
remsim_client: Use osmocom logging instead of printf
...
Change-Id: I7e695335b4c4652a534cefa073dcea9f424d6744
4 years ago
Harald Welte
94ba99b5d0
bankd_main: Add more logging in error situations
...
Change-Id: I48e01d4517da1ac2983946d84c7a95ea9797e5b8
4 years ago
Harald Welte
eb971b5209
bankd_main: don't use fprintf if we can use osmocom logging API
...
Change-Id: I0b6ed933ffb3e3d689b344bd215357577e3120aa
4 years ago
Harald Welte
e1d3289ed9
bankd: Verify bankd/client slot in tpduModemToCard rx handler
...
Change-Id: I58fce1392f418b36f5f61f224e03a9dbbe34f01f
4 years ago
Harald Welte
4e7a285427
rspro_client_fsm: Disconnect if Connect{Client,Bank}Res != ok
...
Change-Id: Id199f9c4cb4c86fd0dba8939334ac69878f4a3f5
4 years ago
Harald Welte
ce638d8fd7
client, bankd: Add SIGUSR1 handling for talloc context debugging
...
Change-Id: I9153f4cc89b3911a4f9ea4f02fe1b108420d2eed
4 years ago
Harald Welte
75f560338c
bankd_client_fsm: Fix ESTABLISH signal handling
...
Change-Id: Ib7a09ff6cad0b0eba17908cba733df35b7ee767d
4 years ago
Harald Welte
7a950888f5
client: Don't ntohs() integer values from asn1 decoder
...
The ASN1 decoder takes care of endianness for us.
Change-Id: I9c3127b4fb195db5e81702e043e4fe595474b561
4 years ago
Harald Welte
9cf013a343
remsim_client: Store and use BankSlot received in ConfigClientBankReq
...
Change-Id: I6858b68590789d38741e541b9028d2b9b142e0c0
4 years ago
Harald Welte
cf8b89ad84
Move client/bank slot conversion functions to rspro_util.c
...
Change-Id: I18f1d1cb1fb712b01a0991419743db52338688af
4 years ago
Harald Welte
d571a3e2e1
RSPRO: split ConfigClient into ConfigClientId and ConfigClientBank
...
The point is that the ClientId is only set once at start-up (and
also only optionally), while the Bank IP/port/ID/slot can be changed
any number of times during a RSPRO connection.
Change-Id: Ic76207c7dd7c18fe93bc5133b29c5f9438a9fb0e
4 years ago
Harald Welte
19f881a373
bankd: respond to IPA PING from client with IPA PONG
...
The bankd worker threads handle the RSPRO connection from the
remsim-clients outside of our usual osmo* infrastructure and hence
they don't inherit the common IPA CCM handling. This means we need
to explicitly implement the keep-alive PONG support.
What this doesn't add is any outbound keepalive handling towards
the client.
Change-Id: I86f8ca28ece62c33ccbf45c9c65172be8a647407
4 years ago
Harald Welte
653d6a0b38
bankd: Disconnect client if we enter state BW_ST_CONN_CLIENT_UNMAPPED
...
Change-Id: Ifc1741610fc8a3c0413844e0c37a6fcbb2c55067
4 years ago
Harald Welte
2507597c42
bankd: Implement thread-safe SIGUSR1 talloc context reporting
...
If the main thread receives SIGUSR1, we dump its talloc report and
then signal all worker threads so each can dump their own talloc
report.
Change-Id: I89e7e22de5557376bd5a9625662d99ac0badf00c
4 years ago
Harald Welte
286a2beaa9
bandk: store the worker name as part of 'struct bankd_worker'
...
Change-Id: Ife981a4d555f96b63aeaedf27c3ebe513191b0c7
4 years ago
Harald Welte
00a9673ac2
bankd: terminate bankd connection once map is deleted
...
This implements a signal based mechanism by which the main thread can
inform worker threads that their mapping has just been removed and
they should hence terminate the connection and return themselves to the
pool.
Change-Id: Id932810d59e9e5d8994629d57aaf180bc96f90f5
4 years ago