Commit Graph

108 Commits

Author SHA1 Message Date
Gerald Combs 451a241e50 Add c-ares to the required library list.
Although c-ares support was techically optional, it was either on by
default or required in all of our packaging. Go ahead and require it
globally. C-ares is widely available and synchronous name resolution can
easily result in a horrific user experience.

Change-Id: Id67c797316ed6b8a0ab5052e55a43a1b9e2a2464
Reviewed-on: https://code.wireshark.org/review/35188
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-23 22:45:59 +00:00
Alexander Gryanko 9fff62e2a8 Qt, http2: Add Follow HTTP/2 Stream functionality
The HTTP/2 protocol multiplexes a single TCP connection into multiple
independent streams. The Follow TCP output can interleave multiple
HTTP/2 streams, making it harder to analyze a single HTTP/2 stream.

Add the ability to select HTTP/2 Streams within a TCP stream.
Internally, the HTTP/2 dissector now stores the known Stream IDs in a
set for every TCP session which allows an amortized O(n) lookup time for
the previous/next/max Stream ID.

[Peter: make the dissector responsible for clamping the HTTP/2 Stream ID
instead of the Qt code, that should permit future optimizations.]

Change-Id: I5d78f29904ae8f227ae36e1a883155c0ed719200
Reviewed-on: https://code.wireshark.org/review/32221
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexander Gryanko <xpahos@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-09-22 05:29:30 +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
João Valverde 186f985793 CMake: Check for and use system SpeexDSP library
Change-Id: I8443379d23a2946dd21c12e5e0bd5464ab73ca25
Reviewed-on: https://code.wireshark.org/review/31857
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-05-02 21:12:01 +00:00
Peter Wu 5c4458345c Change maxmind_db_lookup_ipv4 to look more like maxmind_db_lookup_ipv6
Both functions accept an address in network byte order, but
maxmind_db_lookup_ipv4 does not accept a pointer. Add an indirection and
remove unnecessary memcpy calls. This removes some confusion for me.

Change-Id: I291c54c8c55bc8048ca011b84918c8a5d3ed1398
Reviewed-on: https://code.wireshark.org/review/31951
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:13:37 +00:00
Uli Heilmeier 061ebbda56 Fixing some implicit coversations (-Wshorten-64-to-32)
Fixing some "implicit conversion loses integer precision" warnings
reported by clang with -Wshorten-64-to-32 option

Change-Id: Icd641d5f4fd8ff129f03f1b9e1da0fc86329f096
Reviewed-on: https://code.wireshark.org/review/31901
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-08 12:12:18 +00:00
Dario Lombardo 4b42a45ebc sharkd: use json_dumper for output.
Change-Id: I457613ea154a86098f536b57844ad6606c595a46
Reviewed-on: https://code.wireshark.org/review/31035
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-01-07 18:19:12 +00:00
Dario Lombardo ce52cf4f8f sharkd: remove redundant cast.
Found by clang-tidy.

Change-Id: Ie02a77ffc17050743de216594d40faa65e1dabc2
Reviewed-on: https://code.wireshark.org/review/31336
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-03 23:36:20 +00:00
Guy Harris 2d41b15495 Add a "failed" return for tap packet routines.
This allows taps that can fail to report an error and fail; a failed
tap's packet routine won't be called again, so they don't have to keep
track of whether they've failed themselves.

We make the return value from the packet routine an enum.

Don't have a separate type for the per-packet routine for "follow" taps;
they're expected to act like tap packet routines, so just use the type
for tap packet routines.

One tap packet routine returned -1; that's not a valid return value, and
wasn't one before this change (the return value was a boolean), so
presume the intent was "don't redraw".

Another tap routine's early return, without doing any work, returned
TRUE; this is presumably an error (no work done, no need to redraw), so
presumably it should be "don't redraw".

Clean up some white space while we're at it.

Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8
Reviewed-on: https://code.wireshark.org/review/31283
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-01-01 05:03:42 +00:00
Michael Mann c10c7737cc Allow floating point values for stats_tree
Bug: 4234
Change-Id: Ibd59809b2dd9890a7851eb57ef7af384e280a74b
Reviewed-on: https://code.wireshark.org/review/31222
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-12-28 14:50:45 +00:00
Guy Harris 7eb3e47fa4 Try to squeeze some bytes out of the frame_data structure.
Make the time stamp precision a 4-bit bitfield, so, when combined with
the other bitfields, we have 32 bits.  That means we put the flags at
the same structure level as the time stamp precision, so they can be
combined; that gets rid of an extra "flags." for references to the flags.

