]> The Tcpdump Group git mirrors - tcpdump/log
tcpdump
6 years agoICMPv6: Add the IPv6-Only flag
Loganaden Velvindron [Sat, 16 Mar 2019 11:31:26 +0000 (15:31 +0400)] 
ICMPv6: Add the IPv6-Only flag

This flag in defined in a draft which is close to getting published as
an IETF RFC: https://tools.ietf.org/html/draft-ietf-6man-ipv6only-flag-05.

6 years agoSNMP: Fix an undefined behavior at runtime
Francois-Xavier Le Bail [Sat, 16 Mar 2019 12:08:36 +0000 (13:08 +0100)] 
SNMP: Fix an undefined behavior at runtime

The error was:
print-snmp.c:503:14: runtime error: unsigned integer overflow: 0 - 1
cannot be represented in type 'uint32_t' (aka 'unsigned int')

6 years agoTravis CI: Print the devel libs in Linux builds
Francois-Xavier Le Bail [Fri, 15 Mar 2019 14:49:48 +0000 (15:49 +0100)] 
Travis CI: Print the devel libs in Linux builds

6 years agoTravis CI: Fix the problem with folded outputs
Francois-Xavier Le Bail [Fri, 15 Mar 2019 14:35:59 +0000 (15:35 +0100)] 
Travis CI: Fix the problem with folded outputs

Trailing newlines are now needed in travis_fold:start:* strings, because
of a Travis change.
Based on Travis support proposal.

6 years agoIPX: Add a length check
Francois-Xavier Le Bail [Mon, 11 Mar 2019 21:07:06 +0000 (22:07 +0100)] 
IPX: Add a length check

This fix an undefined behavior at runtime.

The error was:
print-ipx.c:93:43: runtime error: unsigned integer overflow: 29 - 30
cannot be represented in type 'unsigned int'

Add a test case.

6 years agoIS-IS: Fix inaccurate variable names
Francois-Xavier Le Bail [Sun, 10 Mar 2019 22:16:27 +0000 (23:16 +0100)] 
IS-IS: Fix inaccurate variable names

6 years agoAdd two TFTP tests
Francois-Xavier Le Bail [Sun, 10 Mar 2019 15:05:26 +0000 (16:05 +0100)] 
Add two TFTP tests

There is one pcap file with two outputs, with/without the '-T tftp' option.

6 years agoTFTP: Print protocol name and length keyword
Francois-Xavier Le Bail [Sun, 10 Mar 2019 14:34:18 +0000 (15:34 +0100)] 
TFTP: Print protocol name and length keyword

Update the output of a test accordingly.

6 years agoBabel: Avoid an unsigned integer underflow
Francois-Xavier Le Bail [Fri, 8 Mar 2019 12:34:39 +0000 (13:34 +0100)] 
Babel: Avoid an unsigned integer underflow

6 years agoSMB: Avoid an unsigned integer underflow
Francois-Xavier Le Bail [Fri, 8 Mar 2019 12:23:34 +0000 (13:23 +0100)] 
SMB: Avoid an unsigned integer underflow

6 years agoRIP: Fix two loops for undefined behavior at runtime
Francois-Xavier Le Bail [Fri, 8 Mar 2019 17:04:43 +0000 (18:04 +0100)] 
RIP: Fix two loops for undefined behavior at runtime

1) RIPv2
The error was:
print-rip.c:386:9: runtime error: unsigned integer overflow: 16 - 20
cannot be represented in type 'unsigned int'

Without this change the unsigned integer variable 'len' is assigned a
very high value, because of underflow, and the loop continue incorrectly.

Add a test case.

2) RIPv1
Same bugfix, based on a code inspection, so comes without a test case.

6 years agoRIP: Fix inaccurate variable names
Francois-Xavier Le Bail [Fri, 8 Mar 2019 14:52:07 +0000 (15:52 +0100)] 
RIP: Fix inaccurate variable names

