]> The Tcpdump Group git mirrors - tcpdump/log
tcpdump
6 years agoUpdate config.{guess,sub}, timestamps 2018-07-06,2018-07-03
Francois-Xavier Le Bail [Tue, 10 Jul 2018 11:12:45 +0000 (13:12 +0200)] 
Update config.{guess,sub}, timestamps 2018-07-06,2018-07-03

From repository git://git.savannah.gnu.org/config.git

6 years agoAdd a test from Kamil Frankowicz for the BFD dissector.
Guy Harris [Tue, 10 Jul 2018 08:07:25 +0000 (01:07 -0700)] 
Add a test from Kamil Frankowicz for the BFD dissector.

6 years ago Clean up handling of different packet types.
Guy Harris [Tue, 10 Jul 2018 08:01:15 +0000 (01:01 -0700)] 
 Clean up handling of different packet types.

Only look at the header for control packets; we don't know what the
payload contains for other packet types.

This fixes some cases where we fail to check whether we have a full
header before fetching from the header - we only need to fetch from the
header for control packets, so we now only need to check that we have it
for control packets; make sure we *don't* look at the header for other
packet types.

Update the v0 code to match draft-ietf-bfd-base-01, which was the last
draft that discussed v0.

6 years agoUpdate the timestamp in the man page.
Denis Ovsienko [Tue, 10 Jul 2018 07:38:04 +0000 (08:38 +0100)] 
Update the timestamp in the man page.

[skip ci]

6 years agoPointers to packet bytes should be u_char *, not void *
Francois-Xavier Le Bail [Tue, 10 Jul 2018 06:05:53 +0000 (08:05 +0200)] 
Pointers to packet bytes should be u_char *, not void *

6 years agoICMPv6: Fix printing 'Reachable Time' and 'Retrans Timer' as milliseconds
Francois-Xavier Le Bail [Mon, 9 Jul 2018 13:39:44 +0000 (15:39 +0200)] 
ICMPv6: Fix printing 'Reachable Time' and 'Retrans Timer' as milliseconds

Update 'retrans time' to 'retrans timer'.

See: https://tools.ietf.org/html/rfc4861#section-4.2.

Update the output of some tests accordingly.

6 years agoClean up dissection.
Guy Harris [Mon, 9 Jul 2018 16:42:17 +0000 (09:42 -0700)] 
Clean up dissection.

Don't use pointers to anything other than octets; there is no guarantee
that the L2TP packet is aligned on a 2-byte or 4-byte boundary, and
there is no need to pretend that we have pointers to aligned values -
we're using the EXTRACT_ macros, which will fetch multi-byte integral
values regardless of the alignment of the pointer.

This also fixes some cases where we were advancing 2 bytes after
processing a 1-byte field - we were incrementing a uint16_t * by 1,
which means advancing it by 2 bytes, and we're now incrementing the
uint8_t * by 1.

Don't cast a 4-byte integer to u_long - EXTRACT_BE_U_4() is guaranteed
to return something printable with %u.

Don't fetch fields dividded into "high" and "low" portions 2 bytes at a
time and reassemble them; the only reason they're divided into "high"
and "low" partitions in the ASCII-art diagrams in RFC 2661 is that those
diagrams tend to show packets in the form of 32-bit words, and those
fields aren't aligned on 32-bit word boundaries, so we can just fetch
those fields with EXTRACT_BE_U_4().

Don't print a sequence of AVPs by recursion; iterate instead.

Add some RFC numbers while we're at it.

6 years agoUse HTTPS in the www.tcpdump.org URLs.
Denis Ovsienko [Mon, 9 Jul 2018 10:04:39 +0000 (11:04 +0100)] 
Use HTTPS in the www.tcpdump.org URLs.

[skip ci]

6 years agoUse EXTRACT_ macros, don't reassemble multi-byte quantities ourselves.
Guy Harris [Sun, 8 Jul 2018 23:50:16 +0000 (16:50 -0700)] 
Use EXTRACT_ macros, don't reassemble multi-byte quantities ourselves.

6 years agoESP: Fix some unreachable code warnings
Francois-Xavier Le Bail [Sun, 8 Jul 2018 18:01:46 +0000 (20:01 +0200)] 
ESP: Fix some unreachable code warnings

