From 3cded63aa6ea97bd1e0476b4ddd2ef27b6ca8024 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 9 Mar 2019 12:59:41 +0100 Subject: [PATCH] naming: Distinguish "rspro client" from "remsim client" "remsim-client" is the client program running next to a phone/modem which is attaching to the SIM slot. "RSPRO client" is a protocl-level client of the RSPRO protocol: * the remsim-client connects as RSPRO client to the remsim-server * the remsim-client connects as RSPRO client to the remsim-bankd * the remsim-bankd connects as RSPRO client to the remsim-server Let's clarify this in naming. Change-Id: I10462d4669a0a30c46f3f8d3df67e9c1d4ce8c4b --- src/Makefile.am | 8 ++++---- src/bankd_main.c | 2 +- src/client.h | 2 +- src/{remsim_client_fsm.c => rspro_client_fsm.c} | 8 ++++---- src/{remsim_client_fsm.h => rspro_client_fsm.h} | 1 - 5 files changed, 10 insertions(+), 11 deletions(-) rename src/{remsim_client_fsm.c => rspro_client_fsm.c} (97%) rename src/{remsim_client_fsm.h => rspro_client_fsm.h} (94%) diff --git a/src/Makefile.am b/src/Makefile.am index 7f7a074..fa86556 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,7 +12,7 @@ libosmo_rspro_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ rspro/libosmo-asn1-rspro.la libosmo_rspro_la_SOURCES = rspro_util.c -noinst_HEADERS = debug.h bankd.h client.h internal.h rspro_util.h slotmap.h remsim_client_fsm.h \ +noinst_HEADERS = debug.h bankd.h client.h internal.h rspro_util.h slotmap.h rspro_client_fsm.h \ simtrace2/apdu_dispatch.h \ simtrace2/libusb_util.h \ simtrace2/simtrace2-discovery.h \ @@ -25,16 +25,16 @@ pcsc_test_SOURCES = driver_core.c driver_pcsc.c main.c pcsc_test_LDADD = $(OSMOCORE_LIBS) \ $(PCSC_LIBS) libosmo-rspro.la -remsim_bankd_SOURCES = slotmap.c bankd_main.c bankd_pcsc.c remsim_client_fsm.c debug.c +remsim_bankd_SOURCES = slotmap.c bankd_main.c bankd_pcsc.c rspro_client_fsm.c debug.c remsim_bankd_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ $(PCSC_LIBS) libosmo-rspro.la -lcsv -remsim_client_SOURCES = remsim_client.c remsim_client_fsm.c bankd_client_fsm.c debug.c +remsim_client_SOURCES = remsim_client.c rspro_client_fsm.c bankd_client_fsm.c debug.c remsim_client_LDADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOABIS_LIBS) \ libosmo-rspro.la simtrace2_remsim_client_SOURCES = simtrace2-remsim_client.c \ - bankd_client_fsm.c remsim_client_fsm.c debug.c \ + bankd_client_fsm.c rspro_client_fsm.c debug.c \ simtrace2/apdu_dispatch.c \ simtrace2/simtrace2-discovery.c \ simtrace2/libusb_util.c diff --git a/src/bankd_main.c b/src/bankd_main.c index 13e2b88..23a1c78 100644 --- a/src/bankd_main.c +++ b/src/bankd_main.c @@ -27,7 +27,7 @@ #include #include "bankd.h" -#include "remsim_client_fsm.h" +#include "rspro_client_fsm.h" #include "debug.h" #include "rspro_util.h" diff --git a/src/client.h b/src/client.h index 23acf60..5756190 100644 --- a/src/client.h +++ b/src/client.h @@ -5,7 +5,7 @@ #include #include "rspro_util.h" -#include "remsim_client_fsm.h" +#include "rspro_client_fsm.h" #include "debug.h" /* fsm.c */ diff --git a/src/remsim_client_fsm.c b/src/rspro_client_fsm.c similarity index 97% rename from src/remsim_client_fsm.c rename to src/rspro_client_fsm.c index 4675113..bf90703 100644 --- a/src/remsim_client_fsm.c +++ b/src/rspro_client_fsm.c @@ -295,8 +295,8 @@ static const struct osmo_fsm_state server_conn_fsm_states[] = { }, }; -struct osmo_fsm remsim_client_server_fsm = { - .name = "SERVER_CONN", +struct osmo_fsm rspro_client_server_fsm = { + .name = "RSPRO_CLIENT", .states = server_conn_fsm_states, .num_states = ARRAY_SIZE(server_conn_fsm_states), .timer_cb = server_conn_fsm_timer_cb, @@ -308,7 +308,7 @@ int server_conn_fsm_alloc(void *ctx, struct rspro_server_conn *srvc) { struct osmo_fsm_inst *fi; - fi = osmo_fsm_inst_alloc(&remsim_client_server_fsm, ctx, srvc, LOGL_DEBUG, "server"); + fi = osmo_fsm_inst_alloc(&rspro_client_server_fsm, ctx, srvc, LOGL_DEBUG, "server"); if (!fi) return -1; @@ -320,5 +320,5 @@ int server_conn_fsm_alloc(void *ctx, struct rspro_server_conn *srvc) static __attribute__((constructor)) void on_dso_load(void) { - osmo_fsm_register(&remsim_client_server_fsm); + osmo_fsm_register(&rspro_client_server_fsm); } diff --git a/src/remsim_client_fsm.h b/src/rspro_client_fsm.h similarity index 94% rename from src/remsim_client_fsm.h rename to src/rspro_client_fsm.h index 1e46a80..03f7ad6 100644 --- a/src/remsim_client_fsm.h +++ b/src/rspro_client_fsm.h @@ -37,4 +37,3 @@ struct rspro_server_conn { }; int server_conn_fsm_alloc(void *ctx, struct rspro_server_conn *srvc); -extern struct osmo_fsm remsim_client_server_fsm;