6 years agoClean up whitespaces/indentation
Francois-Xavier Le Bail [Fri, 8 Mar 2019 14:26:45 +0000 (15:26 +0100)] 
Clean up whitespaces/indentation

6 years agoICMP: Fix an undefined behavior at runtime
Francois-Xavier Le Bail [Fri, 8 Mar 2019 11:46:49 +0000 (12:46 +0100)] 
ICMP: Fix an undefined behavior at runtime

The error was:
print-icmp.c:491:13: runtime error: unsigned integer overflow: 0 - 1
cannot be represented in type 'u_int' (aka 'unsigned int')

6 years agoUse the ndo->ndo_protocol field instead of the protoname parameter
Francois-Xavier Le Bail [Thu, 7 Mar 2019 21:20:34 +0000 (22:20 +0100)] 
Use the ndo->ndo_protocol field instead of the protoname parameter

Moreover:
Fix a truncated string: "[!" is not the prefix for a truncated string.
Add two comments.
Clean up a whitespace.

6 years agoFix a typo
Francois-Xavier Le Bail [Thu, 7 Mar 2019 13:31:19 +0000 (14:31 +0100)] 
Fix a typo

6 years agoTCP: Fix an undefined behavior at runtime
Francois-Xavier Le Bail [Wed, 6 Mar 2019 13:52:14 +0000 (14:52 +0100)] 
TCP: Fix an undefined behavior at runtime

The error was:
print-tcp.c:831:22: runtime error: unsigned integer overflow: 0 - 1
cannot be represented in type 'u_int' (aka 'unsigned int')

6 years agoMerge pull request #734 from jkcko/master
Guy Harris [Thu, 28 Feb 2019 17:58:25 +0000 (09:58 -0800)] 
Merge pull request #734 from jkcko/master

Support DLT_IEEE802_15_4_TAP.

6 years agoClean up whitespaces/indentation
Francois-Xavier Le Bail [Wed, 27 Feb 2019 20:24:12 +0000 (21:24 +0100)] 
Clean up whitespaces/indentation

6 years agoISAKMP: Simplify an expression
Francois-Xavier Le Bail [Wed, 27 Feb 2019 19:31:02 +0000 (20:31 +0100)] 
ISAKMP: Simplify an expression

6 years agoClean up whitespaces
Francois-Xavier Le Bail [Wed, 27 Feb 2019 19:13:59 +0000 (20:13 +0100)] 
Clean up whitespaces

6 years agoAdd two ndo_protocol reassignments after xxx_print() calls
Francois-Xavier Le Bail [Wed, 27 Feb 2019 11:15:06 +0000 (12:15 +0100)] 
Add two ndo_protocol reassignments after xxx_print() calls

6 years agoClean up whitespaces/indentation
Francois-Xavier Le Bail [Wed, 27 Feb 2019 11:03:15 +0000 (12:03 +0100)] 
Clean up whitespaces/indentation

6 years agoIS-IS: Replace some ND_TTEST_*() calls with ND_TCHECK_*() calls
Francois-Xavier Le Bail [Mon, 25 Feb 2019 16:40:02 +0000 (17:40 +0100)] 
IS-IS: Replace some ND_TTEST_*() calls with ND_TCHECK_*() calls

6 years agoIEEE 802.11: Replace some ND_TTEST_*() calls with ND_TCHECK_*() calls
Francois-Xavier Le Bail [Sun, 24 Feb 2019 09:47:24 +0000 (10:47 +0100)] 
IEEE 802.11: Replace some ND_TTEST_*() calls with ND_TCHECK_*() calls

Moreover:
Use 'goto trunc' in some length tests.

6 years agoClean up whitespaces/indentation
Francois-Xavier Le Bail [Sun, 24 Feb 2019 08:44:14 +0000 (09:44 +0100)] 
Clean up whitespaces/indentation

