Commit Graph

414 Commits

Author SHA1 Message Date
Guy Harris 272502790b Add FT_STRINGZTRUNC.
FT_STRINGZPAD is for null-*padded* strings, where the field is in an
area of specified length, and, if the string is shorter than that
length, all bytes past the end of the string are NULs.

FT_STRINGZTRUNC is for null-*truncated* strings, where the field is in
an area of specified length and, if the string is shorter than that
length, there's a null character (which might be more than one byte, for
UCS-2, UTF-16, or UTF-32), and anything after that is not guaranteed to
have any particular value.

Use IS_FT_STRING() in some places rather than enumerating all the string
types, so that those places get automatically changed if the set of
string types changes.
2020-09-12 14:16:12 -07:00
Gerald Combs 7ab6440416 Tools: Clean up checkAPI and add ui/qt.
Remove the --check-addtext and --build flags. They were used for
checkAddTextCalls, which was removed in e2735ecfdd.

Add the sources in ui/qt except for qcustomplot.{cpp,h}. Fix issues in
main.cpp, rtp_audio_stream.cpp, and wireshark_zip_helper.cpp.

Rename "index"es in packet-usb-hid.c.
2020-09-05 07:41:29 +00:00
Thomas Wiens babbe57a1a ftype-time: Use time zone from hfinfo->display
Change-Id: Ib062a812d21b9e2e800bec78417194313fd3b8b4
Reviewed-on: https://code.wireshark.org/review/37938
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-23 21:49:33 +00:00
Joerg Mayer 09d16a64ab Get rid of some unnecessary string operations
Change-Id: I5e92ed52616dd7eb0837228abc5c3975d7f9228b
Reviewed-on: https://code.wireshark.org/review/34734
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-10-08 22:10:25 +00:00
Guy Harris 22e7952e06 HTTPS In Even More Places, update some links.
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-28 04:21:18 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
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-07-26 18:44:40 +00:00
Guy Harris ff3122a660 Fix -Wpointer-sign warning.
Change-Id: I8e74e90f1383f01633343cd6e72ac2193bfb3e04
Reviewed-on: https://code.wireshark.org/review/34029
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-20 19:02:34 +00:00
Michael Mann e797e75174 Include epan header files in VS solution.
Add header files lists to add_library() so that Visual Studio can pick them
up and include them in a "Header Files" folder for easier navigation within
Visual Studio.

Change-Id: I7cd8e39550f4db67eed8205593060ae8b4a5b1b9
Reviewed-on: https://code.wireshark.org/review/31289
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-02-18 00:49:51 +00:00
Peter Wu 0ca65a66f4 Fix crash when using the "matches" operator on non-UTF-8 data
GRegex is a thin wrapper around PCRE. Inputs (patterns and subjects) are
assumed to be UTF-8 by default (unless G_REGEX_RAW is set). If the
subject is not valid UTF-8, normally pcre_exec will immediately return a
failure. However, as GLib sets PCRE_NO_UTF8_CHECK when G_REGEX_RAW is
given, pcre_exec() will skip the safety check and crash instead.

Fix this by always assuming raw byte patterns. Regression risk: patterns
such as `ö.ï` will no longer match `öñï` since `ñ` is a multi-byte
sequence. Patterns such as `(GET|POST) /` remain functional though.

Bug: 14905
Change-Id: I6450bb83f565d377f82a5dbb01690c5f49acd96f
Reviewed-on: https://code.wireshark.org/review/31935
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:08:53 +00:00
Peter Wu 23a1b085ff ftypes: make conversion of FT_DOUBLE to string locale-independent
Use a locale-independent glib routine to format floating point numbers.
This avoids displaying floating point numbers as "86399,9921875" with
LC_ALL=nl_NL.UTF-8.

This output is consistent with val_from_unparsed which is used for
parsing display filter values and is already locale-independent. Note
that the displayed node labels in the dissection tree is still
locale-dependent (see proto_item_fill_label for FT_DOUBLE).

