aboutsummaryrefslogtreecommitdiffstats
path: root/writecap
AgeCommit message (Collapse)AuthorFilesLines
2019-07-28HTTPS In Even More Places, update some links.Guy Harris1-1/+1
Fall back on the Wayback Machine for some links. Change-Id: I6a44a2caaeb4fa521c2f08196e7c36069e3bb842 Reviewed-on: https://code.wireshark.org/review/34103 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26HTTPS (almost) everywhere.Guy Harris3-3/+3
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-05-20pcapng: fix the magic when bytes are swapped.Dario Lombardo1-1/+1
This value is used when checking if the file was generated on a machine with different endianess. The error message changes from "Unrecognized pcapng format or not pcapng data." to "dumpcap: Interface 0 is big endian but we're little endian." Fix dumpcap.c and pcapio.c. Ping-Bug: 15754 Change-Id: I3a31f873f01bcb3f1324410e70f29f285e56c715 Reviewed-on: https://code.wireshark.org/review/33274 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-03-19Don't cast away constness if you don't have to.Guy Harris1-2/+2
Change-Id: I8b13bcd78d327b3ec9903b43e67fcf4a73052962 Reviewed-on: https://code.wireshark.org/review/32479 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-18writecap: rename pcapng_write_session_block to _section_blockJaap Keuter2-2/+2
The pcapng file format specification speaks of a secion block, not a session block. Let the function name reflect the proper name of the block it writes. Change-Id: Id399fae3648c93f4750fedaa297b18f95f2bb96f Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-on: https://code.wireshark.org/review/31099 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-28dumpcap: fix some warnings and add some debugsJames Ko1-4/+6
Ping-Bug: 15149 Change-Id: Ifa530fbdcbffbc188343c03fc7b518325a511f5f Reviewed-on: https://code.wireshark.org/review/29906 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-18Remove autotools build system.Dario Lombardo1-71/+0
It has been replaced by cmake. Change-Id: I83a5eddb8645dbbf6bca9f026066d2e995d8e87a Reviewed-on: https://code.wireshark.org/review/26969 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17Switch the Doxygen API reference build to CMake.Gerald Combs1-81/+0
Switch to a single Doyxgen configuration which was generated using a recent version of Doxygen and customized to suit our needs. Add wsar_html and wsar_html_zip targets to CMake. Update some Doxygen markup and documentation as needed. Change-Id: Ic8a424b292c35a26f74ae0b53322265683e56e69 Reviewed-on: https://code.wireshark.org/review/26976 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07spdx: more licenses converted.Dario Lombardo1-13/+1
Change-Id: I3861061ec261e63b23621799e020e811ed78a343 Reviewed-on: https://code.wireshark.org/review/26333 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-17Don't have CLEAN_FILES variables for the "clean" source files.Guy Harris1-5/+1
Except for the one directory that (currently) has "not yet clean" files, epan/dissectors, we don't need a separate variable to keep track of the "clean" source files. In the cases where not all files were in CLEAN_FILES, put them into the variable used to enable -Werror or its equivalent. Change-Id: Ic4119861c1d9e381adfe31e9977e1ac71d623f5b Reviewed-on: https://code.wireshark.org/review/25830 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-08writecap: use SPDX identifiers.Dario Lombardo2-26/+2
Change-Id: I800f8ccb516f69a15b535ee96a4b34754c008028 Reviewed-on: https://code.wireshark.org/review/25663 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-09Use pcapng as the name of the file format.Guy Harris2-2/+2
At one point, I remember a discussion resulting in the official name of the next-generation replacement for pcap format being changed to "pcapng", with no hyphen. Make Wireshark reflect that. Change-Id: Ie66fb13a0fe3a8682143106dab601952e9154e2a Reviewed-on: https://code.wireshark.org/review/25214 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-01dumpcap: enable capture of pcapng from pipeJames Ko2-0/+36
Reads pcapng blocks from a pipe. Section header blocks are parsed for endianess. All other blocks only have the general block header parsed for type and length, and then endianess converted if necessary. Outputs all blocks using the original endianess format so none of the other block types or options require parsing. Change-Id: I2f4f0175013d8fc2cda42a63e7deacad537951e3 Bug: 11370 Reviewed-on: https://code.wireshark.org/review/24536 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-18autotools: Library build products don't need explicit cleaningJoão Valverde1-3/+1
Change-Id: I5d68c05f2844d6c9ae486531b189dbf10bc09cff Reviewed-on: https://code.wireshark.org/review/24484 Reviewed-by: João Valverde <j@v6e.pt>
2017-10-17autotools: Fix bogus checkAPI targetsJoão Valverde1-2/+2
Change-Id: Ifc8884fc0f0e4548db79a68e3fbc35c7e5fb9be9 Reviewed-on: https://code.wireshark.org/review/23947 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15autotools: make maintainer-clean should allow rerunning 'configure'João Valverde1-5/+0
Change-Id: Iedae94ffefe27b13b1967d69cacb757b5aa4576d Reviewed-on: https://code.wireshark.org/review/23928 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-10-13CMake: Allow user build flags to override default build flagsJoão Valverde1-2/+2
Autotools has the very useful feature by design of allowing the user to override the default build flags (you break it you keep it). Apparently CMake applies COMPILE_OPTIONS target property after CMAKE_{C,CXX}_FLAGS so that doesn't work here. Prepend our flags to those variables instead to make it work then. Specific target flag overrides can still be added with COMPILER_OPTIONS (e.g: generated files with -Wno-warning) but this is less effective and then we're back at the point where this overrides user flags. It's less of a concern though. Change-Id: I44761a79be4289238e02d4e781fef0099628817b Reviewed-on: https://code.wireshark.org/review/23675 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-07-21*Always* write out the trailing pcapng block total length in host byte order.Guy Harris1-8/+6
In the fast-path "no options" case for writing an Enhanced Packet Block, just copy the block total length to the buffer, don't put it into the buffer in little-endian byte order. If we're running on a big-endian machine, and thus *should* be writing out multi-byte integral block fields in big-endian byte order, that'll write out a corrupt pcapng file. Bug: 13802 Change-Id: I33958e3fc1d205ca6df3ef4057d92b461831c50e Reviewed-on: https://code.wireshark.org/review/22753 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-24Reduce number of fwrite when writing pcap-ng EPB.AndersBroman1-2/+25
According to callgrind with the patch dumping 3000 pakets the number of calls to write_to_file is reduced from 11541 to 9000 reducing the number of lr from 4 681 518 to 4 314 101. If the buffer holding the packet was guaranteed to be padded to 32 bit boundary the code could be simplified and if there was space "in front" for the packet header it would be even better. Change-Id: Ie991c05fa9d831ee4d703bd47b8123f2b1f83277 Reviewed-on: https://code.wireshark.org/review/20256 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-30cmake: make WERROR_COMMON_FLAGS a normal stringPeter Wu1-7/+18
Instead of checking for the boolean "FALSE", just set an empty string. This avoids the need to check for WERROR_COMMON_FLAGS before using it. The transformation is the same for all files, remove "if (WERROR_COMMON_FLAGS)" and "endif()", reindent and add quotes (since we have a string here and not a list). Modelines have been added where missing. Change-Id: I0ab05ae507c51fa77336d49a99a226399cc81b92 Reviewed-on: https://code.wireshark.org/review/17997 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com>
2016-08-23CMake: Allow setting per target compiler warningsJoão Valverde1-0/+1
Setting our compiler warning flags in CMAKE_C_FLAGS does not allow using different flags per target. Allow for that possibility by setting the internal WS_WARNINGS_{C,CXX}_FLAGS and using the COMPILE_OPTIONS property to set them. This change is just setting mechanism and there should be no difference in generated warnings. The check_X_compiler_flag cmake test is changed to test each flag individually. We need a list, not a space separated string, and the aggregate test is not significant. Change-Id: I59fc5cd7e130c7a5e001c598e3df3e13f83a6a25 Reviewed-on: https://code.wireshark.org/review/17150 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-06-30Remove Makefile.common filesJoão Valverde2-33/+3
Now that nmake build system has been removed they are not needed anymore. Change-Id: I88075f955bb4349185859c1af4be22e53de5850f Reviewed-on: https://code.wireshark.org/review/16050 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-06-15Remove Nmake build systemPascal Quantin2-73/+1
Change-Id: I3bd474f3cda9667dec66426b5729449953df3e61 Reviewed-on: https://code.wireshark.org/review/15777 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2016-03-26Fix some copy/pasteos for writecap using doxygenMichael Mann1-3/+3
Change-Id: Ie5baadb7c19a56c2e1de524fcf8598d60dce18f8 Reviewed-on: https://code.wireshark.org/review/14632 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-26Fix nmake build for new extcap and writecap binaries.Michael Mann1-3/+3
Change-Id: Ic7f370cfe5e2a3aad81c77baab066e95a249238f Reviewed-on: https://code.wireshark.org/review/14631 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-24Put pcapio.c into a writecap library, and use it.Guy Harris8-0/+1187
Change-Id: Ib89f345c072a38bc01f0513366a4bdae3bf6f08e Reviewed-on: https://code.wireshark.org/review/14615 Reviewed-by: Guy Harris <guy@alum.mit.edu>