aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-pcap/osmo_pcap_client.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-05-31 21:19:22 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-05-31 21:19:52 +0200
commit77288207fa55e8e5d0b0f986c45b6a33ebaf891c (patch)
tree57b77d2c7ff7e7dcdde88cf2a0c520025b737c54 /include/osmo-pcap/osmo_pcap_client.h
parentcd2d3db3b765fdaab245196ae34930180c4edb03 (diff)
osmo-pcap-client: Connect to a server, send the data to it
Diffstat (limited to 'include/osmo-pcap/osmo_pcap_client.h')
-rw-r--r--include/osmo-pcap/osmo_pcap_client.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/osmo-pcap/osmo_pcap_client.h b/include/osmo-pcap/osmo_pcap_client.h
index 95302b1..7aae7ca 100644
--- a/include/osmo-pcap/osmo_pcap_client.h
+++ b/include/osmo-pcap/osmo_pcap_client.h
@@ -20,9 +20,12 @@
*
*/
+#include <inttypes.h>
#include <pcap.h>
#include <osmocom/core/select.h>
+#include <osmocom/core/timer.h>
+#include <osmocom/core/write_queue.h>
struct osmo_pcap_client {
@@ -33,11 +36,12 @@ struct osmo_pcap_client {
struct bpf_program bpf;
char *filter_string;
int filter_itself;
-
struct osmo_fd fd;
char *srv_ip;
int srv_port;
+ struct osmo_wqueue wqueue;
+ struct osmo_timer_list timer;
};
extern struct osmo_pcap_client *pcap_client;
@@ -46,3 +50,8 @@ int vty_client_init(struct osmo_pcap_client *);
int osmo_client_capture(struct osmo_pcap_client *client, const char *device);
int osmo_client_filter(struct osmo_pcap_client *client, const char *filter);
+
+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 *);