path: root/include
diff options
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-05-31 17:42:13 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-05-31 17:42:53 +0200
commit3b9b38ca688b422894470618e8f017ea74dee0e1 (patch)
tree6e26491852ce7981226d2e5883098c8c288336ab /include
parent47169baa6edc040cd7f36174a86f565a8f403611 (diff)
osmo-pcap-client: Work on the client code, be able to open the device
Add vty code to allow changing the device, this will just attempt to open and close the device. Nothing else is done.
Diffstat (limited to 'include')
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);