Put the two pointers next to each other, and after a multiple of 8 bytes
worth of other fields, so that there's no padding before or between them.

It's still not down to 64 bytes, which is the next lower power of 2, so
there's more work to do.

Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe
Reviewed-on: https://code.wireshark.org/review/31213
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-27 04:34:29 +00:00
Peter Wu 049d746495 sharkd: update documentation for some requests to match reality
Align comments and add two fixup notes while at it.

Change-Id: I977c1a6e55712414f7af042cb215bac49926a019
Reviewed-on: https://code.wireshark.org/review/30742
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-21 04:35:41 +00:00
Peter Wu fb9c6905ef wsutil: rename some wsjson functions
Rename wsjson_unescape_json_string to json_decode_string_inplace
(inspired by the g_base64_decode_inplace name). Rename
wsjson_is_valid_json to json_validate (inspired by g_unichar_validate).

Ideally json_parse is inlined with its user (sharkd_session.c), but that
requires exporting the jsmn_init and jsmn_parse functions... Hence the
dependency on jsmn.h remains in wsjson.h.

Change-Id: I7ecfe3565f15516e9115cbd7e025362df2da5416
Reviewed-on: https://code.wireshark.org/review/30731
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-20 05:03:26 +00:00
Jakub Zawadzki 74d64ed27d sharkd: prefer sharkd_json_value_string() over sharkd_json_value_stringf().
Don't use sharkd_json_value_stringf() if there is no need for it.

Change-Id: Ie375be1d91fc3bd20fae68df282ec14310055eba
Reviewed-on: https://code.wireshark.org/review/30075
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-10-08 15:58:15 +00:00
Dario Lombardo ce03200f56 sharkd: remove compiler warning.
../sharkd_session.c: In function ‘json_puts_string’:
../sharkd_session.c:125:20: warning: array subscript has type ‘char’ [-Wchar-subscripts]
    fputs(json_cntrl[str[i]], stdout);

Change-Id: I03a07b8cb42692f636491fad9b15ac71ac0c03f4
Reviewed-on: https://code.wireshark.org/review/29883
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-28 04:34:42 +00:00
Jakub Zawadzki f3e5618eb0 sharkd: cast string to be encoded to unsigned char *.
It should fix warning reported by Stig:
[...]/wireshark/sharkd_session.c:125:20: warning: array subscript is of type 'char' [-Wchar-subscripts]
                        fputs(json_cntrl[str[i]], stdout);
                                        ^~~~~~~

Change-Id: I9352174223644394ba2bf76f10ff3bf6b6abcad5
Reviewed-on: https://code.wireshark.org/review/29877
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-28 04:34:22 +00:00
Jakub Zawadzki 39791a55a8 sharkd: fix JSON generation
Fix JSON generation:
- add lookup table to encode all required control characters (0x00 - 0x1F),
- don't output comma just after opening object in iograph.

Change-Id: Ib53af9c37f4d7785cafc5f9a8d0e71b214c7f349
Reviewed-on: https://code.wireshark.org/review/29852
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-09-26 12:41:39 +00:00
Jakub Zawadzki 4ea91f2aee sharkd: cleanup printf() usage during JSON generation (part V).
Replace remaining printf()s.

Change-Id: I42e2e7f0cbc70612eea80efc0b5831702fc7ec7d
Reviewed-on: https://code.wireshark.org/review/29830
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-09-25 18:15:06 +00:00
Jakub Zawadzki 933de9fdbf sharkd: cleanup printf() usage during JSON generation (part IV).
Many printf()s generates only key, value is generated by
json_puts_string() or json_print_base64().

Add helper functions sharkd_json_value_string, sharkd_json_value_base64
to generate key with a string, or base64 as a value.

It lower number of printf() from 156 to 105 (32% reduction).

