From 39d904f14929b7096bd146a67ea80913199fe693 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 1 Jun 2011 18:49:07 +0200 Subject: osmo-pcap-server: Try to read the the data with a simple state machine --- include/osmo-pcap/osmo_pcap_server.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/osmo-pcap/osmo_pcap_server.h b/include/osmo-pcap/osmo_pcap_server.h index a94724c..b408c47 100644 --- a/include/osmo-pcap/osmo_pcap_server.h +++ b/include/osmo-pcap/osmo_pcap_server.h @@ -36,6 +36,10 @@ struct osmo_pcap_server; + +#define STATE_INITIAL 0 +#define STATE_DATA 1 + struct osmo_pcap_conn { /* list of connections */ struct llist_head entry; @@ -55,6 +59,12 @@ struct osmo_pcap_conn { /* last time */ struct tm last_write; + + /* read buffering */ + int state; + int pend; + char buf[4096]; + struct osmo_pcap_data *data; }; struct osmo_pcap_server { -- cgit v1.2.3