diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-06-01 18:49:07 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-06-01 18:49:07 +0200 |
commit | 39d904f14929b7096bd146a67ea80913199fe693 (patch) | |
tree | 583464f487ad010faca32c2099c303b390bd37c4 /include | |
parent | 9df7dc5f69c3a8edc2150b0702c1504b5f7be8b7 (diff) |
osmo-pcap-server: Try to read the the data with a simple state machine
Diffstat (limited to 'include')
-rw-r--r-- | include/osmo-pcap/osmo_pcap_server.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 { |