path: root/file_packet_provider.c
AgeCommit message (Collapse)AuthorFilesLines
2021-11-15regex: Prefer C99/POSIX typesJoão Valverde1-0/+1
Replace 'gssize' with 'ssize_t'. Add a CMake configure check for ssize_t. Fix missing "config.h" includes.
2021-08-22file_packet_provider: fix constness in declaration.Dario Lombardo1-1/+1
This fixes a warning (threated as error) on Windows (ClCompile target) -> C:\projects\wireshark\file_packet_provider.c(84,1): warning C4028: formal parameter 3 different from declaration [C:\projects\wireshark\build\shark_common.vcxproj]
2021-07-14wiretap: clean up option definitions a bit.Guy Harris1-2/+2
Spell out "DESCRIPTION" for the IDB description option, as it's spelled out in the pcapng spec. Put the #defines for various options in the same order as the block types for them are in the pcapng spec.
2021-07-08Change "edited" to "modified" in one more place when referring to blocks.Guy Harris1-5/+5
Modifications aren't necessarily the result of a user editing something.
2021-07-08Consistently refer to blocks that have been modified as "modified".Guy Harris1-3/+3
"User" sounds as if the blocks belong to the user; at most, the current user might have modified them directly, but they might also have, for example, run a Lua script that, unknown to them, modified comments. Also, a file might have "user comments" added by a previous user, who them wrote the file and and provided it to the current user. "Modified" seems a bit clearer than "changed".
2021-07-07Use wtap_blocks for packet commentsDavid Perry1-10/+10
Mostly functioning proof of concept for #14329. This work is intended to allow Wireshark to support multiple packet comments per packet. Uses and expands upon the `wtap_block` API in `wiretap/wtap_opttypes.h`. It attaches a `wtap_block` structure to `wtap_rec` in place of its current `opt_comment` and `packet_verdict` members to hold OPT_COMMENT and OPT_PKT_VERDICT option values.
2021-06-16Replace g_log() calls with ws_log()João Valverde1-1/+1
2018-12-27Try to squeeze some bytes out of the frame_data structure.Guy Harris1-1/+1
Make the time stamp precision a 4-bit bitfield, so, when combined with the other bitfields, we have 32 bits. That means we put the flags at the same structure level as the time stamp precision, so they can be combined; that gets rid of an extra "flags." for references to the flags. Put the two pointers next to each other, and after a multiple of 8 bytes worth of other fields, so that there's no padding before or between them. It's still not down to 64 bytes, which is the next lower power of 2, so there's more work to do. Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe Reviewed-on: https://code.wireshark.org/review/31213 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-11Add support for reading and writing the new if_hardware IDB option.Guy Harris1-0/+2
Support for writing it in live captures will come later; this change, but not that one, will be backported so older versions of Wireshark won't remove it when writing a file out. Change-Id: I9fd4067991acfd2d18c03d0a373ce8337a9f3a76 Reviewed-on: https://code.wireshark.org/review/29064 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo1-1/+1
The first is deprecated, as per https://spdx.org/licenses/. Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed Reviewed-on: https://code.wireshark.org/review/25661 Petri-Dish: Anders Broman <a.broman58@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-08Hand the packet provider functions to epan_new().Guy Harris1-6/+6
Have separate packet_provider_data structures and packet_provider_funcs structures; the latter holds a table of functions that libwireshark can call for information about packets, the latter holds the data that those functions use. This means we no longer need to expose the structure of an epan_t outside epan/epan.c; get rid of epan/epan-int.h. Change-Id: I381b88993aa19e55720ce02c42ad33738e3f51f4 Reviewed-on: https://code.wireshark.org/review/24732 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-08Move the frame_set stuff back into the capture_file structure.Guy Harris1-0/+90
libwireshark now expects an epan_t to be created with a pointer to a "packet provider" structure; that structure is opaque within libwireshark, and a pointer to it is passed to the callbacks that provide interface names, interface, descriptions, user comments, and packet time stamps, and that set user comments. The code that calls epan_new() is expected to provide those callbacks, and to define the structure, which can be used by the providers. If none of the callbacks need that extra information, the "packet provider" structure can be null. Have a "file" packet provider for all the programs that provide packets from a file. Change-Id: I4b5709a3dd7b098ebd7d2a7d95bcdd7b5903c1a0 Reviewed-on: https://code.wireshark.org/review/24731 Reviewed-by: Guy Harris <guy@alum.mit.edu>