Change-Id: I22901d9759534a4fab7bcdefd66242fd6c5b20cc
Reviewed-on: https://code.wireshark.org/review/29821
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-09-25 10:05:14 +00:00
Jakub Zawadzki 5507d1b344 sharkd: cleanup printf() usage during JSON generation (part III).
Most of sharkd printf()'s are used to output formatted value with given key.
Add two formatting-function helpers: sharkd_json_value_anyf and sharkd_json_value_stringf.

Conversion printf to these function lower number of printf() from 300 to 156 (48% reduction).

Change-Id: Ied538cc5b84d48d942e2140ff6b93969579d6132
Reviewed-on: https://code.wireshark.org/review/29816
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-09-25 08:39:07 +00:00
Jakub Zawadzki 1c0d066e10 sharkd: cleanup printf() usage during JSON generation (part II).
Lot of printf()s in sharkd are caused from:
 - opening array with a key, like: printf(",\"eo\":[");
 - opening object with comma separator, like: printf("%s{", i ? "," : "");

Add argument to sharkd_json_{array,object}_open() to specify if there need to be a separator,
and key argument to sharkd_json_array_open().

Replace printf() with these functions.

This change lower number of printf() from 365 to 300 (17% reduction).

Change-Id: Id84259ae0fed47d9d7d84709e554a03c97d6ed98
Reviewed-on: https://code.wireshark.org/review/29811
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-09-24 19:38:59 +00:00
Jakub Zawadzki 95cf63f4d7 sharkd: cleanup printf() usage during JSON generation (part I).
Lower number of printf()s by adding some function wrappers.

Replace:
  printf("]");   with  sharkd_json_array_close();
  printf("}");   with  sharkd_json_object_close();
  printf("\[");  with  sharkd_json_array_open();
  printf("{");   with  sharkd_json_object_open();

These replaces lower number of printf() from 434 to 365 (15% reduction).

Change-Id: I44f2244a7c1f8992a38c56c64759ed039aafaedc
Reviewed-on: https://code.wireshark.org/review/29809
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-09-24 17:43:22 +00:00
Jakub Zawadzki ab26fa7757 sharkd: fix setting last reference frame number.
Change-Id: Ia1f60dbe9dfbbceff06a586bcfed68c8f848a390
Reviewed-on: https://code.wireshark.org/review/29802
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-09-24 09:15:42 +00:00
Jakub Zawadzki c5416e9b23 sharkd: add field checking in check request.
Change-Id: I5467dda6eaa931e0648ce178bf6412fcd1b9661c
Reviewed-on: https://code.wireshark.org/review/29801
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-09-24 08:21:16 +00:00
Jakub Zawadzki 1847b7d309 sharkd: minor code style fixes.
Change-Id: I0cb87f124fb9cb377250adab125a593ddcd9ba44
Reviewed-on: https://code.wireshark.org/review/29799
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-24 04:07:16 +00:00
Jakub Zawadzki a76d4da8bf sharkd: Fix check request for empty "" filter
For empty filters dfilter_compile() return success but with NULL dfcode.
NULL dfcode cannot be used in dfilter_deprecated_tokens().

Request: {"req":"check","filter":""} was crashing sharkd.

Change-Id: Id677fc84251ab27bf691ec8aaee4c5bdf55e4d6c
Reviewed-on: https://code.wireshark.org/review/29797
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-09-23 20:49:32 +00:00
Jakub Zawadzki 3ce847e39e sharkd: Fix frames request for empty "" filter
For empty filters dfilter_compile() return success but with NULL dfcode,
still if used dfilter_prime_proto_tree() crashed cause of NULL df pointer.

Change-Id: I0684abf8ef766a24d0c8150fef4e113813c490ea
Reviewed-on: https://code.wireshark.org/review/29390
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Michal Labedzki <michal.labedzki@wireshark.org>
2018-09-02 11:23:30 +00:00
Michał Łabędzki a7b56fff7e sharkd: Add support for hidden and generated fields
New json option for frame request to output hidden fields:
"hidden": true

Output has two new optional keys: "g" for generated fields and
"v" for hidden fields.

Change-Id: If51fa5601c1193a03fff378bbe37dc9ab8f5e66d
Reviewed-on: https://code.wireshark.org/review/28955
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-09 04:59:22 +00:00
Michał Łabędzki a0814af296 sharkd: Return frame's color-filter colors
Return color-filter bg/fg colors for single frame if requested.
Also return marked/ignored fields for frame.

