aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmo-pcap/common.h5
-rw-r--r--src/osmo_client_network.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/include/osmo-pcap/common.h b/include/osmo-pcap/common.h
index 27fd514..5d977f1 100644
--- a/include/osmo-pcap/common.h
+++ b/include/osmo-pcap/common.h
@@ -58,4 +58,9 @@ extern const char *osmopcap_copyright;
extern int osmopcap_go_parent(struct vty *vty);
extern int osmopcap_is_config_node(struct vty *vty, int node);
+/* defined in libpcap's pcap-int.h, which is not public */
+#ifndef MAXIMUM_SNAPLEN
+#define MAXIMUM_SNAPLEN 262144
+#endif
+
#endif
diff --git a/src/osmo_client_network.c b/src/osmo_client_network.c
index 3d741a8..e900ef4 100644
--- a/src/osmo_client_network.c
+++ b/src/osmo_client_network.c
@@ -42,7 +42,6 @@
#include <string.h>
#include <unistd.h>
-
static void _osmo_client_connect(void *_data)
{
osmo_client_connect((struct osmo_pcap_client_conn *) _data);
@@ -257,7 +256,7 @@ void osmo_client_send_link(struct osmo_pcap_client_conn *conn)
hdr->version_minor = 4;
hdr->thiszone = 0;
hdr->sigfigs = 0;
- hdr->snaplen = UINT_MAX;
+ hdr->snaplen = MAXIMUM_SNAPLEN;
hdr->linktype = pcap_datalink(conn->client->handle);
write_data(conn, msg);