Found with -Wunreachable-code clang compiler option.

The errors were:
./print-esp.c:263:3: warning: code will never be executed
                                                 [-Wunreachable-code]
                free(input_buffer);
                ^~~~
./print-esp.c:246:3: warning: code will never be executed
                                                 [-Wunreachable-code]
                EVP_CIPHER_CTX_free(ctx);
                ^~~~~~~~~~~~~~~~~~~
./print-esp.c:843:5: warning: code will never be executed
                                                 [-Wunreachable-code]
                                free(input_buffer);
                                ^~~~
./print-esp.c:826:5: warning: code will never be executed
                                                 [-Wunreachable-code]
                                EVP_CIPHER_CTX_free(ctx);
                                ^~~~~~~~~~~~~~~~~~~

6 years agoDVMRP: Fix an undefined behavior at runtime
Francois-Xavier Le Bail [Sun, 8 Jul 2018 13:03:45 +0000 (15:03 +0200)] 
DVMRP: Fix an undefined behavior at runtime

Found with -fsanitize=undefined clang compiler option.

The error was:
print-dvmrp.c:238:27: runtime error: left shift of 240 by 24 places cannot
be represented in type 'int'

6 years agoSort the tested compiler warning options
Francois-Xavier Le Bail [Sat, 7 Jul 2018 20:01:00 +0000 (22:01 +0200)] 
Sort the tested compiler warning options

6 years agosyslog: fix a typo in a comment
Denis Ovsienko [Fri, 6 Jul 2018 16:55:31 +0000 (16:55 +0000)] 
syslog: fix a typo in a comment

[skip ci]

6 years agoAdd a missing space for DNS over TCP (GH #688)
Denis Ovsienko [Fri, 6 Jul 2018 13:46:13 +0000 (13:46 +0000)] 
Add a missing space for DNS over TCP (GH #688)

[skip ci]

6 years agoNo need to check whether data is present if there isn't any data.
Guy Harris [Mon, 25 Jun 2018 05:07:46 +0000 (22:07 -0700)] 
No need to check whether data is present if there isn't any data.

6 years agoupdate CREDITS
Denis Ovsienko [Sun, 24 Jun 2018 16:26:45 +0000 (17:26 +0100)] 
update CREDITS

Move 3 past maintainers to the respective section, fixup formatting for
consistency and specify ordering within sections.

[skip ci]

6 years agoICMPv6: Add a length check
Francois-Xavier Le Bail [Sat, 23 Jun 2018 17:08:19 +0000 (19:08 +0200)] 
ICMPv6: Add a length check

If the length is zero, it's invalid, print that.

Add a test with this case.

6 years agoGet rid of no-longer-used nfsuint64.
Guy Harris [Sat, 23 Jun 2018 07:57:39 +0000 (00:57 -0700)] 
Get rid of no-longer-used nfsuint64.

nd_uint64_t suffices - it doesn't require 8-byte alignment (XDR doesn't
provide 8-byte alignment for 64-bit quantities).

6 years agoUse nd_uint types for structures used to overlay packets.
Guy Harris [Sat, 23 Jun 2018 00:19:18 +0000 (17:19 -0700)] 
Use nd_uint types for structures used to overlay packets.

6 years agoClean up processing of RPC request header.
Guy Harris [Fri, 22 Jun 2018 22:28:10 +0000 (15:28 -0700)] 
Clean up processing of RPC request header.

Don't just blast through it and do a single check at the end to make
sure we didn't run past the end of the packet; check for the
fixed-length part of the credentials, then check for the variable-length
part of the credentials, and then do the same two steps for the
verifier.

Fix the checks against the on-the-network length while we're at it.

6 years agoMake roundup2() generally available.
Guy Harris [Fri, 22 Jun 2018 18:18:20 +0000 (11:18 -0700)] 
Make roundup2() generally available.

6 years agoExpand a comment.
Guy Harris [Thu, 21 Jun 2018 22:01:34 +0000 (15:01 -0700)] 
Expand a comment.

6 years agoFix test for truncated sname and file.
Guy Harris [Thu, 21 Jun 2018 21:54:02 +0000 (14:54 -0700)] 
Fix test for truncated sname and file.

nd_printztn() returns 0 if the string is truncated; check for it
returning zero, not for returning a non-zero value.

This fix was supplied in GitHub issue #685.

6 years agoRIP: Add some bounds checks
Francois-Xavier Le Bail [Wed, 20 Jun 2018 07:09:14 +0000 (09:09 +0200)] 
RIP: Add some bounds checks

6 years agoIEEE 802.11: Add a bounds check
Francois-Xavier Le Bail [Mon, 18 Jun 2018 19:47:43 +0000 (21:47 +0200)] 
IEEE 802.11: Add a bounds check

6 years agoAll four BSDs.
Guy Harris [Mon, 18 Jun 2018 03:22:11 +0000 (20:22 -0700)] 
All four BSDs.

6 years agoAdd some EXTRACT_U_1() macro calls
Francois-Xavier Le Bail [Sat, 16 Jun 2018 12:39:33 +0000 (14:39 +0200)] 
Add some EXTRACT_U_1() macro calls

6 years agoAdd two EXTRACT_U_1() macro calls
Francois-Xavier Le Bail [Sat, 16 Jun 2018 12:25:06 +0000 (14:25 +0200)] 
Add two EXTRACT_U_1() macro calls

6 years agoFix a typo in the EXTRACT_BE_S_6() macro
Francois-Xavier Le Bail [Fri, 15 Jun 2018 12:33:47 +0000 (14:33 +0200)] 
Fix a typo in the EXTRACT_BE_S_6() macro

S: Signed

6 years agoUpdate an email address
Francois-Xavier Le Bail [Wed, 13 Jun 2018 15:49:23 +0000 (17:49 +0200)] 
Update an email address

6 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Wed, 6 Jun 2018 13:00:10 +0000 (15:00 +0200)] 
Add more nd_print_trunc() calls