Change-Id: I4480b733f54991c72bea1664fa6e7337812e6231
Reviewed-on: https://code.wireshark.org/review/28304
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
2018-08-04 13:26:05 +00:00
Guy Harris 9b731e2b32 Add a tap "finish" callback, called when a listener is removed.
Change-Id: Ic6c23dbd39d1adf8f730f1c866e409f731947475
Reviewed-on: https://code.wireshark.org/review/28786
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-21 00:51:13 +00:00
Peter Wu c40c26c04c Follow Stream: ensure linear performance with many packets
Reverse the payload chunks list to achieve a running time of O(n) rather
than O(n²) for insertion of all chunks. Executing a RelWithDebInfo+ASAN
build with `tshark -r chargen-session.pcapng.gz -qz follow,tcp,hex,0`
previously took 11m5s to complete, but now finishes in 16 seconds.

Tested using a capture file with 152k TCP packets (from bug 11777).
Backport note: must update ui/gtk/follow_stream.c too.

Change-Id: Icf70d45f33d4399e53209fb6199d3809608c8d99
Reviewed-on: https://code.wireshark.org/review/28595
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-06 07:24:46 +00:00
Jiri Novak 3937f65e67 RTP: If multiple codecs are used in RTP stream flow, all are shown in codecs column
Change-Id: Ica8b3bc2b6b59790805764ec88c6f4e3f8689a85
Reviewed-on: https://code.wireshark.org/review/28435
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-06-28 00:46:39 +00:00
Jiri Novak d752f518cd RTP: Stats calculation unification
Changes:
    - rtpstream_info_calc_t created
    - rtpstream_info_calculate and rtpstream_info_calc_free functions created
    - RTP code updated to use such functions

Change-Id: I1053a46cbd0cdef9d70382135da46e732b5af8b8
Reviewed-on: https://code.wireshark.org/review/28361
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-21 13:34:09 +00:00
Jiri Novak 1b4b5e59e9 RTP: Encapsulation of comparsion of two rtpstreams
Changes:
- rtpstream_id_t is introduced and its related functions. It encapsulates comparsion of two rtpstreams.
- dest_* renamed to dst_*
- src_port and dst_port are 16bits only.
- sharkd_session.c use common id functions
- IAX2 part related to RTP updated to common *id* function

Change-Id: Id38728a4e5d80363480c7ce42ff9c6eaad069686
Reviewed-on: https://code.wireshark.org/review/28340
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-20 08:26:31 +00:00
Jiri Novak 27a1906c58 RTP: Code clean up
Changes:
- rtpstream_packet renamed to rtpstream_packet_cb to follow *_cb pattern
- variables/types used in iax2_analysis_dialog were created as copy of *rtp* ones, but names were left as *rtp* -> *iax2*
- struct _rtp_stream_info replaced with rtp_stream_info_t
- there was tap-rtp-analysis.h, but no tap-rtp-analysis.c - related content was moved from tap-rtp-common.c
- *rtp_stream* functions renamed to *rtpstream*
- renamed rtp_stream_info_t to rtpstream_info_t to follow *rtpstream* pattern.
- renamed ui/rtp_stream.c rtpstream_draw -> rtpstream_draw_cb

Change-Id: Ib11ff5367cc464ea1b0c73432bc50b0eb9cd203e
Reviewed-on: https://code.wireshark.org/review/28299
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-19 15:05:12 +00:00
Pascal Quantin 045f2aa173 sharkd_session.c: fix a size_t to int conversion warning emitted by MSVC2017 x64
Change-Id: I156e28359bd347e580966ea706884ab04e56d7f1
Reviewed-on: https://code.wireshark.org/review/27961
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-02 22:27:41 +00:00
Jakub Zawadzki de447c1544 sharkd: add support for io graph.
Change-Id: I8d23a2b55024e2ef8c644dcef9176c7e3050a703
Reviewed-on: https://code.wireshark.org/review/27376
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-31 18:43:50 +00:00
Guy Harris afad14dcfe Get rid of some GTK+-only stuff.
Change-Id: I85806476246a567f747e3911e3d15716e9cfe06b
Reviewed-on: https://code.wireshark.org/review/27514
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-13 20:21:14 +00:00
Guy Harris 3a0dd69d04 Get rid of some GTK+-only stuff.
Change-Id: I841a1cdb637f37673466e4d065474c0f7e2dfc56
Reviewed-on: https://code.wireshark.org/review/27512
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-13 19:46:45 +00:00
Guy Harris fb877ef5da Get rid of some GTK+-only stuff.
Change-Id: I6c14429d4d473464ad7bea18dee07c3adf34664d
Reviewed-on: https://code.wireshark.org/review/27479
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-12 23:01:14 +00:00
Pascal Quantin 7782cb8688 sharkd: fix IPv4 GeoIP lookup
maxmind_db_lookup_ipv4() expects an address in network byte order

