Francois-Xavier Le Bail
6cb22c2699
PGM: Remove unused variable and code
2018-05-18 10:03:53 +02:00
Francois-Xavier Le Bail
e056e93cd5
Add more nd_print_trunc() calls
...
Update the output of some tests accordingly.
2018-05-18 08:34:28 +02:00
Francois-Xavier Le Bail
b7b5b7ddd6
TCP: Add a missing 'truncated' message
2018-05-18 08:20:04 +02:00
Francois-Xavier Le Bail
9234c86b44
Add more nd_print_trunc() calls
...
Update the output of a test accordingly.
2018-05-18 07:17:45 +02:00
Herwin Weststrate
1433720f40
Fix truncation checks in CONTRIBUTING
2018-05-17 22:23:24 +01:00
Francois-Xavier Le Bail
15ad390859
Add a nd_print_trunc() call
...
Update the output of some tests accordingly.
2018-05-17 13:59:05 +02:00
Francois-Xavier Le Bail
d07444a5f2
Add more nd_print_trunc() calls
...
Update the output of some tests accordingly.
2018-05-17 12:51:47 +02:00
Guy Harris
db3f9f277f
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...).
2018-05-14 01:52:54 -07:00
Francois-Xavier Le Bail
6daf3a543e
Add a nd_print_trunc() call
...
Update the output of a test accordingly.
Moreover:
Add a ndo_protocol reassignment after xxx_print() calls.
2018-05-10 21:17:35 +02:00
Francois-Xavier Le Bail
d880293429
Add a nd_print_trunc() call
...
Update the output of some tests accordingly.
Moreover:
Add a ndo_protocol reassignment after ip_print() call.
2018-05-10 20:47:44 +02:00
Francois-Xavier Le Bail
40ae3ad744
Add more nd_print_trunc() calls
...
Update the output of some tests accordingly.
Moreover:
Add a ndo_protocol field assignment.
2018-05-10 18:05:56 +02:00
Francois-Xavier Le Bail
1889ef324c
Remove some spaces (style)
2018-05-10 17:40:20 +02:00
Francois-Xavier Le Bail
53d1f7a25a
Update hex_and_ascii_print_with_offset() to static
2018-05-10 16:48:48 +02:00
Francois-Xavier Le Bail
00ecef01d7
Add more nd_print_trunc() calls
...
Update the output of some tests accordingly.
2018-05-06 11:26:45 +02:00
Francois-Xavier Le Bail
14cab26a1c
Add more nd_print_trunc() calls
2018-05-04 17:40:11 +02:00
Francois-Xavier Le Bail
ba8936b39b
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.
2018-05-04 13:47:49 +02:00
Francois-Xavier Le Bail
c45392de18
Add the nd_print_trunc() function
...
Use the ndo->ndo_protocol field to print a " [|protocol]" message.
2018-05-04 10:56:23 +02:00
Francois-Xavier Le Bail
878c29b576
Change update-test.sh to update multiple tests
2018-05-03 12:26:30 +02:00
Jeremy Browne
678f764388
Resync SMI list against Wireshark
2018-05-02 12:51:56 +01:00
Francois-Xavier Le Bail
e10fe19f45
Remove the safeputs() function
...
Use the nd_printzp() function instead.
2018-05-02 10:15:26 +02:00
Francois-Xavier Le Bail
23be4d1240
Remove two duplicate lines
2018-05-02 04:22:10 +02:00
Francois-Xavier Le Bail
0cced4fcdc
Remove the safeputchar() function
...
Print the characters filtering out non-printable with fn_print_char().
Update the output of some tests accordingly.
2018-05-02 03:33:02 +02:00
Guy Harris
84faadecc0
Display the "wireless" flag and connection status.
2018-04-30 12:44:58 -07:00
Francois-Xavier Le Bail
378568f2a6
Fix some host-endian extract routines
...
The modified routines are not currently used.
2018-04-30 17:07:36 +02:00
Francois-Xavier Le Bail
255339b508
Don't use safeputchar() if unneeded
2018-04-30 14:03:17 +02:00
Francois-Xavier Le Bail
3e3e6d2ef4
Rename the fn_printX() functions to nd_printX()
...
The functions are: nd_print, nd_printztn, nd_printn and nd_printzp.
Trying to make it clearer that they currently have to be used only on part
of the packet buffer.
Update some comments.
2018-04-30 13:35:06 +02:00
Guy Harris
f7530ee4d5
Merge pull request #671 from eric-s-raymond/master
...
Fix a broken font escape in the manual page.
2018-04-15 10:52:52 -07:00
Eric S. Raymond
2edef3459f
Fix a broken font escape in the manual page.
2018-04-15 13:40:25 -04:00
Guy Harris
ee29ee496c
Some additional cleanups.
...
Use define(XXX) to check for signal codes being defined.
Make the signal handlers for SIGINFO/SIGUSR1 and SIGUSR2 static.
2018-04-08 17:31:22 -07:00
Guy Harris
87b129ad3a
Use "pdd" rather than "p" for pcap_dumper_t *'s.
...
That squelches some "declaration shadows" warnings.
Clean up indentation while we're at it.
2018-04-08 17:29:41 -07:00
Guy Harris
fa8c4d8115
Merge pull request #670 from GuyLewin/master
...
SIGUSR2 flushes the packet buffer
2018-04-08 17:21:05 -07:00
Guy Lewin
0e79762874
Separate flushing the packet buffer from SIGINFO to SIGUSR2
2018-04-08 01:46:53 +03:00
Guy Lewin
ff30ebc542
When SIGINFO (or SIGUSR1) signal sent, also flush the buffer. Useful when you want to download the dump file and want to have all of the packets.
2018-04-08 01:04:58 +03:00
Guy Harris
869239c73b
Don't define tstr[] if we won't be using it.
2018-04-04 13:20:23 -07:00
Guy Harris
10ec34dbf0
Don't define tstr[] if we won't be using it.
2018-04-04 13:19:18 -07:00
Guy Harris
1980b017c1
Don't define immediate_mode if we won't be using it.
2018-04-04 13:15:23 -07:00
Guy Harris
8b1d184e10
Merge pull request #667 from slavashw/master
...
Fix fail to capture on RDMA device on FreeBSD
2018-04-02 19:42:01 -07:00
Guy Harris
7e8de895e4
Allow index numbers in remote capture.
2018-04-01 02:17:42 -07:00
Guy Harris
32776c3bf6
Get rid of debugging printout.
2018-03-31 19:24:17 -07:00
Guy Harris
9373df8aa3
Don't set COMPILE_FLAGS if there aren't any flags to set.
...
Otherwise, you get a complaint about there being too few arguments to
set_target_properties().
2018-03-27 14:38:29 -07:00
Guy Harris
2846055e96
Add -W options.
2018-03-27 14:18:14 -07:00
Guy Harris
af51efcd6a
The COMPILE_FLAGS property is a string, not a list.
...
Make C_ADDITIONAL_FLAGS a string as well, and use it appropriately.
2018-03-27 14:11:25 -07:00
Guy Harris
092ae6ddf7
Add C_ADDITIONAL_FLAGS to the compiler flags for targets.
2018-03-27 13:34:09 -07:00
Guy Harris
32f8ededb0
Initialize C_ADDITIONAL_FLAGS where we start setting it.
2018-03-27 13:16:17 -07:00
Guy Harris
111e17e87d
Don't use CMAKE_C_STANDARD, it doesn't work on all versions of CMake.
...
It doesn't work at all prior to CMake 3.1 and, even in newer versions of
CMake, it doesn't support all the vendor compilers out there for various
UNIXes.
2018-03-27 13:13:30 -07:00
Slava Shwartsman
3e26499353
Fix fail to capture on RDMA device on FreeBSD
...
In pcap for RDMA devices, on FreeBSD where we have support for capsicum
but we don't have file descriptor for a live capture we will fail with:
"tcpdump: unable to limit pcap descriptor"
We just fail to set the proper access rights - don't fail the capture.
Signed-off-by: Slava Shwartsman <slavash@mellanox.com>
Fix fail to capture on RDMA device on FreeBSD
In pcap for RDMA devices, on FreeBSD where we have support for capsicum
but we don't have file descriptor for a live capture we will fail with:
"tcpdump: unable to limit pcap descriptor"
We just fail to set the proper access rights - don't fail the capture.
Signed-off-by: Slava Shwartsman <slavash@mellanox.com>
2018-03-22 09:38:02 +00:00
Guy Harris
28b4ea1f34
Return caplen for too-short packets.
...
That way, if we don't have a full PKTAP header, we don't print anything
in the -x/-X hex dump or -A ASCII dump (but do print it with
-xx/-XX/-AA).
2018-03-19 11:40:42 -07:00
Francois-Xavier Le Bail
56e6581c34
Remove useless comments
2018-03-19 15:16:32 +01:00
Francois-Xavier Le Bail
546558eabd
Add the ndo_protocol field in the netdissect_options structure
...
Update this field in printer entry functions.
It will be used for some printings.
2018-03-16 19:44:47 +01:00
Francois-Xavier Le Bail
61f71d2046
IEEE 802.15.4: Refactor with two functions
2018-03-16 16:55:30 +01:00