6 years agoRSVP: Replace a ND_TTEST_*() call with ND_TCHECK_*() call
Francois-Xavier Le Bail [Sat, 23 Feb 2019 21:31:06 +0000 (22:31 +0100)] 
RSVP: Replace a ND_TTEST_*() call with ND_TCHECK_*() call

6 years agoGeoNet: Replace the ND_TTEST_*() calls with ND_TCHECK_*() calls
Francois-Xavier Le Bail [Sat, 23 Feb 2019 18:55:18 +0000 (19:55 +0100)] 
GeoNet: Replace the ND_TTEST_*() calls with ND_TCHECK_*() calls

Moreover:
Add two comments

6 years agoClean up whitespaces
Francois-Xavier Le Bail [Sat, 23 Feb 2019 18:51:59 +0000 (19:51 +0100)] 
Clean up whitespaces

6 years agoOLSR: Replace the ND_TTEST_*() calls with ND_TCHECK_*() calls
Francois-Xavier Le Bail [Sat, 23 Feb 2019 18:27:37 +0000 (19:27 +0100)] 
OLSR: Replace the ND_TTEST_*() calls with ND_TCHECK_*() calls

6 years agoGRE: Replace the ND_TTEST_*() calls with ND_TCHECK_*() calls
Francois-Xavier Le Bail [Sat, 23 Feb 2019 17:05:36 +0000 (18:05 +0100)] 
GRE: Replace the ND_TTEST_*() calls with ND_TCHECK_*() calls

6 years agoClean up whitespaces/indentation
Francois-Xavier Le Bail [Sat, 23 Feb 2019 16:31:48 +0000 (17:31 +0100)] 
Clean up whitespaces/indentation

6 years agoHandle DLT_IEEE802_15_4_TAP. 734/head
James Ko [Fri, 15 Feb 2019 20:27:46 +0000 (12:27 -0800)] 
Handle DLT_IEEE802_15_4_TAP.

https://github.com/jkcko/ieee802.15.4-tap

6 years agoAdd a test for NFS write verifier cookie in TESTLIST
Francois-Xavier Le Bail [Thu, 7 Feb 2019 11:36:04 +0000 (12:36 +0100)] 
Add a test for NFS write verifier cookie in TESTLIST

This is a followup to commit 8b9f7d9d76.

Moreover:
Rename the .pcap file to .pcapng.

6 years agoRemove some useless spaces
Francois-Xavier Le Bail [Fri, 1 Feb 2019 12:59:45 +0000 (13:59 +0100)] 
Remove some useless spaces

6 years agoRemove a useless space
Francois-Xavier Le Bail [Tue, 29 Jan 2019 20:39:41 +0000 (21:39 +0100)] 
Remove a useless space

6 years agoChange some pcap tests to test the printers again
Francois-Xavier Le Bail [Tue, 29 Jan 2019 13:27:06 +0000 (14:27 +0100)] 
Change some pcap tests to test the printers again

The added sanity check was: packet length >= capture length.

Thus update packet length to be capture length if lower.

This change is a followup to commit 9e6ba479d8.

6 years agoMerge pull request #722 from aieri/issue/695
Guy Harris [Tue, 29 Jan 2019 02:29:37 +0000 (18:29 -0800)] 
Merge pull request #722 from aieri/issue/695

Amend documentation about the use of the -C -G and -W switches.

6 years agoMerge pull request #703 from nmap/update-gitignore
Guy Harris [Tue, 29 Jan 2019 02:27:48 +0000 (18:27 -0800)] 
Merge pull request #703 from nmap/update-gitignore

Add files generated by CMake on Windows to .gitignore

6 years agoMerge pull request #728 from ffainelli/brcm-tag
Guy Harris [Tue, 29 Jan 2019 00:11:13 +0000 (16:11 -0800)] 
Merge pull request #728 from ffainelli/brcm-tag

