aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/osmo-pcap/osmo_pcap_client.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/osmo-pcap/osmo_pcap_client.h b/include/osmo-pcap/osmo_pcap_client.h
index 8dc2ee8..719529a 100644
--- a/include/osmo-pcap/osmo_pcap_client.h
+++ b/include/osmo-pcap/osmo_pcap_client.h
@@ -22,13 +22,27 @@
#include <pcap.h>
+#include <osmocom/core/select.h>
+
struct osmo_pcap_client {
char *device;
pcap_t *handle;
+ char errbuf[PCAP_ERRBUF_SIZE];
struct bpf_program *bpf;
char *filter_string;
+ int filter_itself;
+
+ struct osmo_fd fd;
+
+ char *srv_ip;
+ int srv_port;
};
-int vty_client_init();
+extern struct osmo_pcap_client *pcap_client;
+
+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);