aboutsummaryrefslogtreecommitdiffstats
path: root/rawshark.c
AgeCommit message (Collapse)AuthorFilesLines
2016-06-21pcap: Add support to "new" Npcap native mode without setting PATHYang Luo1-0/+1
Npcap decided not to add "C:\Windows\System32\Npcap" to system PATH in the installation any more (starting from Npcap 0.07 r14). So this patch needs to be applied, otherwise Wireshark will not find Packet.dll (the error message will only say wpcap.dll is missing, but actually is Packet.dll missing). Change-Id: Ifd8b6e6d8ecf9866cd37c3368b604de210ff8c7b Reviewed-on: https://code.wireshark.org/review/15959 Reviewed-by: Yang Luo <hsluoyz@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-19Revert "tap: change glib functions to wmem."Pascal Quantin1-3/+3
This reverts commit 2e9f3c5d366eaa7139fc877b5301392166b3f985. It breaks the registration of codec, dissector and libwiretap plugins. Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de Reviewed-on: https://code.wireshark.org/review/16012 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-17tap: change glib functions to wmem.Dario Lombardo1-3/+3
Change-Id: I878ae6b121a669f9b7f4e1e57bc079f0cb44c0bf Reviewed-on: https://code.wireshark.org/review/15270 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-05-10Have fvalue_to_string_repr always return an (wmem) allocated buffer.Michael Mann1-5/+4
Previous patches converted all fvalue_to_string_repr calls to expect an allocated buffer (and not a passed in one). Now changing signature to force an allocated buffer. Added wmem in case that can be taken advantage of within epan (and since the function signature was changing anyway). Change-Id: Ica1ac4a9a182ce0e73303856329e198d9d525b7b Reviewed-on: https://code.wireshark.org/review/15343 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-10rawshark: Have fvalue_to_string_repr just return allocated string ↵Michael Mann1-15/+8
representation. Simplify use of fvalue_to_string_repr in rawshark by just having it return an allocated string representation of a field value instead of trying to find the right allocated buffer size to pass in. This will also allow fvalue_to_string_repr to be converted to exclusively return allocated strings and not accept a provided buffer. Change-Id: I9996411dca4656d599b30ed415453d0207131824 Reviewed-on: https://code.wireshark.org/review/15342 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-10rawshark: Get "field string values" from existing functionality.Michael Mann1-115/+20
rawshark shouldn't be converting FT_ and BASE_ values into strings on its own, there's a function for that. Change-Id: Ib4ce1651ee130a03644b5de3ab471333444e19a9 Reviewed-on: https://code.wireshark.org/review/15341 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-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-04Remove synchronous DNS name resolutionJoão Valverde1-2/+2
Change-Id: Ie5e670b769eb0674950f3679ef511047641c2873 Reviewed-on: https://code.wireshark.org/review/14751 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-15More "FT_BOOLEAN is 64-bit" fixes.Guy Harris1-2/+2
Change-Id: Iaacd492858ca2fb98c4947d587fbbd26fc102a7d Reviewed-on: https://code.wireshark.org/review/14486 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-08Use ws_{read,write,fdopen,close}.Guy Harris1-3/+3
Be more consistent about using the ws_ routines, as we suggest in README.developer. In C++ on UN*X, define ws_close as ::close rather than close, so that it works even in classes with methods or members named "close". Change-Id: Ide2652229e6b6b4624cbddae0e909a4ea1efa591 Reviewed-on: https://code.wireshark.org/review/11637 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-07Clean up includes of unistd.h, fcntl.h, and sys/stat.h.Guy Harris1-12/+0
Have wsutil/file_util.h include them on UN*X, just as it includes io.h on Windows, so we can have a rule of "if you do file operations, include <wsutil/file_util.h> and use the routines in it". Remove includes of unistd.h, fcntl.h, and sys/stat.h that aren't necessary (whether because of the addition of them to wsutil/file_util.h or because they weren't needed in the first place). Change-Id: Ie241dd74deff284e39a5f690a297dbb6e1dc485f Reviewed-on: https://code.wireshark.org/review/11619 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-28Catch REPORT_DISSECTOR_BUG() calls in dissector registration routines.Guy Harris1-1/+3
Have epan_init() return a success/failure Boolean indication. Catch exceptions when calling the dissector registration routines and, if we get one, report the error and return a failure indication. If epan_init() fails, quit, but first make sure the reported error is displayed. Change-Id: I0300cbb1f66a5644f857a205235124909d684c50 Reviewed-on: https://code.wireshark.org/review/11340 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-25DNS: move DNS name resolution pref to Name Resolution prefsHadriel Kaplan1-6/+3
Move the boolean flag for using captured DNS packet info for name resolution to the Name Resolution preferences settings, as it was rather surprising to disable Name Resolution preferences and still have names being resolved. Also disble them all if the '-n' command line switch is used, and re-enable it for a 'd' character in the '-N' option. Bug: 10337 Change-Id: Ie4d47bab0100db3360cc447cd3e446b2e39aa917 Reviewed-on: https://code.wireshark.org/review/9786 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-14Add a "heuristic dissectors" tab to the Enable Protocols dialog.Michael Mann1-0/+3
This allows for a global place to enable/disable all heuristic dissectors. This removes the need for individual dissector preferences, but those will be removed at a later date. The more important part is the epan code to save/restore the enabled state of the heuristic dissector. The GTK dialog was more for quickly testing the feature (there was already some GTK code in place that started the heuristic dialog tab) Change-Id: Ie10687505c27a4456c49d5c4c69a5fc5f6394275 Ping-Bug:11152 Reviewed-on: https://code.wireshark.org/review/9508 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-06Rawshark calls init_process_policies() twiceHadriel Kaplan1-5/+0
Calling it twice won't make it work any better. Change-Id: I30fea0ba2ccf6ebfb6caf6a58333cee9b192e4cb Reviewed-on: https://code.wireshark.org/review/9513 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-06-27Avoid some Visual Studio Code Anaylzer warningsMartin Mathieson1-7/+7
Change-Id: I320386b02bea09658636a9281ee3cbba34a5e4cd Reviewed-on: https://code.wireshark.org/review/9188 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-10[MSVC 2015] Use intptr_t to make MSVC happy.AndersBroman1-1/+1
Change-Id: I1a39495bc2a752070db8c62136b17d9567bc33ab Reviewed-on: https://code.wireshark.org/review/8856 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-02-21Make FT_{U}INT64 behave more like FT_{U}INT32, add support for ↵JC Wren1-2/+9
FT_{U}INT{40,48,56} Change-Id: I57354c309ecf3a0c8f0c7cff485638027f30bb19 Reviewed-on: https://code.wireshark.org/review/5813 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-20Suppress a bunch of cast-qual warnings.Gerald Combs1-2/+5
Squelch warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual] similar to g630f54f. Change strtod to g_ascii_strtod to squelch a checkAPIs error. Change-Id: Ib2d26ef89f08827a5adc07e35eaf876cd7b8d14e Reviewed-on: https://code.wireshark.org/review/7269 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-20Just have init_progfile_dir() take a void pointer.Guy Harris1-1/+1
dladdr() takes a void * as a code pointer; have init_progfile_dir() do so, and do the casting in the calls. We don't care about the signature of the function whose address we're passing, we just want to pass a pointer to *something* in the main program. Change-Id: I9372620a97b0eb53c2bb3c0c41a238b4408f3709 Reviewed-on: https://code.wireshark.org/review/7270 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18Clean up ftype-conversion and dfilter error message string handling.Guy Harris1-2/+5
Have dfilter_compile() take an additional gchar ** argument, pointing to a gchar * item that, on error, gets set to point to a g_malloc()ed error string. That removes one bit of global state from the display filter parser, and doesn't impose a fixed limit on the error message strings. Have fvalue_from_string() and fvalue_from_unparsed() take a gchar ** argument, pointer to a gchar * item, rather than an error-reporting function, and set the gchar * item to point to a g_malloc()ed error string on an error. Allow either gchar ** argument to be null; if the argument is null, no error message is allocated or provided. Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c Reviewed-on: https://code.wireshark.org/review/6608 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-04Create BASE_DOT, BASE_DASH, and BASE_SEMICOLON types for the FT_BYTES field ↵Michael Mann1-2/+2
type. These "bases" will put a ".", "-", or ":" respectively between hexidecimal bytes in the field in packet view and display filter. FT_BYTES with BASE_NONE will have no separator in the packet view, but continue to have the ':' as a separator in the display filter. Converted the "string" hf_ entries that used tvb_fc_to_str as a string to use proto_tree_add_item with FT_BYTES/BASE_DOT type. Converted applicable tvb_bytes_to_ep_str_punct() calls to use the new BASE values. Change-Id: I2442185bb314d04a3ff2ba57883652ecd738b5f9 Reviewed-on: https://code.wireshark.org/review/6098 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-01Call setlocale() before getting version information.Guy Harris1-3/+3
That way, the setlocale() call used to get the current locale will get the right answer. Change-Id: Ib43e16a9d98d08e5ddaff81fd3235f5b64d7b95b Reviewed-on: https://code.wireshark.org/review/6197 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31Don't include signal.h unless we need it.Guy Harris1-2/+0
Change-Id: I3965e0951eee919720f780b5e52732fd18fd9786 Reviewed-on: https://code.wireshark.org/review/6194 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31Do the full string in get_{compiled,runtime}_version_info().Guy Harris1-6/+4
Have them start the string with "Compiled" or "Running on", and return the string when done. Change-Id: Ic4d290c963621fa0385dc5aab766fd4ad31d3810 Reviewed-on: https://code.wireshark.org/review/6155 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-31Move the version_info.c stuff to wsutil/ws_version_info.c.Guy Harris1-1/+0
Change-Id: I3a5c7e219974bfb924819b43b4d445eaf00e5bde Reviewed-on: https://code.wireshark.org/review/6153 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-28Removed duplicated #include linesDario Lombardo1-4/+0
Change-Id: I9cafa3cd5c74121168777d8c656e7e94e89efd3c Reviewed-on: https://code.wireshark.org/review/6065 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-25Check for getopt_long(), not getopt().Guy Harris1-1/+1
We support three types of platforms: 1) UN*Xes that have both getopt() and getopt_long(); 2) UN*Xes that have getopt() but not getopt_long(); 3) Windows, which has neither. Checking for getopt_long() lets us distinguish between 1) and 2) and build getopt_long() for them. Change-Id: Iaf0f142f9bebaa2eed2128d544ec9786711def45 Reviewed-on: https://code.wireshark.org/review/6045 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-24Move twelve show_version() functions from the varoius programs andStephen Fisher1-16/+1
Wireshark UI files into a single one in wsutil. Change-Id: I0a64f0cc8106bd681bd185289c36272c4c43baad Reviewed-on: https://code.wireshark.org/review/6026 Reviewed-by: Stephen Fisher <sfisher@sdf.org>
2014-12-18Make sure err_info is always set, and print it iff it's non-null.Guy Harris1-3/+6
Change-Id: Ib5c600c491a3d8adcfa91c00fa9445283610545b Reviewed-on: https://code.wireshark.org/review/5830 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-18WTAP_ERR_UNWRITABLE_ errors aren't returned by reads or open-for-reading.Guy Harris1-6/+0
Check for them *only* on opening for writing and writes. Change-Id: I4b537d511ec04bcfc81f69166a2b9a2ee9310067 Reviewed-on: https://code.wireshark.org/review/5827 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-17Rename WTAP_ERR_UNSUPPORTED_ENCAP to WTAP_ERR_UNWRITABLE_ENCAP.Guy Harris1-1/+1
That makes it clearer what the problem is, and that it should only be returned by the dump code path, not by the read code path. Change-Id: Icc5c9cff43be6c073f0467607555fa7138c5d074 Reviewed-on: https://code.wireshark.org/review/5797 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-01Add a Buffer to wtap_pkthdr to hold file-type-specific packet metadata.Guy Harris1-1/+3
For example, this can be used for pcap-ng options not mapped to file-type-independent metadata values. Change-Id: I398b324c62c1cc1cc61eb5e9631de00481b4aadc Reviewed-on: https://code.wireshark.org/review/5549 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-14Rename stat_cmd_args.[ch] to stat_tap_ui.[ch].Guy Harris1-1/+1
The intent is to handle more than just command-line arguments; reflect that. Change-Id: Ia10efda85a9d11c6579d1bec6f789cee30d9e825 Reviewed-on: https://code.wireshark.org/review/5304 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17Don't use ctype.h routines.Guy Harris1-1/+0
That avoids locale dependency and handles possibly-signed chars(which we weren't always doing before). Change-Id: I89e50678abb8c3e535081c92ca25bc1bab672c68 Reviewed-on: https://code.wireshark.org/review/4798 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-08Only set err_info on an error, and use g_strdup_printf().Guy Harris1-6/+16
If the goal is to look like a libwiretap routine, we only need to set *err_info on an error, and we should set it to a g_mallocated string (or NULL). Handle WTAP_ERR_UNSUPPORTED while we're at it - we never return it, but we never return WTAP_ERR_UNSUPPORTED_ENCAP, either, but we handle it. Change-Id: I9d93c43278d22f0fa77ec1cf7f29b476c8dd0dd0 Reviewed-on: https://code.wireshark.org/review/4565 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-08Set err_info to null for errors that don't have an informaton string.Guy Harris1-1/+1
Change-Id: Ibbcf3496ebfb20c53b953db84b2ddb69083dcb86 Reviewed-on: https://code.wireshark.org/review/4556 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-07No need for WTAP_ERR_CANT_READ.Guy Harris1-9/+2
Unlike the standard I/O routines, the code we introduced that supports fast random seeking on gzipped files will always supply some specific error code for read errors, so we don't need WTAP_ERR_CANT_READ. Add WTAP_ERR_CANT_WRITE for writing, as we're still using the standard I/O routines for that. Set errno to WTAP_ERR_CANT_WRITE before calling fwrite() in wtap_dump_file_write(), so that it's used if fwrite() fails without setting errno. Change-Id: I6bf066a6838284a532737aa65fd0c9bb3639ad63 Reviewed-on: https://code.wireshark.org/review/4540 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-28Make the time stamp resolution per-packet.Guy Harris1-29/+0
Pcap-ng files don't have a per-file time stamp resolution, they have a per-interface time stamp resolution. Add new time stamp resolution types of "unknown" and "per-packet", add the time stamp resolution to struct wtap_pkthdr, have the libwiretap core initialize it to the per-file time stamp resolution, and have pcap-ng do the same thing with the resolution that it does with the packet encapsulation. Get rid of the TS_PREC_AUTO_XXX values; just have TS_PREC_AUTO, which means "use the packet's resolution to determine how many significant digits to display". Rename all the WTAP_FILE_TSPREC_XXX values to WTAP_TSPREC_XXX, as they're also used for per-packet values. Change-Id: If9fd8f799b19836a5104aaa0870a951498886c69 Reviewed-on: https://code.wireshark.org/review/4349 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-20Make load_cap_file() just return a success/fail indication.Guy Harris1-7/+5
We don't care *why* it fails; it's printed a message to indicate that. Just have it indicate whether it succeeded or not. Change-Id: I98160999baa5f25ea03ef803b7dbf77dff1518de Reviewed-on: https://code.wireshark.org/review/4213 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-24Modify includes of config.h so that out-of-tree builds, i.e. CMakeGraham Bloice1-1/+1
don't pick up the in-tree copy. Change-Id: I7ec473876cdba1a025c52362d7f6adc62d24ce71 Reviewed-on: https://code.wireshark.org/review/3798 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-27Make value_string_ext const-correct.Kevin Cox1-2/+2
There is still some const-incorrect usage of them but those can be ironed out after this change has been made. Change-Id: Iba0631c804bdab34d7c0232b49967130e3370488 Reviewed-on: https://code.wireshark.org/review/3199 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-04Move utility routines for capturing into a libcaputils static library.Guy Harris1-2/+2
Some of those routines are used only in dumpcap; others are used in TShark and Wireshark as well. Change-Id: I9d92483f2fcff57a7d8b6bf6bdf2870505d19fb7 Reviewed-on: https://code.wireshark.org/review/2841 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03Include "capture-pcap-util.h" even if we don't have libpcap.Guy Harris1-1/+2
The routines to get libpcap version information just say "no pcap here" if we don't have it, so they're called regardless of whether we were compiled with it. Change-Id: I4e58cce83f7c0e36aa6ef9b40ec7075732402f3b Reviewed-on: https://code.wireshark.org/review/2800 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03Add long-option support.Guy Harris1-1/+10
That way, --help and --version, as well as -h and -v, work. Change-Id: I095e0dcef9f6181d6fbe6337f9f33e80bc44f11a Reviewed-on: https://code.wireshark.org/review/2790 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03Regularize the help output of programs.Guy Harris1-18/+8
Only print to the standard output, and only give the version information, if a "print help" command-line option is specified. Otherwise, leave out the version information, and print to the standard error. Leave out the copyright information; it's extra cruft, and http://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html doesn't say anything about it (and bash, at least, doesn't print it). Change-Id: Ic5029ccf96e096453f3bd38383cc2dd355542e8a Reviewed-on: https://code.wireshark.org/review/2789 Reviewed-by: Guy Harris <guy@alum.mit.edu>