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
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
Guy Harris
fb2479d733
Always include <config.h> rather than "config.h".
...
This can prevent bizarre failures if, for example, you've done a
configuration in the top-level source directory, leaving behind one
config.h file, and then do an out-of-tree build in another directory,
with different configuration options. This way, we always pick up the
same config.h, in the build directory.
2018-01-21 12:27:28 -08:00
Francois-Xavier Le Bail
513f782ae1
Use quoted include netdissect-stdinc.h instead of angle-bracketed one
2018-01-21 10:28:15 +01:00
Francois-Xavier Le Bail
e2982e7f6f
Update ND_PRINT() as a variadic macro
2018-01-07 13:36:41 +01:00
Francois-Xavier Le Bail
ff1c209392
Fix some Coccinelle warnings "a \ character appears outside of a #define"
2018-01-04 13:26:39 +01:00
Guy Harris
5a39a3642f
Use nd_ types, add EXTRACT_ calls.
2017-12-30 17:25:44 -08:00
Francois-Xavier Le Bail
5cea270318
Remove all storage class specifier 'register'
...
Let the compiler do the optimizations (or not) based on build options.
Avoid 'value has been optimized out' messages in gdb using '-O0'.
2017-12-13 19:17:47 +01:00
Francois-Xavier Le Bail
84ef17ac0e
Replace ND_TTEST2()/ND_TCHECK2() macros by macros using pointers (1/n)
...
ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l)
ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
2017-12-11 22:11:01 +01:00
Guy Harris
fd7da470bf
More EXTRACT_U_1() replacing direct dereferences.
2017-12-08 17:53:56 -08:00
Francois-Xavier Le Bail
da20bc56d6
Rename EXTRACT_ macros
...
Now all the macros have a name meaning a count in bytes.
With _S_: signed, _U_: unsigned
e.g.:
EXTRACT_BE_32BITS -> EXTRACT_BE_U_4
EXTRACT_LE_32BITS -> EXTRACT_LE_U_4
...
EXTRACT_BE_INT32 -> EXTRACT_BE_S_4
and have:
EXTRACT_8BITS -> EXTRACT_U_1
EXTRACT_INT8 -> EXTRACT_S_1
2017-11-22 23:54:09 +01:00
Francois-Xavier Le Bail
4b21d2bad7
Use more the EXTRACT_8BITS() macro to fetch a one-byte value (14/n)
...
Assignment, one operator.
2017-11-21 17:38:35 +01:00
Francois-Xavier Le Bail
08ee0b90d8
Use more the EXTRACT_8BITS() macro to fetch a one-byte value (11/n)
...
In tok2str() calls (step 3).
2017-11-19 21:44:52 +01:00
Francois-Xavier Le Bail
577621026d
Rename EXTRACT_nBITS() macros to EXTRACT_BE_nBITS()
...
It indicates clearly that these macros are used to extract big-endian
integral values.
2017-11-18 13:56:40 +01:00
Denis Ovsienko
413840cf18
Don't specify struct as "const" within sizeof().
...
The only difference the const qualifier makes in this context is visual,
make it consistent with the rest of the source code.
2017-09-13 13:33:02 +01:00
Hannes Gredler
ff8464bffd
zero change: update Hannes Gredler's email
2017-07-28 17:44:12 +02:00
Francois-Xavier Le Bail
b38f324af9
Add a summary comment in all other printers
...
Moreover:
Remove some redundant comments
Update some summary comments
Update the specification URL for ATA over Ethernet (AoE) protocol
2016-08-15 22:42:38 +02:00
Francois-Xavier Le Bail
99c91c3aec
Rename 'tcpdump-stdinc.h' to 'netdissect-stdinc.h'
...
Get the full log via: git log --follow netdissect-stdinc.h
2015-09-10 08:50:40 +02:00
Francois-Xavier Le Bail
c1c3c77463
Printers must include 'netdissect.h', not 'interface.h'
2015-09-05 23:35:58 +02:00
Denis Ovsienko
38700c7f24
dismiss NETDISSECT_REWORKED macro
...
The purpose of this macro was to enable the file-by-file switch to NDO,
after which only tcpdump.c had a use of it and the definitions guarded
by it. Update tcpdump.c not to require them any more and dismiss the
unused definitions.
2015-03-22 10:06:15 +00:00
Denis Ovsienko
60a835d80f
clean K&R style up in function declarations a bit
...
The function body should have its opening brace on the next line.
2015-03-05 10:35:03 +00:00
Denis Ovsienko
f0f2e6d058
don't reinvent ND_TCHECK2()
2014-06-12 14:59:03 +04:00
Guy Harris
ed85e20e4d
u_intN_t is dead, long live uintN_t.
...
And, as we require at least autoconf 2.61, and as autoconf 2.61 and
later have AC_TYPE_UINTn_T and AC_TYPE_INTn_T macros, we use them to
define the uintN_t and intN_t macros if the system doesn't define them
for us.
This lets us get rid of bitypes.h as well.
2014-04-23 00:20:40 -07:00
Denis Ovsienko
1fe6e66ece
make use of NETDISSECT_REWORKED
...
Update the already converted decoders to define the macro and to include
interface.h instead of netdissect.h. Fix incurred compile errors.
2014-03-15 14:19:49 +04:00
Denis Ovsienko
f9b3c51da6
NDOize FDDI, MPCP, Token Ring, VQP and Zephyr decoders
2014-03-14 16:10:54 +04:00
Denis Ovsienko
69f6f4392a
don't include addrtoname.h needlessly
2014-02-25 17:53:08 +04:00
Denis Ovsienko
fe3253b9b8
remove tcpdump's own CVS keywords
...
Remove lots of $Header's and a few $Id's that all belong to the former
CVS repository of tcpdump itself. These keywords have been frozen since
the migration to git in late 2008.
2014-01-03 00:59:08 +04:00
Michael Richardson
ac910c086e
ndo-ize print-ascii: hex_print_with_offset()
2014-01-01 21:31:18 -05:00
Michael Richardson
a97fb2f3ae
whitespace changes
2014-01-01 21:31:18 -05:00
hannes
414186039b
complete the outstanding opcodes for MPCP & add boundary checks
2006-02-10 17:24:55 +00:00
hannes
0860434f38
add basic support for MPCP 802.3ah frame printer
2006-02-10 04:52:25 +00:00