Update the output of some tests accordingly.

6 years agoInclude conditionally <config.h> in netdissect-alloc.c
Francois-Xavier Le Bail [Tue, 5 Jun 2018 12:19:33 +0000 (14:19 +0200)] 
Include conditionally <config.h> in netdissect-alloc.c

This should suppress the warning reported by Gisle Vanem:

In file included from netdissect-alloc.c:18:
In file included from ./netdissect-alloc.h:22:
./netdissect.h(131,14):  warning: '_strdup' redeclared without 'dllimport'
    attribute: previous 'dllimport' ignored [-Winconsistent-dllimport]
extern char *strdup (const char *str);
             ^
./netdissect-stdinc.h(219,18):  note: expanded from macro 'strdup'
  #define strdup _strdup
                 ^

6 years agoIP: Stop decoding when truncation occurs in options
Francois-Xavier Le Bail [Mon, 4 Jun 2018 15:06:45 +0000 (17:06 +0200)] 
IP: Stop decoding when truncation occurs in options

We just keep the checksum control.

6 years agoUDP: Add two bounds checks
Francois-Xavier Le Bail [Mon, 4 Jun 2018 11:46:02 +0000 (13:46 +0200)] 
UDP: Add two bounds checks

6 years agoICMPv6: Avoid reinventing ND_TCHECK_*() macros
Francois-Xavier Le Bail [Sun, 3 Jun 2018 15:36:40 +0000 (17:36 +0200)] 
ICMPv6: Avoid reinventing ND_TCHECK_*() macros

6 years agoIP: Print clearer when the version is invalid
Francois-Xavier Le Bail [Sun, 3 Jun 2018 10:02:02 +0000 (12:02 +0200)] 
IP: Print clearer when the version is invalid

Update the output of some tests accordingly.

6 years agoSUNRPC: Add a bounds check
Francois-Xavier Le Bail [Sat, 2 Jun 2018 21:38:18 +0000 (23:38 +0200)] 
SUNRPC: Add a bounds check

6 years agoUDP: Add a bounds check
Francois-Xavier Le Bail [Sat, 2 Jun 2018 14:31:49 +0000 (16:31 +0200)] 
UDP: Add a bounds check

