aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-08-25 19:55:36 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2016-09-08 15:48:02 +0200
commitc1c194393b1c568961623c939efd5ae118903440 (patch)
tree977811d02f275845e083433bf2d4c3937ff7fc2c
parent3d439d0d08ecc286ce4547add44ea01a043e0be9 (diff)
client: Add API function to close and re-connect network connection
-rw-r--r--include/osmo-pcap/osmo_pcap_client.h2
-rw-r--r--src/osmo_client_network.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/include/osmo-pcap/osmo_pcap_client.h b/include/osmo-pcap/osmo_pcap_client.h
index ee81e50..4367e4c 100644
--- a/include/osmo-pcap/osmo_pcap_client.h
+++ b/include/osmo-pcap/osmo_pcap_client.h
@@ -79,3 +79,5 @@ void osmo_client_send_data(struct osmo_pcap_client *client,
struct pcap_pkthdr *hdr, const uint8_t *data);
void osmo_client_send_link(struct osmo_pcap_client *client);
void osmo_client_connect(struct osmo_pcap_client *);
+
+void osmo_client_reconnect(struct osmo_pcap_client *);
diff --git a/src/osmo_client_network.c b/src/osmo_client_network.c
index 2400f3a..e7fe82c 100644
--- a/src/osmo_client_network.c
+++ b/src/osmo_client_network.c
@@ -201,3 +201,8 @@ void osmo_client_connect(struct osmo_pcap_client *client)
rate_ctr_inc(&client->ctrg->ctr[CLIENT_CTR_CONNECT]);
osmo_client_send_link(client);
}
+
+void osmo_client_reconnect(struct osmo_pcap_client *client)
+{
+ lost_connection(client);
+}