Add support for dissecting Broadcom tags

6 years agoAdd Broadcom tags tests 728/head
Florian Fainelli [Sat, 26 Jan 2019 00:58:42 +0000 (16:58 -0800)] 
Add Broadcom tags tests

Add 3 tests to test that we can properly dissect Broadcom tags. Two are
for DSA_TAG_BRCM where the tag is between Ethernet MAC SA and
Type/Length and one for DSA_TAG_BRCM_PREPEND where the tag is
encapsulating the Ethernet frame (thus requires -e to be shown).

6 years agoAdd support for decoding Broadcom Ethernet switches tags
Florian Fainelli [Fri, 18 Jan 2019 23:24:33 +0000 (15:24 -0800)] 
Add support for decoding Broadcom Ethernet switches tags

This adds support for decoding the Broadcom Ethernet switches tags which
are are 4byte in length and are located between the Ethernet MAC SA and
the Type/Length field (DSA_TAG_BRCM) as well as the pre-pended Broadcom
tag (DSA_TAG_BRCM_PREPEND) which are located in front of the standard
Ethernet header.

This makes use of the recently introduced ether_print_hdr_len() to allow
specifying the non-standard Ethernet header length of 12 + 4 + 2 bytes.

6 years agoReport 32-bit timestamps with uppermost bit set as "Error converting time"
Francois-Xavier Le Bail [Sun, 27 Jan 2019 14:46:05 +0000 (15:46 +0100)] 
Report 32-bit timestamps with uppermost bit set as "Error converting time"

In the ts_unix_print() function.

This change is a followup to commit 8e9fb1eb02.

6 years agoEthernet: Allow specifying non-standard Ethernet header length
Florian Fainelli [Fri, 18 Jan 2019 23:19:38 +0000 (15:19 -0800)] 
Ethernet: Allow specifying non-standard Ethernet header length

A fair number of proprietary Ethernet switch tagging protocols, such as
Broadcom tags for instance, will place their tag between the MAC SA and
the Type/Length field.

Move the body of ether_print() into ether_print_hdr_len() and specify
the Ethernet header length as an argument to that function.
ether_print() calls ether_print_hdr_len() with a standard Ethernet
header lenght of 14 bytes, while other callers could specify an
arbitrary length. We still assume that the first Length/Type field to
parse is located 2 bytes before the end of that Ethernet header length.

This will be used in a subsequent commit to parse Broadcom tags.

6 years agoFix small misspellings 730/head
Antonin Décimo [Wed, 23 Jan 2019 16:28:14 +0000 (17:28 +0100)] 
Fix small misspellings

6 years agoUpdate print-lldp.c 729/head
Matt Eaton [Tue, 22 Jan 2019 11:53:19 +0000 (05:53 -0600)] 
Update print-lldp.c

Small typo fix for `EVB Station` in Link Layer Discovery Protocol (LLDP) printer - `print-lldp.c`

6 years agoDo AppVeyor builds on all branches.
Guy Harris [Wed, 9 Jan 2019 18:12:12 +0000 (10:12 -0800)] 
Do AppVeyor builds on all branches.

6 years agoBuild the tcpdump-4.9 branch as well.
Guy Harris [Wed, 9 Jan 2019 09:24:29 +0000 (01:24 -0800)] 
Build the tcpdump-4.9 branch as well.

6 years agoHandle rpcaps:// URLs as well, for rpcap-over-TLS.
Guy Harris [Mon, 7 Jan 2019 02:30:59 +0000 (18:30 -0800)] 
Handle rpcaps:// URLs as well, for rpcap-over-TLS.

6 years agoAmend the documentation about the use of the -C -G and -W switches. 722/head
Andrea Ieri [Sun, 16 Dec 2018 12:13:58 +0000 (13:13 +0100)] 
Amend the documentation about the use of the -C -G and -W switches.