Change-Id: Iaff404e370d8a171fa27bf63cb3d827863e6b0ac
Ping-Bug: 14656
Reviewed-on: https://code.wireshark.org/review/27390
Reviewed-by: Christopher Maynard
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-08 13:29:23 +00:00
Jakub Zawadzki 5cdff26107 sharkd: support for MaxMindDB.
Call maxmind_db_lookup_process() [via host_name_lookup_process()] before processing request.
It's still buggy, webshark needs a refresh to show endpoint or conversation ipmap,
but it's better than nothing.

It seems to need refresh, cause maxmind_db_lookup_ipv[46] works only for cached entries.

Also cause mmdbresolve is pipe-based, every sharkd need to have it own mmdbresolve process.

Change-Id: I3d588d1fa9e9ba645cc3d0bff3d276b202159d21
Reviewed-on: https://code.wireshark.org/review/27335
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2018-05-06 09:22:25 +00:00
Dario Lombardo 57fee051c6 wsutil: rename wsjsmn to wsjson.
This puts more distance between the caller and the underlying
library. At the moment we're using libjsmn, but other libraries
(like json-glib) could be used.

Change-Id: I1431424a998fc8188ad47b71d6d95afdc92a3f9e
Reviewed-on: https://code.wireshark.org/review/27055
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-21 07:13:31 +00:00
Anders bb81bef535 glib: Get rid of GLIB_CHECK_VERSION as we now require 2.32.0
Change-Id: Ie95cf37f9cd283545693e290340a7489cc989c95
Reviewed-on: https://code.wireshark.org/review/26970
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 16:07:46 +00:00
Gerald Combs 13e7c1229d Migrate sharkd to MaxMindDB.
Convert the IPv4 and IPv6 GeoIP lookups to their MaxMindDB equivalents.

Change-Id: I7f6bd697e7d4b09fdd1f4bfa17011fc6ea1aec26
Reviewed-on: https://code.wireshark.org/review/26446
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-14 06:17:35 +00:00
Guy Harris 7df07eb922 Print the right value for signed statistics tap table items.
Thanks and a tip of the Hatlo hat to Visual Studio Code Analysis for
finding this one.

Change-Id: If2312ba98d1c3060e525dd8b2afe3e0ff07fb5bd
Reviewed-on: https://code.wireshark.org/review/26194
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-28 21:55:39 +00:00
Guy Harris 9efce5c916 Don't unnecessarily cast away constness.
Change-Id: Ia7e6f55d4398ec2d1d35f3dc4ef5ff0c51b9746d
Reviewed-on: https://code.wireshark.org/review/25959
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-21 08:20:39 +00:00
Guy Harris c61b543e97 Get rid of more new_ prefixes for statistics functions and types.
There are no "old" versions of them that we're keeping around.

Change-Id: I3c76a14d0ec1a06df39c547da37f4dea9987df4d
Reviewed-on: https://code.wireshark.org/review/25892
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-19 00:12:51 +00:00
Guy Harris 1f5f63f8ef Generalize wtap_pkthdr into a structure for packet and non-packet records.
Separate the stuff that any record could have from the stuff that only
particular record types have; put the latter into a union, and put all
that into a wtap_rec structure.

Add some record-type checks as necessary.

Change-Id: Id6b3486858f826fce4b096c59231f463e44bfaa2
Reviewed-on: https://code.wireshark.org/review/25696
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-09 00:29:51 +00:00
Dario Lombardo 8cd389e161 replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
The first is deprecated, as per https://spdx.org/licenses/.

Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 14:57:36 +00:00