Bug: 15437
Change-Id: I64dd2b7dbb453022edf88b3052e2f67066189427
Reviewed-on: https://code.wireshark.org/review/31869
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-04 17:36:53 +00:00
João Valverde c2eddffb84 CMake: Fix DOCDIR on Unix
User guides are installed to doc/Wireshark. Use doc/wireshark instead.

Remove leftover variable CPACK_PACKAGE_NAME.

Change-Id: I9a1d6bdc7d8f0b48c61e43679285d5ba83904a63
Reviewed-on: https://code.wireshark.org/review/31851
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-02-02 16:53:49 +00:00
Peter Wu a946eb3141 ftype-time: parse the month independent of the locale
Do not rely on strptime("%b") to parse the month, it does not correctly
recognize English month abbreviations on non-English systems. While at
it, do not try to parse milliseconds if seconds are missing.

Change-Id: Ia049bf362195eef1eba2f04ff7217049fa6a7d9d
Reviewed-on: https://code.wireshark.org/review/31707
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-24 09:20:10 +00:00
Dario Lombardo 48a00fd556 ftype: rework val_from_unparsed to avoid double free.
Found by scan-build.

Change-Id: I07e8bf2099e08f3f544dd846572717044aa95f7c
Reviewed-on: https://code.wireshark.org/review/31487
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-12 23:39:54 +00:00
Gerald Combs 8c22c5bade Fix some spelling errors found by Lintian.
Change-Id: If6fc3aab7ad4fc634567121f7b9541bc6f6c5766
Reviewed-on: https://code.wireshark.org/review/30926
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-12-05 18:58:19 +00:00
João Valverde 65c13f9b90 Install development headers on all platforms
Install headers to support plugins development on Windows.

Change-Id: I3161bd2f730edf62ab44fee6ce4fedbb9aee0d31
Reviewed-on: https://code.wireshark.org/review/30776
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-11-24 13:48:16 +00:00
Pascal Quantin 4a5812aca2 Revert "FT_BYTES: fix dissection of FT_BYTES when using SEP_SPACE and "NONE" options"
This reverts commit 0457e60419.

Change-Id: Id39722872efbe98648754d7543da7ae5b08f8b67
Reviewed-on: https://code.wireshark.org/review/30451
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-11-01 07:49:02 +00:00
Jeremy Martin 0457e60419 FT_BYTES: fix dissection of FT_BYTES when using SEP_SPACE and "NONE" options
SEP_SPACE and BASE_NONE both default to colon (:).  Fix SEP_SPACE and add SEP_NONE

Bug: 15253
Change-Id: Ib5db997714414370b08ffb9458c73d4aeef6aacf
Reviewed-on: https://code.wireshark.org/review/30447
Reviewed-by: Jeremy Martin <boardermartin@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-01 06:25:31 +00:00
Peter Wu 8c31cdc13c ftype-protocol: do not return from TRY/CATCH
TRY/CATCH are macros, before returning the ENDTRY block must be executed
or the weirdest crashes can occur.

Change-Id: Ic56871322f8567263e2b8a81cce5a3c7042301b7
Fixes: v2.1.0rc0-2939-g5493fe0167 ("Convert ftype-tvbuff.c to ftype-protocol.c")
Reviewed-on: https://code.wireshark.org/review/30095
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-10 04:03:15 +00:00
João Valverde e0babef797 epan: add more IS_FT_* macros
The existing macros retain their value.

Change-Id: I55ab0113792edc2bb28e4ef4424669e092d811fa
Reviewed-on: https://code.wireshark.org/review/29400
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-02 22:58:36 +00:00
Guy Harris bb47336086 Make white space consistent.
Change-Id: I19053ecc53b7f0d2b4dfb0462f381f7d28bb578a
Reviewed-on: https://code.wireshark.org/review/28502
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-28 07:32:08 +00:00
Erika Szelleova df9cd64550 character constant in dfilter now must fit into one byte
The value of a string in single quotes in dfilter must fit into one
  byte. The parser correctly parsed the beginning of the string,
  however it didn't check whether there are more characters to parse.

