The snaplength as saved in the capture file is set to the original
PCAP file length of 65535. In reality the package size can grow to
256kiB. Make use of the correct constant when writing the PCAP file.
Bug: 15292
Change-Id: Ib7710e4151cdc712f3344c1436252f9b3bfb556c
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/30923
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
/*----------------------------------------------------------------------
* Stuff for writing a PCap file
*/
-#define PCAP_SNAPLEN 0xffff
/* Link-layer type; see http://www.tcpdump.org/linktypes.html for details */
static guint32 pcap_link_type = 1; /* Default is LINKTYPE_ETHERNET */
"",
NULL,
pcap_link_type,
- PCAP_SNAPLEN,
+ WTAP_MAX_PACKET_SIZE_STANDARD,
&bytes_written,
0,
9,
}
} else {
success = libpcap_write_file_header(output_file, pcap_link_type,
- PCAP_SNAPLEN, FALSE,
+ WTAP_MAX_PACKET_SIZE_STANDARD, FALSE,
&bytes_written, &err);
}
if (!success) {