diff options
author | Jaap Keuter <jaap.keuter@xs4all.nl> | 2018-12-05 16:08:06 +0100 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-12-05 18:50:17 +0000 |
commit | 8cee907bbdfe94c133f1ed97174acfb3d814f369 (patch) | |
tree | 3498e27f30234e42ad9b05c401d41773abfe1e77 | |
parent | 54847d43a6b6012d9a509c1c9cdb075ac225c1d2 (diff) |
text2pcap: extend snap length
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>
-rw-r--r-- | text2pcap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/text2pcap.c b/text2pcap.c index 8f1745565d..62c3d28834 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -386,7 +386,6 @@ static char tempbuf[64]; /*---------------------------------------------------------------------- * 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 */ @@ -898,7 +897,7 @@ write_file_header (void) "", NULL, pcap_link_type, - PCAP_SNAPLEN, + WTAP_MAX_PACKET_SIZE_STANDARD, &bytes_written, 0, 9, @@ -906,7 +905,7 @@ write_file_header (void) } } 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) { |