Bug: 14084
Change-Id: Ifa2d7a31052b2c1020d84c42637b9b7afc57d8c0
Reviewed-on: https://code.wireshark.org/review/28298
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-17 21:16:13 +00:00
Peter Wu 69e2603c48 ftypes: fix memleak when converting protocol values
When converting byte array strings to a FT_PROTOCOL value (for example,
when using a display filter such as `eth contains aa:bb`), the converted
memory in GByteArray was not freed. If an error occurred (the value
cannot be parsed as hex string), then an error message was leaked.

Fix the above issues and avoid an unnecessary g_memdup.

Change-Id: I3a076b3a2384b1a0e15ea8518f2e0f66a7b6ea49
Reviewed-on: https://code.wireshark.org/review/27130
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-25 06:55:52 +00:00
Dario Lombardo 4a156da068 Remove autotools build system.
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-18 03:46:17 +00:00
Dario Lombardo fe71e26af2 spdx: more licenses converted.
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-03-07 15:56:44 +00:00
Dario Lombardo 55c68ee69c epan: use SPDX indentifiers.
Skipping dissectors dir for now.

Change-Id: I717b66bfbc7cc81b83f8c2cbc011fcad643796aa
Reviewed-on: https://code.wireshark.org/review/25694
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 19:29:45 +00:00
Martin Mathieson 52365a55e4 LTE L2 protocols: add FT_FRAMENUM_TYPE for most FT_FRAMENUM fields.
Missed out some that would probably result in too many links.
Added FT_FRAMENUM_RETRANS_PREV and FT_FRAMENUM_RETRANS_NEXT to enum,
these display as arrows like REQUEST and RESPONSE do.

Change-Id: I6e8d222955f2ba59a713e8a389837b55a1c7f262
Reviewed-on: https://code.wireshark.org/review/24600
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2017-11-29 21:21:09 +00:00
Peter Wu 3c6cb2f856 cmake: match include directories with autotools
Match closer the behavior of autotools which does not include epan in
its include paths by default.

Change-Id: I885bc7942490a5674c6ac75f9a8ea221555e3784
Reviewed-on: https://code.wireshark.org/review/24639
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-29 06:58:22 +00:00
João Valverde 1097e8020a autotools: Library build products don't need explicit cleaning
Change-Id: I5d68c05f2844d6c9ae486531b189dbf10bc09cff
Reviewed-on: https://code.wireshark.org/review/24484
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-18 22:29:41 +00:00
Guy Harris 0de8c6f4c7 FT_IPv4 fields' values are 4-byte integers, not structures with a pointer.
Fix a tpyo while we're at it.

Change-Id: I1bde763ec2bd188c0f8afd1069db5a9f23963e8e
Reviewed-on: https://code.wireshark.org/review/24186
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-30 18:29:00 +00:00
Guy Harris bbae1d25c2 Fix indentation.
Change-Id: I0cc9d31cbe5dc7a95908a43c093f62e13b969eec
Reviewed-on: https://code.wireshark.org/review/24185
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-30 18:00:33 +00:00
Pascal Quantin 9008d7f867 Fix assert when trying to display an IPv4 address
Follow-up of gdd1c18dd

Change-Id: Ifa6fc2e68f866540184a29a5fb61c3b7033bc8b2
Reviewed-on: https://code.wireshark.org/review/24180
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-10-30 09:42:58 +00:00
Guy Harris dd1c18dd03 Make FT_IPv4 a bit more like FT_IPv6.
FT_IPv6 doesn't expose the prefix, which is used only for values in
filter expressions, not values in protocol fields; do the same for
FT_IPv4, hiding the netmask, and using fvalue_get_integer() to get the
value, having it return a network-byte-order value for the address.

