aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-pcap
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-12-03 19:32:04 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-12-03 19:53:24 +0100
commitff1a5dc75152fb72cd4597036f9c6c712f1c1436 (patch)
treeac86761cc65f49c0d8c8bbccf8dab0e09b16dc5f /include/osmo-pcap
parent26327bd0ce2e3f11c9d02511c47fb45bb705b0e3 (diff)
server: Deal with jumbo frames on the wire
The 2000 as a number is too small. Modern networks can have a higher MTU (up to 9000). Take this number and assume there is a big header in front of it.
Diffstat (limited to 'include/osmo-pcap')
-rw-r--r--include/osmo-pcap/osmo_pcap_server.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/osmo-pcap/osmo_pcap_server.h b/include/osmo-pcap/osmo_pcap_server.h
index 1f2f6fc..edb29d3 100644
--- a/include/osmo-pcap/osmo_pcap_server.h
+++ b/include/osmo-pcap/osmo_pcap_server.h
@@ -23,6 +23,8 @@
#ifndef OSMO_PCAP_SERVER_H
#define OSMO_PCAP_SERVER_H
+#include "wireformat.h"
+
#include <osmocom/core/select.h>
#include <osmocom/core/linuxlist.h>
@@ -40,6 +42,8 @@ struct osmo_pcap_server;
#define STATE_INITIAL 0
#define STATE_DATA 1
+#define SERVER_MAX_DATA_SIZE 10000
+
struct osmo_pcap_conn {
/* list of connections */
struct llist_head entry;
@@ -64,7 +68,7 @@ struct osmo_pcap_conn {
int state;
int pend;
int reopen;
- char buf[4096];
+ char buf[SERVER_MAX_DATA_SIZE + sizeof(struct osmo_pcap_data)];
struct osmo_pcap_data *data;
};