Improve LCAF handling

Also, remove some more proto_tree_add_text() occurrences.

Change-Id: Ie46e16308b95f190229c22d06c5235ea3464394a
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1317
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Fix counting/ checking for leap years in mktime_utc()

When HAVE_TIMEGM is undefined mktime_utc() might output one day shift (+86400s)
for (years <= 1967 or years >= 2100) && month >= 3

{ .tm_mday = 1 .tm_mon = 2 .tm_year = 67 }
mktime_utc() = -89436590    // Thu Mar  2 00:00:00 UTC 1967
    gmtime() = -89596800    // Wed Mar  1 00:00:00 UTC 1967

{ .tm_mday = 1 .tm_mon = 2 .tm_year = 200 }
mktime_utc() = 4107628800   // Tue Mar  2 00:00:00 UTC 2100
    gmtime() = 4107542400   // Mon Mar  1 00:00:00 UTC 2100

Change-Id: I1a544762fa5178c8798496d7dc30a2e767919149
Reviewed-on: https://code.wireshark.org/review/1287
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Fix Warning: Found soft-deprecated APIs in epan/dissectors/packet-lisp.c: tvb_length

and also fix warning found by fix-encodings-args

Change-Id: I20193d9f2700e8ede439dcc848390ff7672239b3
Reviewed-on: https://code.wireshark.org/review/1318
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Fix warning: extra ‘;’ [-Wpedantic]

Change-Id: Ib2f52d28dce0f64bf56ff0df7b4ed7d091670620
Reviewed-on: https://code.wireshark.org/review/1319
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Fix packet-ospf.c:1181:33: warning: code will never be executed [-Wunreachable-code] found by Clang with extra compiler flags

Change-Id: Ia08e01eee4b0829074f65d50c6ba51ef32dc64b9
Reviewed-on: https://code.wireshark.org/review/1320
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Fix packet-netlink-sock_diag.c:653:4: warning: code will never be executed [-Wunreachable-code] found by Clang with extra compiler flags

Change-Id: Ie3917cee669cfe71f0967e132dd73145a55f0aad
Reviewed-on: https://code.wireshark.org/review/1321
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Fix packet-ospf.c:1181:33: warning: code will never be executed [-Wunreachable-code] found by Clang with extra compiler flags

Change-Id: I6a923d85cb5cc947a7e96c1845bde72059d92118
Reviewed-on: https://code.wireshark.org/review/1322
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Adding two well known OAM related multicast address ranges.

Change-Id: I8fb840e7422b5fe7cd3072d8332de659598ebd3d
Reviewed-on: https://code.wireshark.org/review/1313
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Add support for Geo Coordinates LCAF type

Additionally, improve the way LCAF top-level tree item shows details
from the information gathered later, including for AFI List LCAF types.
For someone interested just in the summary from an LCAF type, this can
save one or two clicks opening subrees.

Change-Id: I40ea05ddf922bcb2a2a934f5e791f87133ca32cc
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1323
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Fix warning: declaration of 'address' shadows a global declaration.

Change-Id: I0be594aca0e8fac3c55492f6c168b0b8c13e63e5
Reviewed-on: https://code.wireshark.org/review/1324
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Improve Instance ID LCAF type handling

Change-Id: I66b1f4746b67ff88c56c4127647c4baa2d504a93
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1325
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Consistently use the macro PROTO_REGISTRAR_GET_NTH in proto.c

Change-Id: Iecfdd9463bec7958e8ede764bf5e09f6c29ac895
Reviewed-on: https://code.wireshark.org/review/1326
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Convert "4 space tabs" to spaces;
Add editor modelines.

Change-Id: I360a557a1e9753c4ae7ab95213aa8d44000f7dfd
Reviewed-on: https://code.wireshark.org/review/1335
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Cleanup "excess" from trying to support sequence of "native types".  Last installment of bug 9532.

Cleaned up wireshark_gen.py so that it no longer generates duplicate fields and greatly minimized the number of useless hf_ variables generated.

Change-Id: I26b2ddb5b65fcde99787cc2771348aa1b37f919f
Reviewed-on: https://code.wireshark.org/review/1329
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Move mktime_utc() from tvbuff.c to wsutil/time_util.c

Also do little cleanup in mktime_utc (one big #ifndef)

Change-Id: I8f721ba76cad856cfef0a2d78e7f98686f8e4e3f
Reviewed-on: https://code.wireshark.org/review/1327
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Move GSM guint8 to unicode conversion functions to charsets.c

charsets.c is already place with huge number of conversion tables.
Also make gsm_default_alphabet gunichar2, all values fits in 2 bytes.

Change-Id: Ia5ab6c176b4fec21ec76b06513c1d00794ba10ef
Reviewed-on: https://code.wireshark.org/review/1328
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Don't use HTTP filter for DTLS decryption test as it's not really HTTP traffic (and a more discerning HTTP dissector will cause this to fail)

Change-Id: I74ea78f541f87000d84c85794d04e9de46d477f2
Reviewed-on: https://code.wireshark.org/review/1333
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Create the HTTP tree and set column info after we're assured it's HTTP.  Otherwise a bogus tree is created when HTTP2 traffic is found.  Also, COL_PROTOCOL and COL_INFO can be prematurely populated.

Change-Id: I9f1c736baaeb86f9fab61601d79e79b4e3a16c38
Reviewed-on: https://code.wireshark.org/review/1334
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Support out-of-source checkapi

Always call $(top_srcdir)/tools/checkAPIs.pl with -sourcedir=$(srcdir)
from Makefile.am to allow out-of-source 'make checkapi'.

Change-Id: I60d7e0079984a8ededdacf4517a0738486fa7973
Reviewed-on: https://code.wireshark.org/review/1294
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Fix encodings (found by fix-encoding-args.pl)

Change-Id: I9bbdf61b6ac0b24dea4993f07b2608538ef220b2
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1336
Reviewed-by: Anders Broman <a.broman58@gmail.com>