client: Option to ignore any ATR sent by bankd
This introduces an --atr-ignore-rspro command line argument, which
will make the remsim-client ignore any RSPRO setAtrReq it receives
from the remote bankd.
The purpose of this is to modify the capabilities advertised by the card
towards the UE (modem/phone). For example, by modifying the ATR
one can disable/constrain the UE from using higher bit rate support, or
disable the use of logical channels.
Change-Id: I930293f7b637dba60d9dd6d2254f4524f831b491
diff --git a/src/client/remsim_client_main.c b/src/client/remsim_client_main.c
index 4238864..5a23d82 100644
--- a/src/client/remsim_client_main.c
+++ b/src/client/remsim_client_main.c
@@ -33,6 +33,7 @@
" -c --client-id <0-1023> RSPRO ClientId of this client\n"
" -n --client-slot <0-1023> RSPRO SlotNr of this client\n"
" -a --atr HEXSTRING default ATR to simulate (until bankd overrides it)\n"
+ " -r --atr-ignore-rspro Ignore any ATR from bankd; use only ATR given by -a)\n"
" -e --event-script <path> event script to be called by client\n"
#ifdef USB_SUPPORT
" -V --usb-vendor VENDOR_ID\n"
@@ -61,6 +62,7 @@
{ "client-id", 1, 0, 'c' },
{ "client-slot", 1, 0, 'n' },
{ "atr", 1, 0, 'a' },
+ { "atr-ignore-rspro", 0, 0, 'r' },
{ "event-script", 1, 0, 'e' },
#ifdef USB_SUPPORT
{ "usb-vendor", 1, 0, 'V' },
@@ -74,7 +76,7 @@
{ 0, 0, 0, 0 }
};
- c = getopt_long(argc, argv, "hvd:i:p:c:n:a:e:"
+ c = getopt_long(argc, argv, "hvd:i:p:c:n:a:re:"
#ifdef USB_SUPPORT
"V:P:C:I:S:A:H:"
#endif
@@ -114,6 +116,9 @@
exit(2);
}
break;
+ case 'r':
+ cfg->atr_ignore_rspro = true;
+ break;
case 'e':
osmo_talloc_replace_string(cfg, &cfg->event_script, optarg);
break;