6 years agoVJC: Add some bounds checks
Francois-Xavier Le Bail [Sat, 2 Jun 2018 11:51:01 +0000 (13:51 +0200)] 
VJC: Add some bounds checks

6 years agoMPTCP: Add a bounds check
Francois-Xavier Le Bail [Sat, 2 Jun 2018 07:32:56 +0000 (09:32 +0200)] 
MPTCP: Add a bounds check

6 years agoSimplify some expressions
Francois-Xavier Le Bail [Fri, 1 Jun 2018 20:06:42 +0000 (22:06 +0200)] 
Simplify some expressions

In the equality case, the difference is also zero.

6 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Fri, 1 Jun 2018 13:56:06 +0000 (15:56 +0200)] 
Add more nd_print_trunc() calls

Update the output of some tests accordingly.

Moreover:
Add a ndo_protocol assignment in pimv2_print().

7 years agoDCCP: Fix a truncation message
Francois-Xavier Le Bail [Tue, 29 May 2018 16:26:14 +0000 (18:26 +0200)] 
DCCP: Fix a truncation message

It's a truncated packet, not sure it's invalid.

7 years agoMake the NFLOG test case unconditional
Francois-Xavier Le Bail [Tue, 29 May 2018 10:38:39 +0000 (12:38 +0200)] 
Make the NFLOG test case unconditional

There is no more HAVE_PCAP_NFLOG_H macro to test.

libpcap has support for NFLOG in current in 1.8.1 and in old releases
1.7.4, 1.6.2 and 1.5.3.

Thus there should be no problem to always do the test.

7 years agoAdd a nd_print_trunc() call
Francois-Xavier Le Bail [Tue, 29 May 2018 09:11:46 +0000 (11:11 +0200)] 
Add a nd_print_trunc() call

Update the output of a test accordingly.

7 years agoES-IS,IS-IS: Add two missing return
Francois-Xavier Le Bail [Fri, 25 May 2018 12:53:08 +0000 (14:53 +0200)] 
ES-IS,IS-IS: Add two missing return

Update the output of some tests accordingly.

7 years agoUDP: Add two missing return
Francois-Xavier Le Bail [Fri, 25 May 2018 11:21:31 +0000 (13:21 +0200)] 
UDP: Add two missing return

7 years agoBluetooth: Add a missing return
Francois-Xavier Le Bail [Fri, 25 May 2018 09:38:54 +0000 (11:38 +0200)] 
Bluetooth: Add a missing return

7 years agoWe no longer need pcap/nflog.h nor pcap/bluetooth.h, step 2
Francois-Xavier Le Bail [Fri, 25 May 2018 08:03:43 +0000 (10:03 +0200)] 
We no longer need pcap/nflog.h nor pcap/bluetooth.h, step 2

7 years agoRemove trailing spaces/tabs
Francois-Xavier Le Bail [Fri, 25 May 2018 07:56:04 +0000 (09:56 +0200)] 
Remove trailing spaces/tabs

7 years agoUpdate closing #endif comment.
Guy Harris [Thu, 24 May 2018 21:13:48 +0000 (14:13 -0700)] 
Update closing #endif comment.

7 years agoWe no longer need pcap/nflog.h nor pcap/bluetooth.h.
Guy Harris [Thu, 24 May 2018 21:13:22 +0000 (14:13 -0700)] 
We no longer need pcap/nflog.h nor pcap/bluetooth.h.

7 years agoCast dport and sport to u_int before shifting them.
Guy Harris [Thu, 24 May 2018 19:11:09 +0000 (12:11 -0700)] 
Cast dport and sport to u_int before shifting them.

The result of the expression is ultimately going to be put into a u_int;
cast them to u_int so that we'll be shifting unsigned values left rather
than int values, to avoid undefined behavior.

This should fix GitHub issue #681.

7 years agoEncrypted data buffer sizes must also be a multiple of the cipher block size.
Guy Harris [Thu, 24 May 2018 18:45:19 +0000 (11:45 -0700)] 
Encrypted data buffer sizes must also be a multiple of the cipher block size.

This should address the issue in GitHub pull request #680.