When using all three switches (-C -G and -W), the behavior is
practically identical to only using -C and -G, as the -W flag will only
affect the filename suffix.

Fixes #695

6 years agoSquelch a narrowing warning.
Guy Harris [Tue, 11 Dec 2018 09:15:12 +0000 (01:15 -0800)] 
Squelch a narrowing warning.

Use a u_char variable for characters in the RST string; no need for it
to be an int.

6 years agoHave all Internet-checksum computing routines return a uint16_t.
Guy Harris [Tue, 11 Dec 2018 08:50:15 +0000 (00:50 -0800)] 
Have all Internet-checksum computing routines return a uint16_t.

Those checksums are 16-bit; change the return types of those routines
appropriately.

6 years agoSquelch some narrowing warnings.
Guy Harris [Tue, 11 Dec 2018 07:44:50 +0000 (23:44 -0800)] 
Squelch some narrowing warnings.

Mostly, we just throw in casts of values already known to be in the
range of values supported by the lvalue's type to that type.

Also, for the IPX SAP table, we make the SAP value a uint16_t, as SAP
values are 16-bit.

Make a hash table index unsigned, Just Because.

6 years agoUmm, wrong.
Guy Harris [Tue, 11 Dec 2018 07:26:25 +0000 (23:26 -0800)] 
Umm, wrong.

6 years agoAdd, and use, macros to do locale-independent case mapping.
Guy Harris [Tue, 11 Dec 2018 07:16:45 +0000 (23:16 -0800)] 
Add, and use, macros to do locale-independent case mapping.

