From 3b9b38ca688b422894470618e8f017ea74dee0e1 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 31 May 2011 17:42:13 +0200 Subject: 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. --- include/osmo-pcap/osmo_pcap_client.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include/osmo-pcap/osmo_pcap_client.h') 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 +#include + 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); -- cgit v1.2.3