aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
AgeCommit message (Collapse)AuthorFilesLines
2016-12-05Clean up initialization code for programs.Guy Harris1-18/+22
Make the init_progfile_dir() call unconditionally, even if plugins aren't supported, as that doesn't necessarily mean nobody uses the directory containing the executable. Report the error the same way in all programs, and free the error string after we're finished with it. Make the error - and the comment before the code - reflect what init_progfile_dir() is actually doing (the goal is to get the full pathname of the directory *containing* the executable; that's generally done by getting the pathname of the executable and stripping off the name of the executable, but that's won't necessarily always be the case). Also note for TShark that we won't be able to capture traffic, just as we do for Wireshark (if we don't have the pathname of the program file, we don't have a pathname to use to find dumpcap). Have the plugin scanner just fail silently if we weren't able to get the plugin directory path, so we don't have to worry about calling it if init_progfile_dir() fails. Clean up white space while we're at it. Change-Id: I8e580c719aab6fbf74a764bf6629962394fff7c8 Reviewed-on: https://code.wireshark.org/review/19076 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-04Have a routine to do all the work of initializing libwiretap.Guy Harris1-4/+2
Have programs that use libwiretap call that routine rather than separately calling some or all of init_open_routines(), wtap_register_plugin_types(), and wtap_opttypes_initialize(). Also don't have routines internal to libwiretap call those. Yes, this means doing some initialization work when it isn't necessary, but scattering on-demand calls throughout the code is a great way to forget to make those calls. Change-Id: I5828e1c5591c9d94fbb3eb0a0e54591e8fc61710 Reviewed-on: https://code.wireshark.org/review/19069 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-24Editcap: Fix comparsion between signed and unsigned intUli Heilmeier1-2/+2
secs_per_block is a unsigned integer. Therefore we can't compare a signed integer with it. Change-Id: Ic965a88e0e704e296c4af9193ca4a3504173ae36 Reviewed-on: https://code.wireshark.org/review/17901 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-11Use the get.*guint32() routines to get guint32s.Guy Harris1-2/+2
Change-Id: Ie3b451549a29970a5e3204b449f198aa1c82de5b Reviewed-on: https://code.wireshark.org/review/17650 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-11Allow a zero change offset in editcap.Guy Harris1-1/+1
It doesn't have to be non-zero. Change-Id: If578906855abd9eb9fa07e97ee5508c139b6f61b Reviewed-on: https://code.wireshark.org/review/17646 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-10editcap: fix memleaksPeter Wu1-7/+9
The version string stuff mirrors an earlier tshark change. Move some cleanup calls (in case no packets are selected) and add wtap_close. Change-Id: I6f282e89279a732c226824e10857be04b40841e8 Reviewed-on: https://code.wireshark.org/review/17621 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-09-09Fix copy-and-pasteo.Guy Harris1-1/+1
Change-Id: Ifead0872053943b7cfe192e15d7099e2328ae456 Reviewed-on: https://code.wireshark.org/review/17603 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-08Add get_ routines to get a guint32, and use them.Guy Harris1-30/+11
By analogy to get_natural_int() and get_positive_int(), add routines to get a guint32 and to get a non-zero guint32, doing all the necessary error checks, and use it. Change-Id: I65a9ac8a3d136886df3588806ae7af5bdc7b8cb6 Reviewed-on: https://code.wireshark.org/review/17586 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-08editcap: use ws_strtou/i functions.Dario Lombardo1-26/+25
Change-Id: Ib69241eb04088fe32f53ac4e87911499cf5e9e40 Reviewed-on: https://code.wireshark.org/review/17500 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-05Use get_positive_int() to parse signed positive arguments.Guy Harris1-13/+16
Change-Id: Id17b56704f484abdf047a3d1b0775f7fa46eb380 Reviewed-on: https://code.wireshark.org/review/17507 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-05Have scan_plugins() take an argument specify what to do on load failures.Guy Harris1-6/+11
That's a less gross hack to suppress load failures due to not having libwiretap than providing a no-op failure-message routine, as it at least allows other code using a failure-message routine, such as cmdarg_err() and routines that call it, to be used. We really should put libwiretap and libwireshark plugins into separate subdirectories of the plugin directories, and avoid even looking at libwireshark plugins in programs that don't use libwireshark. Change-Id: I0a6ec01ecb4e718ed36233cfaf638a317f839a73 Reviewed-on: https://code.wireshark.org/review/17506 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-29editcap: fix typosDario Lombardo1-2/+2
Change-Id: I24c455afc51749a665e452312332d167831f19d2 Reviewed-on: https://code.wireshark.org/review/16760 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-26editcap: fix typosDario Lombardo1-8/+8
Change-Id: Ibdd81d8dbc779a8741a83d1269ccfb5ea156dd5a Reviewed-on: https://code.wireshark.org/review/16691 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-25editcap: fix typosDario Lombardo1-2/+2
Change-Id: Ic5eb5daca1ab7463723ee2b299482929f3e8be56 Reviewed-on: https://code.wireshark.org/review/16666 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-21No need to check for string option values being null.Guy Harris1-2/+1
A string option, if present, always has a value; it might be a null *string*, but you won't get a null pointer (if the option isn't present, it simply isn't present). Fix some comments while we're at it. Change-Id: I9c1420f56998a7d04de5c5cc2e92631b181f303a Reviewed-on: https://code.wireshark.org/review/16564 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-17Fix printf style parameters complaints from VS Code AnalysisMichael Mann1-3/+4
Change-Id: I5669e2442582f899643fae4a9f86ab6d505dde07 Reviewed-on: https://code.wireshark.org/review/16505 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-14Redo the block options APIs.Guy Harris1-7/+7
A block can have zero or more instances of a given option. We distinguish between "one instance only" options, where a block can have zero or one instance, and "multiple instances allowed" options, where a block can have zero or more instances. For "one instance only" options: "add" routines add an instance if there isn't one already and fail if there is; "set" routines add an instance if there isn't one already and change the value of the existing instance if there is one; "set nth" routines fail; "get" routines return the value of the instance if there is one and fail if there isn't; "get nth" routines fail. For "multiple instances allowed" options: "add" routines add an instance; "set" routines fail; "set nth" routines set the value of the nth instance if there is one and fail otherwise; "get" routines fail; "get nth" routines get the value if the nth instance if there is one and fail otherwise. Rename "optionblock" to just "block"; it describes the contents of a block, including both mandatory items and options. Add some support for NRB options, including IPv4 and IPv6 option types. Change-Id: Iad184f668626c3d1498b2ed00c7f1672e4abf52e Reviewed-on: https://code.wireshark.org/review/16444 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-06-23Editcap: Fix setting of max_packet_numberJohn A. Thacker1-3/+3
editcap -r only sets max_packet_number to the earliest, instead of latest, packet or end of range selection. This changes it to the proper test. Bug: 12547 Change-Id: I81772962b00fc6566ccead4fb44c6626a47fff31 Reviewed-on: https://code.wireshark.org/review/16045 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-01Add data structures necessary to support multiple Name Resolution blocks.Michael Mann1-12/+12
This doesn't try to use any data from multiple Name Resolution blocks, it just converts single Name Resolution block usage into a GArray, so the potential is there to then use/support multiple Name Resolution blocks within a file format (like pcapng) Change-Id: Ib0b584af0bd263f183bd6d31ba18275ab0577d0c Reviewed-on: https://code.wireshark.org/review/15684 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-01Add data structures necessary to support multiple Section Header blocks.Michael Mann1-16/+14
This doesn't try to use any data from multiple Section Header blocks, it just converts single Section Header block usage into a GArray, so the potential is there to then use/support multiple Section Header blocks within a file format (like pcapng) Change-Id: I6ad1f7b8daf4b1ad7ba0eb1ecf2e170421505486 Reviewed-on: https://code.wireshark.org/review/15636 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-22Add wtap_optionblock_set_option_string_formatMichael Mann1-3/+1
Also add a length parameter to wtap_optionblock_set_option_string Change-Id: I8c7bbc48aa96b5c2a91ab9a17980928d6894f1ee Reviewed-on: https://code.wireshark.org/review/15505 Reviewed-by: Anthony Coddington <anthony.coddington@endace.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-21Link version code statically againJoão Valverde1-1/+1
This allows keeping the code-sharing with the static linking. This "fixes" a hypothetical ABI mismatch with wsutil and avoids pulling more external dependencies to wsutil than strictly necessary. A nice side-effect is that libwsutil no longer depends on version.h. Follow up to f95976eefcbeb5d24df383c29d29ef888b503945. Change-Id: I8f0d6a557ab3f7ce6f0e2c269124c89f29d6ad23 Reviewed-on: https://code.wireshark.org/review/15002 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-04-13Windows: Remove the need for _CRT_NONSTDC_NO_DEPRECATE.Gerald Combs1-3/+2
Replace some function calls with their non-deprecated equivalents so that we can remove _CRT_NONSTDC_NO_DEPRECATE from CMakeLists.txt and config.nmake. Leave _CRT_SECURE_NO_DEPRECATE in place. Removing it failed with 145 warnings and 72 errors. Note that we could probably improve startup performance by using wmem in diam_dict.*. Change-Id: I6e130003de838aebedbdd1aa78c50de8a339ddcb Reviewed-on: https://code.wireshark.org/review/14883 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-04Include ws_diag_control.h in config.hJoão Valverde1-1/+0
Change-Id: Ia394071710ecda3b0e6686a51fbca45a8ff20317 Reviewed-on: https://code.wireshark.org/review/14749 Petri-Dish: João Valverde <j@v6e.pt> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-04-03Move zlib version check to wsutilJoão Valverde1-37/+2
Change-Id: I0950f61e90af5bb21c0017204de0c0b509616e5c Reviewed-on: https://code.wireshark.org/review/14747 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-28Fix warnings/errors of type -Wused-but-marked-unusedJoerg Mayer1-1/+6
Change-Id: I34c2d9953272822da0745d1b24c64d8466e43b37 Reviewed-on: https://code.wireshark.org/review/14668 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-03-26Fix compile errors when compiling w/o zlibDaniël van Eeden1-1/+1
Change-Id: I443cd0d4a143e456e11b5939891312a0501770a0 Reviewed-on: https://code.wireshark.org/review/14636 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-09Remove superfluous pointer checks (CID-280599, 280600 and 280601)Jaap Keuter1-18/+15
The preceding code takes every effort to make sure that the frac and end pointers are relevant pointers. Don't go back and check for NULL yet again. Change-Id: If805aee5a77a8c23eac7b074bd11d3743c5e1a3b Reviewed-on: https://code.wireshark.org/review/14398 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-06Properly fetch the ethertype.Guy Harris1-1/+2
The ethertype is 16 bits and big-endian, so fetch it with pntoh16() to convert it to host byte order (and to handle unaligned values). Fixes Coverity CID 1355352. Change-Id: I14980e2813c3ea19c6df01681f8ed7aaad5c3f59 Reviewed-on: https://code.wireshark.org/review/14359 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-23Making wiretap option blocks more generic.Michael Mann1-10/+16
This was inspired by https://code.wireshark.org/review/9729/, but takes it in a different direction where all options are put into an array, regardless of whether they are "standard" or "custom". It should be easier to add "custom" options in this design. Some, but not all blocks have been converted. Descriptions of some of the block options have been moved from wtap.h to pcapng.h as it seems to be the one that implements the description of the blocks. Also what could be added/refactored is registering block behavior. Change-Id: I3dffa38f0bb088f98749a4f97a3b7655baa4aa6a Reviewed-on: https://code.wireshark.org/review/13667 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-15editcap: flag for ignore vlan duplication removalJonas Falkevik1-0/+45
Add additional --novlan flag for removing vlan tag info before checking for duplicates. When capturing with -i any you could see packets more than once and some drivers include vlan info. With the --novlan the vlan info is removed from the packet so that checksum duplication detection can be used, if the rest of the packets are the same. Change-Id: I5dca6e20259a0a396875919e9e60cc42291579d3 Reviewed-on: https://code.wireshark.org/review/13414 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-12Adjust time stamps even if the secs value of the time stamp is 0.Guy Harris1-6/+2
If the seconds value in a time stamp is 0, that says nothing whatsoever about whether it's supported or not - it's the presence flag, which we've already tested and found to be set, that indicates whether the time stamp is supported. Bug: 12116 Change-Id: I91354783af7b6356d9806c7559d35da44ea4567f Reviewed-on: https://code.wireshark.org/review/13913 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23More structure assignments for nstime_t.Guy Harris1-6/+3
Change-Id: I4d320b50d7d74b6fc423014c9611a60d49c6be02 Reviewed-on: https://code.wireshark.org/review/13503 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-16fix spelling-error-in-binary found by lintianAlexis La Goutte1-2/+2
Change-Id: I2bdb40d287b2c19d40679fb73a8bae5f1debdd98 Reviewed-on: https://code.wireshark.org/review/13330 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-01-15[editcap] Pacify OS X buildbot.Michael Mann1-3/+3
Change-Id: I3ec3c4723d29d84b25419982712707126351a01c Reviewed-on: https://code.wireshark.org/review/13301 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-14[editcap] Remove excess parsing when packets are kept.Matej Košík1-15/+32
Also allow for range to include "the rest" (ex 10- would include all the packets starting at number 10) Bug: 9686 Change-Id: Ib02e52b22acf49b0e52df0a75fa4fa0d5f37aa31 Reviewed-on: https://code.wireshark.org/review/13291 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-14[editcap] Bugfix tree compare function.Michael Mann1-5/+8
Bug: 12007 Change-Id: Icd31988ebbfe1e0bf4d29f32462c58c6c2c55547 Reviewed-on: https://code.wireshark.org/review/13277 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-06Clean up more includes of wtap.h.Guy Harris1-1/+1
Change-Id: Ie53b64f7e5b39a50dffb62fc0b886da71e0a3bd2 Reviewed-on: https://code.wireshark.org/review/13066 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-14Make init_progfile_dir() take a function pointer [-Wpedantic]João Valverde1-1/+1
Change-Id: I45f8ea5ee6ccc5a484c60ad6e686aaf30f6b0c98 Reviewed-on: https://code.wireshark.org/review/12557 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-12Remove -Wwrite-strings compiler flagJoão Valverde1-4/+2
The "-Wwrite-strings" flag produces nuisance warnings. These warnings are not useful, they're impossible to fix in a sane way and therefore are being handled with casts of static strings to (char *). This just moves the warning to [-Wcast-qual] and a compiler pragma is in turn required (and used) to squelch that warning. Remove the Wwrite-strings warning. Let that responsibility fall on the programmer (as is done by casting). Change-Id: I5a44dfd9decd6d80797a521a3373593074962fb5 Reviewed-on: https://code.wireshark.org/review/12162 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-11Update user guide for development releasePascal Quantin1-1/+1
Change-Id: I9b4c5ab2e98ad6daa618bcda20b53a23467e16e0 Reviewed-on: https://code.wireshark.org/review/11734 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-10Skip only the actual file descriptor close when writing to stdout.Guy Harris1-4/+4
Have a "this is stdout" flag for a wtap_dumper, and have "open the standard output for dumping" routines that set that flag. When closing a wtap_dumper, do most of the work regardless of whether we're writing to the standard output or not (so that everything gets written out) and only skip the closing of the underlying file descriptor. Change-Id: I9f7e4d142b3bd598055d806b7ded1cb4c378de8e Reviewed-on: https://code.wireshark.org/review/11673 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-10Treat "-" as "standard input" in the CLI, not in libwiretap.Guy Harris1-8/+31
That's a UI convention, and the GUI shouldn't honor that convention - a user might get confused if they try to save to "-" and end up with nothing (and with a ton of crap in a log file if programs launched from the GUI end up with their standard output and error logged). While we're at it, make randcap report write and close errors. Change-Id: I9c450f0ca0320ce4c36d13d209b56d72edb43012 Reviewed-on: https://code.wireshark.org/review/11666 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-04Don't include "file.h" if you don't need it.Guy Harris1-0/+1
It ends up dragging in libwireshark headers, which programs not linking with libwireshark shouldn't do. In particular, including <epan/address.h> causes some functions that refer to libwireshark functions to be defined if the compiler doesn't handle "static inline" the way GCC does, and you end up requiring libwireshark even though you shouldn't require it. Move plurality() to wsutil/str_util.h, so that non-libwireshark code can get it without include epan/packet.h. Fix includes as necessary. Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3 Reviewed-on: https://code.wireshark.org/review/11545 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-09-28editcap/reordercap: rename time to frame_time.Dario Lombardo1-6/+6
According to checkAPI. Change-Id: Iddad6253fc4711ed7870eccadb91d94e5fecd24d Reviewed-on: https://code.wireshark.org/review/10672 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-28Have separate variables for read and write errors.Guy Harris1-32/+32
That way, when we check for read errors, we don't run the risk of thinking we have a read error after we get a write error. Change-Id: Idb79822d30989b2529433878798c577a76eacca7 Reviewed-on: https://code.wireshark.org/review/10295 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-18Pcapng: clean up Section Header Block handlingHadriel Kaplan1-11/+17
Change-Id: I8516d0c561ed0b63e49a3594027c9c15bb789258 Reviewed-on: https://code.wireshark.org/review/9726 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-12editcap: add change offset.Dario Lombardo1-2/+17
This option skips some bytes when fuzzing, that prevents some headers from being changed. This focuses fuzzer to a smaller part of the packet. Change-Id: I1db83235e93f2774a9991e3af70f633487b816fa Reviewed-on: https://code.wireshark.org/review/9982 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>
2015-08-06Pcapng: support Name Resolution Block optionsHadriel Kaplan1-6/+11
Make pcapng decode options in an NRB during read, and store the comment option, and write it back out as well. Also make it handle plugin handlers for unknown options in received NRB(s). Change-Id: I81863ef8d85cb1c8b5ba6673ba0e562efe77714f Reviewed-on: https://code.wireshark.org/review/9723 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-26editcap: allow command-line option to set comments for given frame numbersMartin Mathieson1-49/+104
Change-Id: I608d3c5f56acc58ef7b3e59821a15be49344cc35 Reviewed-on: https://code.wireshark.org/review/9154 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>