7 years agoDeclare the NFLOG pseudo-header ourselves.
Guy Harris [Wed, 23 May 2018 21:43:47 +0000 (14:43 -0700)] 
Declare the NFLOG pseudo-header ourselves.

It's not specified by a libpcap header that might have a different
layout in different pcap releases, it's specified on the list of
link-layer header types and must remain the same forever (except for
getting additional bits defined), so we don't need to pick it up from
libpcap.

This means we get to use tcpdump's nd_ types; do so.

7 years agoDeclare the Bluetooth pseudo-header ourselves.
Guy Harris [Wed, 23 May 2018 21:12:45 +0000 (14:12 -0700)] 
Declare the Bluetooth pseudo-header ourselves.

It's not specified by a libpcap header that might have a different
layout in different pcap releases, it's specified on the list of
link-layer header types and must remain the same forever (except for
getting additional bits defined), so we don't need to pick it up from
libpcap.

This means we get to use tcpdump's nd_ types; do so.

7 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Wed, 23 May 2018 10:07:58 +0000 (12:07 +0200)] 
Add more nd_print_trunc() calls

Update the output of some tests accordingly.

Moreover:
Update a ndo_protocol assignment.

7 years agoAdd a nd_print_trunc() call
Francois-Xavier Le Bail [Wed, 23 May 2018 07:32:27 +0000 (09:32 +0200)] 
Add a nd_print_trunc() call

Moreover:
Rename a function with _print like in most similar cases

7 years agoDECnet: Avoid using EXTRACT_ macros on non packet buffer pointers
Francois-Xavier Le Bail [Tue, 22 May 2018 11:27:46 +0000 (13:27 +0200)] 
DECnet: Avoid using EXTRACT_ macros on non packet buffer pointers

Remove two now useless variables.

7 years agoDCCP: Fix printing "Timestamp" and "Timestamp Echo" options
Francois-Xavier Le Bail [Mon, 21 May 2018 07:25:15 +0000 (09:25 +0200)] 
DCCP: Fix printing "Timestamp" and "Timestamp Echo" options

Add some comments.

Moreover:
Put a function definition name at the beginning of the line.

7 years agoRx: Use the fn_print_str() function instead of nd_print()
Francois-Xavier Le Bail [Sun, 20 May 2018 14:43:49 +0000 (16:43 +0200)] 
Rx: Use the fn_print_str() function instead of nd_print()

We cannot use nd_print() because the parameter is not a pointer on the
packet buffer.

7 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Sun, 20 May 2018 09:49:37 +0000 (11:49 +0200)] 
Add more nd_print_trunc() calls

Update the output of a test accordingly.

Moreover:
Avoid printing useless '\n'.

7 years agoNTP: Fix extracting the poll value
Francois-Xavier Le Bail [Sun, 20 May 2018 06:03:22 +0000 (08:03 +0200)] 
NTP: Fix extracting the poll value

Use EXTRACT_S_1 for ppoll (signed).

7 years agoDECnet: Pointers to packet bytes should be u_char *, not char *
Francois-Xavier Le Bail [Sat, 19 May 2018 19:00:02 +0000 (21:00 +0200)] 
DECnet: Pointers to packet bytes should be u_char *, not char *

7 years agoAdd a cast to the EXTRACT_U_1() macro
Francois-Xavier Le Bail [Sat, 19 May 2018 18:40:48 +0000 (20:40 +0200)] 
Add a cast to the EXTRACT_U_1() macro

This change may avoid sign bit extension problem.

7 years agoReplace some double parentheses with single parentheses
Francois-Xavier Le Bail [Sat, 19 May 2018 15:12:08 +0000 (17:12 +0200)] 
Replace some double parentheses with single parentheses

7 years agoPointers to packet bytes should be u_char *, not char *.
Guy Harris [Sat, 19 May 2018 18:13:00 +0000 (11:13 -0700)] 
Pointers to packet bytes should be u_char *, not char *.

7 years agotimed: Fix bounds check when printing Machine Name
Francois-Xavier Le Bail [Sat, 19 May 2018 10:36:55 +0000 (12:36 +0200)] 
timed: Fix bounds check when printing Machine Name