(This also makes it opaque whether the address and netmask are stored in
host or network byte order.)

Change-Id: I4285a87f6ccef2c0ccec040490ddcd15d787326e
Reviewed-on: https://code.wireshark.org/review/24177
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-30 01:40:13 +00:00
Guy Harris 734c5b35a5 Get rid of ipv4_get_net_order_addr() and ipv4_get_host_order_addr().
Just directly use the addr field, converting from host to network byte
order if necessary.

Change-Id: Ie1cd9ea5527b7824014dc315225ad2a6adb61c38
Reviewed-on: https://code.wireshark.org/review/24176
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-30 00:50:06 +00:00
Guy Harris e1ef732c11 Get rid of MAX_IP_STR_LEN and MAX_IP6_STR_LEN.
We have WS_INET_ADDRSTRLEN and WS_INET6_ADDRSTRLEN; use them.

Change-Id: Idade0da9fae70d891901acd787b06d21e2ddbc5f
Reviewed-on: https://code.wireshark.org/review/24156
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-29 05:51:25 +00:00
Guy Harris 859405fd2d Swallow up the stuff from epan/ipv4.c into epan/ftypes/ftype-ipv4.c and epan/ipv4.h.
Most of it doesn't need to be public; pull it into epan/ipv4.c.  Pull
the two routines that *are* used outside epan/ftypes/ftype-ipv4.c into
epan/ipv4.h as static inline functions.

This allows some optimization, and makes epan/ipv4.h more like epan/ipv6.h.

Change-Id: I80229acde559d810aecec2acd5c995076440c181
Reviewed-on: https://code.wireshark.org/review/24071
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26 07:03:43 +00:00
João Valverde 9764cd0a83 autotools: make maintainer-clean should allow rerunning 'configure'
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-15 14:17:20 +00:00
João Valverde 9bba3866ff CMake: Allow user build flags to override default build flags
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-10-13 21:32:18 +00:00
Michael Mann d8d60b4980 Add ENC_VARINT_PROTOBUF
Encoding of integer datatypes of Protocol buffers
https://developers.google.cn/protocol-buffers/docs/encoding

Change-Id: I9f6d65ddca099c15c0634984e9394131f98d35a9
Reviewed-on: https://code.wireshark.org/review/23813
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-09 11:31:19 +00:00
Alexis La Goutte 1df866d99e ftypes(.h): fix indent (use tabs)
Change-Id: Ic824910d4ec8c9987e8deec8d61809feb9849b9b
Reviewed-on: https://code.wireshark.org/review/23863
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-08 13:31:38 +00:00
João Valverde 21d2158a0b CMake: Initial work to install headers for the benefit of plugins
To be continued incrementally to fix gaps and omissions.

If we are willing to reorganize the source tree to have one or two header
include folders this could be simplified considerably.

It would also force developers to give more consideration to API issues,
which is a good thing.

See also e7ef19efc0.

Bug: 14062
Change-Id: I0759da2f9793cfb5cf92c9e231457bba43df4353
Reviewed-on: https://code.wireshark.org/review/23548
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-09-17 07:22:16 +00:00
João Valverde e7ef19efc0 autotools: Initial work to install headers for the benefit of plugins
Install public headers required to build plugins for libwireshark (taps and
dissectors).

The source tree is organized to serve the CLI/GUI parts of wireshark.
Plugins are built in tree. This change is intende to allow plugins to be built
out-of-tree but we want to avoid dumping all headers into /usr/include.

To be continued incrementally to fix errors and omissions.

Change-Id: Iaa0def0ba3de4b456a29114c315544d2d64fa748
Reviewed-on: https://code.wireshark.org/review/23374
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-09-15 10:11:55 +00:00
Michael Mann 2b0e08378f Allow distinction between bitmasked 32bit and 64bit unsigned integers in proto_tree_set_representation_value.
IS_FT_UINT includes both 32 and 64 bit unsigned integers, but fvalue_get_uinteger
only allows 32-bit values, so add IS_FT_UINT32 macro for distinguishing between
using fvalue_get_uinteger and fvalue_get_uinteger64.