This means we get the same behavior in Turkish locales (where, if we
aren't in the C locale, we might get lower-case "i" mapped to upper-case
"I with dot" and upper-case "I" mapped to lower-case "i without dot),
and may also suppress some shortening warnings from MSVC.

6 years agoRevert "Try to squelch a warning about non-constant format strings."
Guy Harris [Tue, 11 Dec 2018 06:01:39 +0000 (22:01 -0800)] 
Revert "Try to squelch a warning about non-constant format strings."

This reverts commit 76ed0bb39212d964946a22380288c34adc09030f.

It doesn't help.

We may just want to suppress the warning, as in "trust us, we know what
we're doing", although it'd be nice if the format string passed to those
functions could be checked to make sure it is one that takes exactly one
integer argument.

6 years agoTry to squelch a warning about non-constant format strings.
Guy Harris [Tue, 11 Dec 2018 05:53:58 +0000 (21:53 -0800)] 
Try to squelch a warning about non-constant format strings.

Declare the format-string argument to tok2strbuf(), tok2str(),
bittok2str(), and bittok2str_nosep() as such, to see whether that gets
MSVC not to complain - or if it just gets upset because there's no "..."
argument list for it.

6 years agoType and size cleanups.
Guy Harris [Tue, 11 Dec 2018 05:23:21 +0000 (21:23 -0800)] 
Type and size cleanups.

Make the count of 2-octet values to dump an unsigned value.

Make the variables into which we fetch those octets unsigned as well.

Cast the result of the "is the character printable ASCII?  If so, it's
the character, otherwise it's '.'" to char, to squelch narrowing
warnings.

6 years agoSquelch a warning.
Guy Harris [Tue, 11 Dec 2018 04:14:57 +0000 (20:14 -0800)] 
Squelch a warning.

We're returning the calculated checksum result modulo 65536, given that
Internet checksums are 16-bit; throw in a cast to let MSVC know that
this is intended.

6 years agoTry to squelch another annoying repeated warning.
Guy Harris [Tue, 11 Dec 2018 03:57:54 +0000 (19:57 -0800)] 
Try to squelch another annoying repeated warning.

6 years agoBuild with the Npcap SDK as well as the WinPcap SDK.
Guy Harris [Tue, 11 Dec 2018 03:22:39 +0000 (19:22 -0800)] 
Build with the Npcap SDK as well as the WinPcap SDK.

6 years agoChange tests/hoobr_bfd_print.pcap to test the BFD printer again.
Guy Harris [Wed, 21 Nov 2018 23:09:39 +0000 (15:09 -0800)] 
Change tests/hoobr_bfd_print.pcap to test the BFD printer again.

Clamp the on-the-wire length values of the packets at 262144, so that we
hand the packets to the BFD printer, rather than just bailing out before
we ever get there.

6 years agoRevert "Ethernet: Remove two useless tests"
Francois-Xavier Le Bail [Mon, 19 Nov 2018 15:02:40 +0000 (16:02 +0100)] 
Revert "Ethernet: Remove two useless tests"

This reverts commit b7fff7058282c332ba1d8d236c9864ab21b16adf (partially)

The sanity check in print.c/pretty_print_packet() function, packet length
(length) >= capture length (caplen), apply when the ether_print()
function is called by ether_if_print(), netanalyzer_if_print() or
netanalyzer_transparent_if_print().

But the ether_print() function is called in some other cases, thus not
sure length always >= caplen.

6 years agoHandle radiotap+802.11 for DLT_LINUX_SLL2 as well.
Guy Harris [Tue, 13 Nov 2018 06:56:24 +0000 (22:56 -0800)] 
Handle radiotap+802.11 for DLT_LINUX_SLL2 as well.

6 years agoFix printing of Linux cooked captures with monitor-mode packets.
Guy Harris [Tue, 13 Nov 2018 06:03:49 +0000 (22:03 -0800)] 
Fix printing of Linux cooked captures with monitor-mode packets.

Apparently, if you have an interface in monitor mode, capturing on the
"any" device can get packets that have a SLL hatype of 803, which is the
ARPHRD_ value for radiotap, and with the payload containing a radiotap
header, followed by an 802.11 header, followed by the 802.11 payload.
Handle that.

6 years agoICMPv6: add a comment for the previous commit
Denis Ovsienko [Mon, 12 Nov 2018 17:22:33 +0000 (17:22 +0000)] 
ICMPv6: add a comment for the previous commit

[skip ci]

6 years agoshow ICMPv6 echo request ID
Andreas Jaggi [Sun, 11 Nov 2018 18:36:30 +0000 (19:36 +0100)] 
show ICMPv6 echo request ID

6 years agoDCCP: Fix an undefined behavior at runtime
Francois-Xavier Le Bail [Mon, 12 Nov 2018 14:44:45 +0000 (15:44 +0100)] 
DCCP: Fix an undefined behavior at runtime

6 years agoDCCP: Fix some undefined behaviors at runtime
Francois-Xavier Le Bail [Sun, 11 Nov 2018 20:39:25 +0000 (21:39 +0100)] 
DCCP: Fix some undefined behaviors at runtime

The errors were like:
print-dccp.c:448:4: runtime error: unsigned integer overflow: 20 - 24
cannot be represented in type 'unsigned int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior print-dccp.c:448:4

6 years agoSquelch annoying bogus Clang warnings.
Guy Harris [Fri, 9 Nov 2018 20:54:00 +0000 (12:54 -0800)] 
Squelch annoying bogus Clang warnings.

6 years agoRequire sys/capsicum.h to use Capsicum.
Guy Harris [Fri, 9 Nov 2018 20:00:59 +0000 (12:00 -0800)] 
Require sys/capsicum.h to use Capsicum.

My PC-BSD 9.1 VM, at least, has sys/capability.h but not sys/capsicum.h;
we now use sys/capsicum.h, so require it to be present (which it is in
FreeBSD 10 and later).

6 years agoFix typo.
Guy Harris [Fri, 9 Nov 2018 19:43:14 +0000 (11:43 -0800)] 
Fix typo.

6 years agoRequire sys/capsicum.h to use Capsicum.
Guy Harris [Fri, 9 Nov 2018 19:33:55 +0000 (11:33 -0800)] 
Require sys/capsicum.h to use Capsicum.

My PC-BSD 9.1 VM, at least, has sys/capability.h but not sys/capsicum.h;
we now use sys/capsicum.h, so require it to be present (which it is in
FreeBSD 10 and later).

6 years agoMerge pull request #715 from rbgarga/fix_capsicum_header
Guy Harris [Fri, 9 Nov 2018 19:20:00 +0000 (11:20 -0800)] 
Merge pull request #715 from rbgarga/fix_capsicum_header

Include correct capsicum header

6 years agoInclude correct capsicum header 715/head
Renato Botelho [Tue, 6 Nov 2018 10:55:22 +0000 (08:55 -0200)] 
Include correct capsicum header

Current included header `sys/capability.h` is deprecated. All
supported FreeBSD versions have now the proper header `sys/capsicum.h`

6 years agoUse more nd_print_invalid()
Francois-Xavier Le Bail [Fri, 2 Nov 2018 14:14:52 +0000 (15:14 +0100)] 
Use more nd_print_invalid()

6 years agoCompile with -Wsign-compare in devel mode if supported (cmake)
Francois-Xavier Le Bail [Tue, 30 Oct 2018 20:33:24 +0000 (21:33 +0100)] 
Compile with -Wsign-compare in devel mode if supported (cmake)

6 years agoCompile with '-Wsign-compare' in devel mode if supported
Francois-Xavier Le Bail [Mon, 29 Oct 2018 21:28:53 +0000 (22:28 +0100)] 
Compile with '-Wsign-compare' in devel mode if supported

6 years agoAdd two test files: an empty pcap and an empty pcapng
Francois-Xavier Le Bail [Mon, 29 Oct 2018 20:11:52 +0000 (21:11 +0100)] 
Add two test files: an empty pcap and an empty pcapng

6 years agoTravis CI: Add the "./tcpdump -h" command
Francois-Xavier Le Bail [Mon, 29 Oct 2018 15:54:42 +0000 (16:54 +0100)] 
Travis CI: Add the "./tcpdump -h" command

6 years agoAdd an usage message for the -m option
Francois-Xavier Le Bail [Mon, 29 Oct 2018 15:31:19 +0000 (16:31 +0100)] 
Add an usage message for the -m option

Moreover:
Fix a space.

6 years agoClean up whitespaces
Francois-Xavier Le Bail [Sat, 27 Oct 2018 15:36:31 +0000 (17:36 +0200)] 
Clean up whitespaces

6 years agoRemove a space (style)
Francois-Xavier Le Bail [Sat, 27 Oct 2018 14:49:23 +0000 (16:49 +0200)] 
Remove a space (style)

Moreover:
Fix indentation.

6 years agoFix nd_snprintf(buf, buflen, "string");
Guy Harris [Sun, 14 Oct 2018 05:51:54 +0000 (22:51 -0700)] 
Fix nd_snprintf(buf, buflen, "string");

If this is VS prior to 2015 or MinGW, we can't trust snprintf(); we have
to use _snprintf_s(), but that requires us to insert _TRUNCATE as an
argument after the buffer and buffer length and before the format string
and arguments, if any, to the format string.

That means we need to use a vararg macro; however, if we make the format
string a regular argument to the macro, that means that, if there are no
arguments *after* the format string, you end up with an argument list to
_snprintf_s() that ends with "fmt, ", and that's not valid C.

*If* we knew this was GCC or Clang, we could use a GNU C-specific hack,
wherein, if __VA_ARGS__ is preceded by ## and there's a comma before
that, the comma is removed if __VA_ARGS__ is empty, but this might be
Microsoft's C compiler in a version of Visual Studio prior to VS 2015,
which might not support that.

So we have to just have the macro take, as the ... arguments, the format
string and its arguments.

Addresses GitHub issue #713.

6 years agoClean up indentation.
Guy Harris [Wed, 10 Oct 2018 22:26:49 +0000 (15:26 -0700)] 
Clean up indentation.

6 years agoMerge pull request #710 from agnosticdev/return-checks
Guy Harris [Tue, 9 Oct 2018 08:02:45 +0000 (01:02 -0700)] 
Merge pull request #710 from agnosticdev/return-checks

return-checks: Added a return check for malloc and for strsep

6 years agoreturn-checks: Added a return check for malloc and for strsep 710/head
agnosticdev [Tue, 9 Oct 2018 02:18:52 +0000 (21:18 -0500)] 
return-checks: Added a return check for malloc and for strsep

6 years agoman page: Update the -ttt and -ttttt options sections
Francois-Xavier Le Bail [Fri, 5 Oct 2018 13:49:14 +0000 (15:49 +0200)] 
man page: Update the -ttt and -ttttt options sections

The delta is printed with microsecond or nanosecond resolution depending
on the --time-stamp-precision option (default is microsecond resolution).

6 years agoHarmonize a message
Francois-Xavier Le Bail [Fri, 5 Oct 2018 07:33:34 +0000 (09:33 +0200)] 
Harmonize a message

s/capture size/snapshot length/

It's a follow-up to 8a54b2483b.

6 years agoAdd the snapshot length to the "reading from file ..." message
Francois-Xavier Le Bail [Thu, 4 Oct 2018 19:59:44 +0000 (21:59 +0200)] 
Add the snapshot length to the "reading from file ..." message

6 years agoUse signed formats for signed values
Francois-Xavier Le Bail [Thu, 4 Oct 2018 14:24:38 +0000 (16:24 +0200)] 
Use signed formats for signed values

6 years agoMerge pull request #707 from herwinw/cleanup_win32_GNUMakefile
Guy Harris [Wed, 3 Oct 2018 20:11:28 +0000 (13:11 -0700)] 
Merge pull request #707 from herwinw/cleanup_win32_GNUMakefile

Fix tab/spaces in GNUmakefile of win32

6 years agoChange unknown attribute in test
Herwin Weststrate [Tue, 2 Oct 2018 14:26:22 +0000 (16:26 +0200)] 
Change unknown attribute in test

The value 127 is actually assigned to the Location-Information Attribute
(RFC 5580). Change it to a very high value.

6 years agoFix tab/spaces in GNUmakefile of win32 707/head
Herwin Weststrate [Wed, 3 Oct 2018 18:19:37 +0000 (20:19 +0200)] 
Fix tab/spaces in GNUmakefile of win32

6 years agoRemove unused TCP ports
Francois-Xavier Le Bail [Tue, 2 Oct 2018 16:44:42 +0000 (18:44 +0200)] 
Remove unused TCP ports

6 years agoMerge pull request #704 from nmap/win32-isatty
Guy Harris [Tue, 2 Oct 2018 16:48:02 +0000 (09:48 -0700)] 
Merge pull request #704 from nmap/win32-isatty

Ensure isatty is defined on Win32.

6 years agoRemove unused UDP ports
Francois-Xavier Le Bail [Tue, 2 Oct 2018 14:55:57 +0000 (16:55 +0200)] 
Remove unused UDP ports

6 years agoEnsure isatty is defined on Win32. 704/head
Daniel Miller [Tue, 2 Oct 2018 14:52:40 +0000 (09:52 -0500)] 
Ensure isatty is defined on Win32.

6 years agoUpdate .gitignore for other configurations 703/head
Daniel Miller [Tue, 2 Oct 2018 03:14:14 +0000 (22:14 -0500)] 
Update .gitignore for other configurations

6 years agoAdd files generated by CMake on Windows to .gitignore
Daniel Miller [Tue, 2 Oct 2018 03:08:01 +0000 (22:08 -0500)] 
Add files generated by CMake on Windows to .gitignore