remsim-client: Move client_config from .c to .h file

Change-Id: I158fe0f2791c164adc74cf851d5a139990bce852
changes/26/16626/9
Harald Welte 3 years ago
parent 5ed4693a84
commit 6a0248b224
  1. 30
      src/client/client.h
  2. 28
      src/client/simtrace2-remsim_client.c

@ -13,6 +13,35 @@
struct cardem_inst;
#define ATR_SIZE_MAX 55
struct client_config {
char *server_host;
int server_port;
int client_id;
int client_slot;
char *gsmtap_host;
bool keep_running;
char *event_script;
struct {
uint8_t data[ATR_SIZE_MAX];
uint8_t len;
} atr;
struct {
int vendor_id;
int product_id;
int config_id;
int if_num;
int altsetting;
int addr;
char *path;
} usb;
};
struct bankd_client {
/* connection to the remsim-server (control) */
struct rspro_server_conn srv_conn;
@ -24,5 +53,6 @@ struct bankd_client {
struct bank_slot bankd_slot;
struct client_config *cfg;
struct cardem_inst *cardem;
};

@ -844,33 +844,6 @@ static void print_help(void)
);
}
#define ATR_SIZE_MAX 55
struct client_config {
char *server_host;
int server_port;
int client_id;
int client_slot;
char *gsmtap_host;
bool keep_running;
struct {
uint8_t data[ATR_SIZE_MAX];
uint8_t len;
} atr;
struct {
int vendor_id;
int product_id;
int config_id;
int if_num;
int altsetting;
int addr;
char *path;
} usb;
};
static struct client_config *client_config_init(void *ctx)
{
struct client_config *cfg = talloc_zero(ctx, struct client_config);
@ -1152,6 +1125,7 @@ int main(int argc, char **argv)
// initialize remote SIM client
g_client = talloc_zero(g_tall_ctx, struct bankd_client);
g_client->cfg = cfg;
g_client->cardem = g_ci;
if (cfg->client_id != -1) {

Loading…
Cancel
Save