Harald Welte | 24173fb | 2018-08-24 20:37:28 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <osmocom/core/fsm.h> |
| 4 | #include <osmocom/abis/ipa.h> |
Harald Welte | f9995a3 | 2018-10-14 20:40:05 +0200 | [diff] [blame] | 5 | #include <osmocom/rspro/RsproPDU.h> |
Harald Welte | 24173fb | 2018-08-24 20:37:28 +0200 | [diff] [blame] | 6 | |
| 7 | #include "rspro_util.h" |
Harald Welte | 3cded63 | 2019-03-09 12:59:41 +0100 | [diff] [blame] | 8 | #include "rspro_client_fsm.h" |
Harald Welte | 9cf013a | 2019-03-11 22:19:19 +0100 | [diff] [blame] | 9 | #include "slotmap.h" |
Harald Welte | a4e0a23 | 2018-10-14 17:44:25 +0200 | [diff] [blame] | 10 | #include "debug.h" |
Harald Welte | 24173fb | 2018-08-24 20:37:28 +0200 | [diff] [blame] | 11 | |
Harald Welte | 24173fb | 2018-08-24 20:37:28 +0200 | [diff] [blame] | 12 | /* main.c */ |
| 13 | |
Harald Welte | 5ed4693 | 2019-12-17 00:02:36 +0100 | [diff] [blame] | 14 | struct cardem_inst; |
| 15 | |
Harald Welte | 6a0248b | 2019-12-17 01:11:24 +0100 | [diff] [blame^] | 16 | #define ATR_SIZE_MAX 55 |
| 17 | struct client_config { |
| 18 | char *server_host; |
| 19 | int server_port; |
| 20 | |
| 21 | int client_id; |
| 22 | int client_slot; |
| 23 | |
| 24 | char *gsmtap_host; |
| 25 | bool keep_running; |
| 26 | |
| 27 | char *event_script; |
| 28 | |
| 29 | struct { |
| 30 | uint8_t data[ATR_SIZE_MAX]; |
| 31 | uint8_t len; |
| 32 | } atr; |
| 33 | |
| 34 | struct { |
| 35 | int vendor_id; |
| 36 | int product_id; |
| 37 | int config_id; |
| 38 | int if_num; |
| 39 | int altsetting; |
| 40 | int addr; |
| 41 | char *path; |
| 42 | } usb; |
| 43 | }; |
| 44 | |
Harald Welte | 24173fb | 2018-08-24 20:37:28 +0200 | [diff] [blame] | 45 | struct bankd_client { |
| 46 | /* connection to the remsim-server (control) */ |
Harald Welte | e56f2b9 | 2019-03-02 17:02:13 +0100 | [diff] [blame] | 47 | struct rspro_server_conn srv_conn; |
Harald Welte | 3e9860b | 2019-12-02 23:04:54 +0100 | [diff] [blame] | 48 | /* connection to the remsim-bankd (data) */ |
| 49 | struct rspro_server_conn bankd_conn; |
Harald Welte | 24173fb | 2018-08-24 20:37:28 +0200 | [diff] [blame] | 50 | |
Harald Welte | e56f2b9 | 2019-03-02 17:02:13 +0100 | [diff] [blame] | 51 | /* remote component ID */ |
| 52 | struct app_comp_id peer_comp_id; |
Harald Welte | 24173fb | 2018-08-24 20:37:28 +0200 | [diff] [blame] | 53 | |
Harald Welte | 9cf013a | 2019-03-11 22:19:19 +0100 | [diff] [blame] | 54 | struct bank_slot bankd_slot; |
Harald Welte | 5ed4693 | 2019-12-17 00:02:36 +0100 | [diff] [blame] | 55 | |
Harald Welte | 6a0248b | 2019-12-17 01:11:24 +0100 | [diff] [blame^] | 56 | struct client_config *cfg; |
Harald Welte | 5ed4693 | 2019-12-17 00:02:36 +0100 | [diff] [blame] | 57 | struct cardem_inst *cardem; |
Harald Welte | 24173fb | 2018-08-24 20:37:28 +0200 | [diff] [blame] | 58 | }; |