blob: b4e4672e2dff76385effc827747c2cf590233d29 [file] [log] [blame]
Harald Welte24173fb2018-08-24 20:37:28 +02001#pragma once
2
3#include <osmocom/core/fsm.h>
4#include <osmocom/abis/ipa.h>
5
6#include "rspro_util.h"
7
8enum {
9 DMAIN,
10};
11
12/* fsm.c */
13
14enum bankd_conn_fsm_event {
15 BDC_E_TCP_UP,
16 BDC_E_TCP_DOWN,
17 BDC_E_CLIENT_CONN_RES,
18};
19
20
21enum server_conn_fsm_event {
22 SRVC_E_TCP_UP,
23 SRVC_E_TCP_DOWN,
24 SRVC_E_CLIENT_CONN_RES,
25};
26
27extern struct osmo_fsm remsim_client_bankd_fsm;
28extern struct osmo_fsm remsim_client_server_fsm;
29
30/* main.c */
31
32struct bankd_client {
33 /* connection to the remsim-server (control) */
34 struct ipa_client_conn *srv_conn;
35 struct osmo_fsm_inst *srv_fi;
36
37 /* our own component ID */
38 struct app_comp_id own_comp_id;
39
40 /* connection to the remsim-bankd */
41 char *bankd_host;
42 uint16_t bankd_port;
43 struct ipa_client_conn *bankd_conn;
44 struct osmo_fsm_inst *bankd_fi;
45};
46
Harald Weltef29e0d02018-08-24 21:42:22 +020047void ipa_client_conn_send_rspro(struct ipa_client_conn *ipa, RsproPDU_t *rspro);
Harald Welte24173fb2018-08-24 20:37:28 +020048int bankd_read_cb(struct ipa_client_conn *conn, struct msgb *msg);
49int bankd_conn_fsm_alloc(struct bankd_client *bc);