All other cases that use fvalue_get_uinteger vs fvalue_get_uinteger64 are done
first with switch statements and don't rely on IS_FT_UINT to distinguish
between 32 and 64 bit values

Bug: 14063
Change-Id: I9d1400259e7c2661c2b5ebf96aaa0e9d773651fe
Reviewed-on: https://code.wireshark.org/review/23528
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-14 02:13:05 +00:00
João Valverde 55724db3db Remove dead code for address reverse-mapping
Removed get_ipxnet_addr(), get_ether_addr(). If this feature is desired at
a minimum it should use an efficent data structure (and no disk-based
lookups mid-dissection).

Change-Id: Ie72449c631f21f4a3d82ec435bb5e1d7892f122c
Reviewed-on: https://code.wireshark.org/review/22729
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-07-20 19:07:13 +00:00
Gerald Combs 7d67af661a Make "matches" case-insensitive.
Make the "matches" operator case-insensitive by default. Case
sensitivity can be switched back on using "(?-i)".

It might be nice to make "contains" case-insensitive as well, but we'd
need a caseless version of epan_memmem.

Change-Id: I5e39a52c148477c30c808152bcace08348df815a
Reviewed-on: https://code.wireshark.org/review/22330
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: Anders Broman <a.broman58@gmail.com>
2017-06-22 19:32:06 +00:00
Silvio Gissi c9c9d558b2 IPv4/IPv6 display filter fixes and testing
Removed 'len' from IPv4, not needed
Added more test coverage for IPv6 in dftestlib

Change-Id: I1ca80e2525f32f6095ad73352baba733f4694ced
Reviewed-on: https://code.wireshark.org/review/22260
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-20 13:56:28 +00:00
Silvio Gissi d386a6cfb1 Added IPv4 byte slicing
Change-Id: I3bdca418801305d71b33fa07396497d82ad06e33
Reviewed-on: https://code.wireshark.org/review/22212
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-19 10:08:14 +00:00
Pascal Quantin a967ca5074 Fixes for sfloat_ieee_11073_val_to_repr() function
- when having a special value, leave function once buffer is written
- give the right buffer length to g_snprintf() function

Bug: 13590
Change-Id: Iecf1456686b6e92a7cfcf8ed6d8619541ad50ace
Reviewed-on: https://code.wireshark.org/review/21260
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
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>
2017-04-21 02:08:25 +00:00
Guy Harris 75d40599b0 No need to include <epan/packet.h> in <epan/ftypes/ftypes-int.h>.
It's sufficient to include <epan/proto.h>...

...as long as <epan/proto.h> includes <epan/tfs.h>, just as it includes
<epan/value_string.h>.

And, since it's already including <epan/value_string.h>, it doesn't need
to have a definition of struct _value_string as an incomplete type,
given that <epan/value_string.h> gives a definition of it as a complete
type.

Change-Id: Ic296bc0b0d68277ba7e0569412b780fd847ecca2
Reviewed-on: https://code.wireshark.org/review/21033
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-12 11:29:06 +00:00
Martin Kaiser 2d0ae39bd6 ftypes: move get_value_ptr into the union
Delete get_value_ptr from struct _ftype_t, make it
part of the get_value union.

Change-Id: I947331069662a7043bd838e622d286629cc7be9a
Reviewed-on: https://code.wireshark.org/review/20647
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-20 17:01:10 +00:00
Martin Kaiser c258b6b056 ftypes: move get_value_uinteger into the union
Delete get_value_uinteger from struct _ftype_t, make it
part of the get_value union.

Change-Id: I4a6c8341676c442e2bf8ae3b8f771b72161d133c
Reviewed-on: https://code.wireshark.org/review/20640
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-20 01:28:42 +00:00