7 years agoIEEE 802.11: Print the SSID with the fn_print_str() function
Francois-Xavier Le Bail [Fri, 18 May 2018 20:27:34 +0000 (22:27 +0200)] 
IEEE 802.11: Print the SSID with the fn_print_str() function

We cannot use nd_print() because the parameter is not a pointer on the
packet buffer.

7 years agoAdd the fn_print_str() function
Francois-Xavier Le Bail [Fri, 18 May 2018 20:18:46 +0000 (22:18 +0200)] 
Add the fn_print_str() function

This function print a null-terminated string, filtering out non-printable
characters.
DON'T USE IT with a pointer on the packet buffer because there is no
truncation check. For this use, see the nd_printX() functions.

7 years agoAdd a nd_print_trunc() call
Francois-Xavier Le Bail [Fri, 18 May 2018 12:55:12 +0000 (14:55 +0200)] 
Add a nd_print_trunc() call

Replace a ND_TTEST_*() with ND_TCHECK_*().
Update the output of some tests accordingly.

7 years agoAdd a nd_print_trunc() call
Francois-Xavier Le Bail [Fri, 18 May 2018 11:55:46 +0000 (13:55 +0200)] 
Add a nd_print_trunc() call

Moreover:
Replace a ND_TTEST_*() with ND_TCHECK_*().

7 years agoReplace some ND_TTEST_*() with ND_TCHECK_*()
Francois-Xavier Le Bail [Fri, 18 May 2018 10:53:48 +0000 (12:53 +0200)] 
Replace some ND_TTEST_*() with ND_TCHECK_*()

7 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Fri, 18 May 2018 09:39:52 +0000 (11:39 +0200)] 
Add more nd_print_trunc() calls

Update the output of some tests accordingly.

7 years agoUse more the nd_print_trunc() call
Francois-Xavier Le Bail [Fri, 18 May 2018 09:14:27 +0000 (11:14 +0200)] 
Use more the nd_print_trunc() call

Update the output of a test accordingly.

7 years agoTCP: Fix a closing string
Francois-Xavier Le Bail [Fri, 18 May 2018 07:58:36 +0000 (09:58 +0200)] 
TCP: Fix a closing string

It was ">", it must be "]"

Update the output of some tests accordingly.

7 years agoFix space printing with istr[]
Francois-Xavier Le Bail [Fri, 18 May 2018 07:32:28 +0000 (09:32 +0200)] 
Fix space printing with istr[]

Because istr[] is assign to " (invalid)", avoid adding a space before it.

Moreover:
Avoid also useless '\n'

7 years agoPGM: Remove unused variable and code
Francois-Xavier Le Bail [Fri, 18 May 2018 07:04:25 +0000 (09:04 +0200)] 
PGM: Remove unused variable and code

7 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Fri, 18 May 2018 06:33:54 +0000 (08:33 +0200)] 
Add more nd_print_trunc() calls

Update the output of some tests accordingly.

7 years agoTCP: Add a missing 'truncated' message
Francois-Xavier Le Bail [Fri, 18 May 2018 06:19:45 +0000 (08:19 +0200)] 
TCP: Add a missing 'truncated' message

7 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Thu, 17 May 2018 13:09:47 +0000 (15:09 +0200)] 
Add more nd_print_trunc() calls

Update the output of a test accordingly.

7 years agoFix truncation checks in CONTRIBUTING
Herwin Weststrate [Fri, 11 May 2018 12:30:52 +0000 (14:30 +0200)] 
Fix truncation checks in CONTRIBUTING

7 years agoAdd a nd_print_trunc() call
Francois-Xavier Le Bail [Thu, 17 May 2018 11:59:05 +0000 (13:59 +0200)] 
Add a nd_print_trunc() call

Update the output of some tests accordingly.

7 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Fri, 11 May 2018 08:40:40 +0000 (10:40 +0200)] 
Add more nd_print_trunc() calls

Update the output of some tests accordingly.

7 years agoMake the hex-dumping routines for addresses take a uint8_t * argument.
Guy Harris [Mon, 14 May 2018 08:52:54 +0000 (01:52 -0700)] 
Make the hex-dumping routines for addresses take a uint8_t * argument.

