aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
AgeCommit message (Collapse)AuthorFilesLines
2016-02-21autotools: Use pkg-config autoconf macros for GLib/GTKJoão Valverde1-2/+3
Remove mostly obsolete aclocal macros. Make GTK build flags a strict superset of GLib flags. Use GTK build variables for GTK GUI and GLib elsewhere. Add dependency flags explicitly instead of using WS_CPPFLAGS. Some minor improvements and fixes for missing/unnecessary variables (no impact on our test builds). Change-Id: I3e1f067a875f79d6516c1fa7af986f17a7a6b671 Reviewed-on: https://code.wireshark.org/review/14005 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-21autotools: Cleanup some installation directory stuffJoão Valverde1-1/+5
Replace hacky code to set install dirs in config.h and use path definitions only where required. Change-Id: I78735f730725382c1b3aca876705e5e6e1872d78 Reviewed-on: https://code.wireshark.org/review/14033 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-20sober: fix cannot optimize loops warning [-Wunsafe-loop-optimizations]João Valverde1-4/+4
Change-Id: I180b1ef53f9adcf4625d0cf9ee35066aa21ee59b Reviewed-on: https://code.wireshark.org/review/13934 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-19Fix implicit conversion from 64 to 32 bitsJoão Valverde3-4/+8
Change size_t to something that is guaranteed to fit in a socklen_t. Fix incorrect AC_DEFINE too. Change-Id: I710f32fb1e5bd4f51843d380aa8ed8b6acd98c02 Reviewed-on: https://code.wireshark.org/review/14009 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-19Add inet_pton/inet_ntop interface to libwsutilJoão Valverde9-113/+155
Change-Id: Ifc344ed33f2f7ca09a6912a5adb49dc35f07c81f Reviewed-on: https://code.wireshark.org/review/13881 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-02-16Qt: Add Decode as in Show Packet BytesStig Bjørlykke1-0/+3
Add an option to decode the packet bytes from base64 or zlib compressed. Also add configurable start byte and end byte to make it possible to decode a subset of bytes. It's also possible to select a range in ASCII view and select "Show selected" from the context menu to make a subset. In ASCII view a null terminator is replaced by UTF8 symbol for NULL, and a CR is replaced by UTF8 symbol for carriage return. This is done to make it possible to "Show selected" from the context menu. Change-Id: Ie03c9912c304c121af6ca9e998a6e8445b5382c5 Reviewed-on: https://code.wireshark.org/review/13958 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-14Sort UTF8 entitiesStig Bjørlykke1-3/+3
Change-Id: I804dc16c3dd04e57556e095bf82a81afe257f03c Reviewed-on: https://code.wireshark.org/review/13941 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-13Just #include wsutil/inet_aton.hJoão Valverde2-12/+20
No need for platform-specific system header boilerplate. Change-Id: I5387a0005ddb0d7aab3c5b9f28d6282053c1b0fd Reviewed-on: https://code.wireshark.org/review/13865 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-02-11AES: Fix dereference of null pointerJoão Valverde1-1/+4
Change-Id: Iddd21c8786e679eef51024a172403200ee6652cb Reviewed-on: https://code.wireshark.org/review/13902 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-08add functions to calculate the CRC of an ISO14443-A messageMartin Kaiser2-0/+14
Change-Id: I1ccd9885746a6044f298d7d531a9bc009a70288e Reviewed-on: https://code.wireshark.org/review/13802 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-03Squelch warnings from compilers that don't know that (a%b) is always < b.Guy Harris1-2/+2
Change-Id: I71efc87ad6931e5bbac0cbc0f5602eb7101fde54 Reviewed-on: https://code.wireshark.org/review/13699 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-03Add AES-CMAC encryption supportCedric Izoard2-0/+138
-Add AES-CMAC encryption need to check MIC when deriving TDLS keys (802.11) -Tested against NIST test vector for AES128-CMAC Bug: 11312 Change-Id: Id4fd839bdedd3aa135823334e59d98271aea7c2b Reviewed-on: https://code.wireshark.org/review/13663 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-03Add functions for SHA256 and HMAC-SHA256Cedric Izoard4-0/+359
- Use same API as SHA-1 - Tested against NIST's test vectors (byte oriented implementation) Bug: 11312 Change-Id: I7fea7d13c43da059138153b17de7084ef9d81ac5 Reviewed-on: https://code.wireshark.org/review/13662 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-31plugins: do not import symbols globallyPeter Wu1-1/+1
Clang's ASAN reported an ODR violation when plugins were loaded. Sure enough, symbols did actually get loaded twice: ==5898==ERROR: AddressSanitizer: odr-violation (0x7fffd95a35e0): [1] size=7 'version' plugins/mate/plugin.c:19:31 [2] size=6 'version' plugins/opcua/plugin.c:19:31 After this change, plugins cannot insert new symbols in the global namespace. Change-Id: Ib11f7263e9c586f8e7c1f8f5fb239b20d46ddd2f Reviewed-on: https://code.wireshark.org/review/13260 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>
2016-01-28autotools: Don't use "user variables" to set build flagsJoão Valverde1-15/+6
GNU coding standards recommend against it and automake is designed around it. This allows overriding the global build flags using AM_CFLAGS, etc., or per object flags, something that is difficult or impossible currently because of automake precedence rules. Change-Id: I3f1ea12e560af5a46b2f04b342b1882bbf123f12 Reviewed-on: https://code.wireshark.org/review/13455 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-01-24Set width of hex output according to bitmaskKevin Bracey1-1/+46
Output from BASE_HEX et al has always been zero-padded to according to the field type - 8 digits for FT_UINT32, etc. When the field has a bitmask, this is definitely not appropriate - the field type is used to indicate the size of the bitfield container, and tells us nothing about the size of this field. Instead, determine the actual size of the field by inspecting the bitmask, and output the corresponding number of hex digits. Change-Id: I10ec4e93e1e40e8b1354d5368cc8945cf671a617 Reviewed-on: https://code.wireshark.org/review/13225 Reviewed-by: João Valverde <j@v6e.pt> 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-01-07Clean up indentation.Guy Harris1-1/+1
Change-Id: Ica6615ef80867e911a1244a8a54411519033b275 Reviewed-on: https://code.wireshark.org/review/13105 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-07Don't assume a stat() fails only if the target file doesn't exist.Guy Harris1-2/+31
If the error is something other than ENOENT, return that error indication. Change-Id: If866cab5f0de0e4fa8b1ed1cead1290feb88a3cb Reviewed-on: https://code.wireshark.org/review/13091 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03No need for "struct nstime_t", "nstime_t" by itself suffices.Guy Harris1-1/+1
(That should also keep people from deciding that they don't want to include <wsutil/nstime.h>, but still want to use Wireshark nanosecond times, and do so by sticking a private incomplete definition of "struct nstime_t" into the code.) Change-Id: I94e863fe7083ebba254c3a718b85088a89fb6b7d Reviewed-on: https://code.wireshark.org/review/13022 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-01Welcome in 2016Pascal Quantin1-1/+1
Change-Id: I727dcd07093de7cb9381804fbcf4c0e1a99a3d6c Reviewed-on: https://code.wireshark.org/review/12989 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-12-14Make init_progfile_dir() take a function pointer [-Wpedantic]João Valverde2-3/+7
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-1/+1
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-12-12Avoid breaking output string mid-sentenceJoão Valverde1-2/+2
Change-Id: I463f93e515ebe12ed30b1f08cca7d29a7bd535ae Reviewed-on: https://code.wireshark.org/review/12552 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-12-01autotools: Fix g212f2f1João Valverde1-1/+1
Change-Id: If7185885faea2319fdce4d89a7a9bf40312bcfa6 Reviewed-on: https://code.wireshark.org/review/12346 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-01autotools: Clean abi-check with maintainer-cleanJoão Valverde1-1/+8
Change-Id: Ia2ce54592485d2995bcfd56bd127a2fedb1a7d07 Reviewed-on: https://code.wireshark.org/review/12293 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-12-01ws80211: Disable shorten-64-to-32.Gerald Combs1-1/+11
Disable shorten-64-to-32 in ws80211_create_on_demand_interface, which calls NLA_PUT_STRING, which passes the output of strlen to an int parameter. NLA_PUT_STRING is defined in netlink/attr.h so there's not much we can do to fix it directly. Suppress -Wpragmas before suppressing warnings in gcc so that we can use DIAG_OFF with clang-only warnings. Change-Id: I1180950edd93c056b8fbfbed164e482024aee90a Reviewed-on: https://code.wireshark.org/review/12314 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-29cfutils.c: Fix ISO C forbids an empty translation unit [-Wpedantic]João Valverde6-18/+29
Change-Id: Iac9384e63a4e946c73832103f8d6949f0187fa38 Reviewed-on: https://code.wireshark.org/review/12147 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-11-08Use ws_{read,write,fdopen,close}.Guy Harris1-0/+7
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 Harris5-36/+14
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-11-06file_util.h includes io.h, we don't need to do so ourselves.Guy Harris1-7/+32
While we're at it, get rid of a commented-out include, and update a comment to give more information. Change-Id: I910a26a3d7f4a50f0559abe5f2ab97a93c80357f Reviewed-on: https://code.wireshark.org/review/11610 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-05Get rid of ws80211_frequency_to_channel().Guy Harris1-0/+8
Use ieee80211_mhz_to_chan() instead. Change-Id: I1d9a3b9c3a5ad2b1a5bd3f8d10b7f8b1bbcba51d Reviewed-on: https://code.wireshark.org/review/11586 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-05Match what most source say are the actual Japanese 4.9 GHz channels.Guy Harris1-8/+20
I don't know where Matthew Gast got his 4.9 GHz channels, but IEEE Std 802.11-2012 and ARIB STD T-71 have something different. Change-Id: I5d86b12193e38422d3702f36cb106fe858daa4b5 Reviewed-on: https://code.wireshark.org/review/11585 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-04Don't include "file.h" if you don't need it.Guy Harris1-0/+3
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-10-28Just use g_mkdir_with_parents() to make the .config directory on UN*X.Guy Harris1-8/+11
It will create all the relevant directories (if it can), using g_mkdir(), which is a wrapper for mkdir() on UN*X - just as ws_mkdir() is, so we don't need to make our own copy that uses ws_mkdir. Bug: 11645 Change-Id: I68affc6fabccf58dace75af078d9bfd67a1b47b2 Reviewed-on: https://code.wireshark.org/review/11373 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-28Do the "create parent of config file directory" stuff on UN*X as well.Guy Harris1-11/+8
~ obviously exists, but ~/.config might not, making it impossible to create ~/.config/wireshark. Bug: 11645 Change-Id: Ia267b168eb7b1438d4c35a6bb89df9d7bfcbd3f3 Reviewed-on: https://code.wireshark.org/review/11368 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-19On UN*X, use XDG_CONFIG_HOME/wireshark for configuration files.Guy Harris1-63/+88
If it doesn't exist, but ~/.wireshark does, continue to use that, for backwards compatibility. Derived from change I7fa64d6e8bd43c6a5dec93e30a4f69a747c34256. Bug: 6353 Change-Id: I937f94b19a371486b7ea2228e51994cc4c72b501 Reviewed-on: https://code.wireshark.org/review/11137 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-16Add DEGREE SIGN character to utf8_entities.h and use it.Guy Harris1-0/+1
Add a #define giving the UTF-8 sequence for DEGREE SIGN, and use it in packet-synphasor.c rather than having it define its own version. Use it in some other places rather than a string of two octal values. Change-Id: Ic0f3b23ae0165c9824d89304d683f45bce31dced Reviewed-on: https://code.wireshark.org/review/11102 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-16CMake: Add /WXGerald Combs1-2/+2
Add "/WX" to the Visual C++ compiler flags if DISABLE_WERROR is off, similar to config.nmake. We haven't compiled C++ code with -Wshorten-64-to-32 for quite some time so there's no need to add -Wno-shorten-64-to-32 in ui/qt/CMakeLists.txt. Additionally, squelch ---- C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3050) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3065) : see reference to function template instantiation 'void std::_Median<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_RanIt,_Pr)' being compiled with [ _RanIt=QList<QString>::iterator , _Pr=bool (__cdecl *)(const QString &,const QString &) ] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3127) : see reference to function template instantiation 'std::pair<_RanIt,_RanIt> std::_Unguarded_partition<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled with [ _RanIt=QList<QString>::iterator , _Pr=bool (__cdecl *)(const QString &,const QString &) ] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3157) : see reference to function template instantiation 'void std::_Sort<_Iter,int,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Diff,_Pr)' being compiled with [ _Iter=QList<QString>::iterator , _RanIt=QList<QString>::iterator , _Diff=int , _Pr=bool (__cdecl *)(const QString &,const QString &) ] .\rpc_service_response_time_dialog.cpp(130) : see reference to function template instantiation 'void std::sort<QList<QString>::iterator,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled with [ _RanIt=QList<QString>::iterator , _Pr=bool (__cdecl *)(const QString &,const QString &) ] C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3051) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3052) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp) C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3053) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp) ---- in both rpc_service_response_time_dialog.cpp and wireshark_application.cpp so that we'll compile successfully. Change-Id: I457bcede99dcb1f3c1001f1f559c4901bb000357 Reviewed-on: https://code.wireshark.org/review/10533 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-13cmake: link against dl, fixes linking with goldPeter Wu1-0/+1
wsutil/filesystem.c uses dladdr (when available), but does not declare a dependency on it. Adding it fixes a CMAKE_C(XX)_FLAGS=-fuse-ld=gold build failure: run/libwsutil.so.0.0.0: error: undefined reference to 'dladdr' This change is somehow not necessary for autotools, just for cmake. Change-Id: I642a7d85f9c33541831262f930e73d1f47c58b60 Reviewed-on: https://code.wireshark.org/review/10906 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-12inet_v6def : fix warning: redundant redeclaration of 'inet_pton' ↵Alexis La Goutte1-1/+1
[-Wredundant-decls] Change-Id: I937a65378a62be50d3d0d2f4a049b8cd73c8875c Reviewed-on: https://code.wireshark.org/review/10951 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-11Remove duplicate transport ports from proto tree summaryJoão Valverde1-0/+1
Don't display duplicate ports if transport name resolution is not enabled (for UDP/TCP/DCCP). Also introduce col_append_port() to handle info column port display with name resolution in a uniform format. Change-Id: Icb8ac45f726b7c539b4534c62061473e9b582753 Reviewed-on: https://code.wireshark.org/review/10804 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-10-09nstime: fix -Wshift-negative-valuePeter Wu1-6/+2
Even if the result of the negative shift (in TIME_T_MIN) is not used because the signedness check happens before, it still causes a compile-time warning. Fix this by shifting on an unsigned value, then truncate by casting it. While at it, remove a "fix for broken SCO compiler", it might not apply to us (fingers crossed). Change-Id: Id9603149d8063e9eaaa65cf028323f10e60a6c42 Reviewed-on: https://code.wireshark.org/review/10862 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-05Move utf8_entities.h to wsutilJoão Valverde2-0/+64
Change-Id: I6298b3de5f0a1cb988014ff16082eaf8c2a3c3c0 Reviewed-on: https://code.wireshark.org/review/10786 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-09-02The official #define for 32-bit and 64-bit Windows is _WIN32.Guy Harris1-1/+1
It's _WIN32, with a leading underscore, not WIN32. See, for example: https://sourceforge.net/p/predef/wiki/OperatingSystems/ and https://msdn.microsoft.com/en-us/library/b0084kay.aspx *Some* environments may also define WIN32, but we shouldn't depend on that. Replace all-caps "WIN32" referring to Windows in comments and other text with "Windows" or "Win32". (The two are pretty much equivalent, these days; nobody much cares about Win16, not that we ever ran on it, and 64-bit Windows is just a 64-bitified Win32.) Change-Id: Id327bcd4b1e9baa4f27055eff08c2d9e594d6f70 Reviewed-on: https://code.wireshark.org/review/10367 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-26cmake: rework version.h handling to treat it like config.hJoerg Mayer1-2/+0
It wasn't working on my system: I kept seeing the old git revision in '...shark -v' even after deleting version.h Change-Id: I75f41a7afcee4b9384f33a56014e4af6b527fec5 Reviewed-on: https://code.wireshark.org/review/10265 Petri-Dish: Jörg Mayer <jmayer@loplof.de> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2015-08-18UDP multicast stream dialog.Gerald Combs1-0/+1
Add the UDP multicast stream dialog. Abuse TapParameterDialog a bit more so that we can edit parameters. Remove some unused struct members and an unused function. Change-Id: I962c70344e792f0959527e4bcba8a20bd7e8acf9 Reviewed-on: https://code.wireshark.org/review/10084 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-16Run abicheck commands at compile time.Gerald Combs1-2/+5
The CMake dumpbabi targets collectively copy over 800 files. Do that when when we build the actual targets instead of at configure time. Hopefully this will speed up initial CMake runs. Change-Id: I6e4d691e24c73ea05d638a0f897f570541c84e38 Reviewed-on: https://code.wireshark.org/review/10052 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-05[MSVC 2015] Compiler and visual studio version are off by 5 not 6 in MSVCAndersBroman1-2/+17
2015. Change-Id: I5476656789893af2c8aeb5dfe5cf06972fd8bd4b Reviewed-on: https://code.wireshark.org/review/9873 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-11terminate readlink resultTobias Stoeckmann1-6/+12
The readlink function does not guarantee to nul-terminate its result string. Therefore, it should be done in wsutil/filesystem.c. Change-Id: Id96533e825a302a1922ce9ac7ee47d5525ac9c39 Reviewed-on: https://code.wireshark.org/review/9597 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-07Next Windows Server version seems to be named Windows Server 2016 nowPascal Quantin1-1/+1
Change-Id: I31fb5495f5e17ccba1578a069ca33448a291923f Reviewed-on: https://code.wireshark.org/review/9539 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>