Hopefully, that will convince Coverity that the result of dereferencing
those pointers will have a value between 0x00 and 0xff, and therefore
that shifting that result right by 4 bits will yield a value between 0x0
and 0xf, and therefore that this result can safely be used as an index
into the 16-element hex[] array.

I guess Coverity wants us to realize that there really *are* C
implementations out there with non-8-bit char and unsigned char values,
even though getting tcpdump to work on them will probably be a highly
entertaining exercise (not to mention that the only one I know of that's
actually being *used* are the Unisys Clearpath Dorado series, and
they're one's complement, which is yet *another* place where the port
could be entertaining...).

7 years agoAdd a nd_print_trunc() call
Francois-Xavier Le Bail [Thu, 10 May 2018 19:17:35 +0000 (21:17 +0200)] 
Add a nd_print_trunc() call

Update the output of a test accordingly.

Moreover:
Add a ndo_protocol reassignment after xxx_print() calls.

7 years agoAdd a nd_print_trunc() call
Francois-Xavier Le Bail [Thu, 10 May 2018 18:38:16 +0000 (20:38 +0200)] 
Add a nd_print_trunc() call

Update the output of some tests accordingly.

Moreover:
Add a ndo_protocol reassignment after ip_print() call.

7 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Thu, 10 May 2018 16:05:56 +0000 (18:05 +0200)] 
Add more nd_print_trunc() calls

Update the output of some tests accordingly.

Moreover:
Add a ndo_protocol field assignment.

7 years agoRemove some spaces (style)
Francois-Xavier Le Bail [Thu, 10 May 2018 15:40:20 +0000 (17:40 +0200)] 
Remove some spaces (style)

7 years agoUpdate hex_and_ascii_print_with_offset() to static
Francois-Xavier Le Bail [Thu, 10 May 2018 14:48:48 +0000 (16:48 +0200)] 
Update hex_and_ascii_print_with_offset() to static

7 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Sun, 6 May 2018 08:33:07 +0000 (10:33 +0200)] 
Add more nd_print_trunc() calls

Update the output of some tests accordingly.

7 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Fri, 4 May 2018 15:40:11 +0000 (17:40 +0200)] 
Add more nd_print_trunc() calls

7 years agoPrint truncations with nd_print_trunc() instead of tstr[] strings
Francois-Xavier Le Bail [Wed, 2 May 2018 15:15:04 +0000 (17:15 +0200)] 
Print truncations with nd_print_trunc() instead of tstr[] strings

Remove the tstr[] strings.
Update the output of some tests accordingly.

Moreover:
Add or update some ndo_protocol fields.

7 years agoAdd the nd_print_trunc() function
Francois-Xavier Le Bail [Wed, 2 May 2018 15:12:50 +0000 (17:12 +0200)] 
Add the nd_print_trunc() function

Use the ndo->ndo_protocol field to print a " [|protocol]" message.

7 years agoChange update-test.sh to update multiple tests
Francois-Xavier Le Bail [Thu, 3 May 2018 10:26:30 +0000 (12:26 +0200)] 
Change update-test.sh to update multiple tests

7 years agoResync SMI list against Wireshark
Jeremy Browne [Thu, 19 Apr 2018 09:55:54 +0000 (02:55 -0700)] 
Resync SMI list against Wireshark

7 years agoRemove the safeputs() function
Francois-Xavier Le Bail [Wed, 2 May 2018 08:01:34 +0000 (10:01 +0200)] 
Remove the safeputs() function

Use the nd_printzp() function instead.

7 years agoRemove two duplicate lines
Francois-Xavier Le Bail [Wed, 2 May 2018 02:22:10 +0000 (04:22 +0200)] 
Remove two duplicate lines

7 years agoRemove the safeputchar() function
Francois-Xavier Le Bail [Tue, 1 May 2018 18:02:42 +0000 (20:02 +0200)] 
Remove the safeputchar() function

Print the characters filtering out non-printable with fn_print_char().

Update the output of some tests accordingly.

7 years agoDisplay the "wireless" flag and connection status.
Guy Harris [Mon, 30 Apr 2018 19:44:58 +0000 (12:44 -0700)] 
Display the "wireless" flag and connection status.