| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This fixes some undefined behavior warnings.
|
|
|
|
|
| |
This trivial change compiles fine with GCC 7.5.0 on Linux and Clang
10.0.1 on FreeBSD, so let's not run the full round of CI this time.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
ND_TCHECK_4(e).
They are redundant because they are followed by a GET_IPADDR_STRING(e)
call, same e, which do the bounds check.
Remove unused 'trunc' labels and associated codes.
Update the output of a test accordingly.
|
|
|
|
|
|
|
| |
ND_TCHECK_16(e).
They are redundant because they are followed by a GET_IP6ADDR_STRING(e)
call, same e, which do the bounds check.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace more calls to ipaddr_string()/ip6addr_string() with calls to
GET_IPADDR_STRING()/GET_IP6ADDR_STRING() macros performing bounds
checking.
Add similar bounds-checking inline functions and macros to wrap
linkaddr_string(), etheraddr_string(), and isonsap_string() and convert
calls to them to use the macros as well.
Shuffle the inline functions in addrtoname.h around a bit, so that the
inline functions, external declarations, and macros are all in the same
order.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a ND_BYTES_AVAILABLE_AFTER() macro to find the number of bytes
available in the captured data, starting at the byte pointed to by the
argument. It returns a u_int rather than a ptrdiff_t, so it'll be
32 bits on LP64 and LLP64 platforms as well as on ILP32 platforms. Use
that macro.
Make size-of-buffer arguments size_t.
Cast some size_t and ptrdiff_t values to u_int or int.
|
|
|
|
|
|
|
| |
The exceptions are currently:
Some EXTRACT_ in print-juniper.c, not used on packet buffer pointer.
An EXTRACT_BE_U_3 in addrtoname.c, not always used on packet buffer
pointer.
|
|
|
|
|
|
|
| |
It prints " (invalid)", used for malformed or corrupted packets.
Moreover:
Update CONTRIBUTING.
|
|
|
|
|
|
|
| |
Because istr[] is assign to " (invalid)", avoid adding a space before it.
Moreover:
Avoid also useless '\n'
|
|
|
|
|
|
|
|
| |
Remove the tstr[] strings.
Update the output of some tests accordingly.
Moreover:
Add or update some ndo_protocol fields.
|
|
|
|
|
| |
Update this field in printer entry functions.
It will be used for some printings.
|
|
|
|
|
|
|
|
| |
It was mostly used with large functions.
Moreover:
Put some function definition names at the beginning of line.
Fix a space.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l)
ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
|
|
|
|
|
|
|
|
|
|
| |
This catches direct references, so we can change them to use EXTRACT_U_1
or EXTRACT_S_1.
Also, change some structures to use the nd_ types that weren't already
using them.
Then make the appropriate EXTRACT_{U,S}_1() changes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
It indicates clearly that these macros are used to extract big-endian
integral values.
|
| |
|
|
|
|
|
| |
This doesn't fix any known issue, just for consistency with all other
decoders.
|
|
|
|
|
|
|
| |
Moreover:
Remove some redundant comments
Update some summary comments
Update the specification URL for ATA over Ethernet (AoE) protocol
|
|
|
|
| |
Same as in the previous commit.
|
|
|
|
|
| |
This replaces a few explicit type casts with one type cast in the macro
and makes the source code mean one thing with one term instead of two.
|
| |
|
|
|
|
|
|
|
| |
Update the output of a test accordingly.
Moreover:
Delete extra blank lines.
|
|
|
|
|
| |
Moreover:
s/tcpdump/netdissect/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They are defined as arrays of bytes, so
1) no padding is inserted before them to put them on natural
boundaries, so they can be used if the values *aren't* so
aligned;
2) you have to use EXTRACT_ macros with them - which you should
be doing *anyway*, to avoid explicitly or implicitly making
assumptions about byte order or alignment safety on the
platform for which your code is being built (it'd better work
when built for little-endian x86 or for big-endian *and*
strict-alignment-requiring SPARC).
Use them in the LISP (no, not the programming language!) dissector;
UNALIGNED means "this structure is not guaranteed to be aligned as a
whole, so don't generate code that assumes it is", not "this structure's
individual members shouldn't have padding to put them on natural
boundaries", so it's not sufficient to do that. (Using these types
*might* suffice to ensure that code that assumes alignment not be
generated, but never underestimate SPARC compilers' eagerness to use
single load and store instructions to fetch big-endian 16-bit, 32-bit,
and 64-bit values from packets that really aren't guaranteed to be
aligned.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The warning was:
./print-lisp.c:401:11: warning: variable 'xtr_present' is used uninitialized
whenever 'if' condition is false [-Wsometimes-uninitialized]
else if (type == LISP_MAP_NOTIFY)
^~~~~~~~~~~~~~~~~~~~~~~
./print-lisp.c:404:9: note: uninitialized use occurs here
return xtr_present;
^~~~~~~~~~~
Moreover:
Remove unused 'interface.h' include.
|
|
|
|
| |
INET6 is no more used.
|
|
Fixing Travis CI build for LISP commit
Adding testcases for lisp notify and register
Fixing build warnings
Added ND_TCHECK for relevant headers
Fixing ND_TCHECK2 issues
Adding support for multiple LOC records for same EID entry
Fixing review issues, adding detailed tests
Adding support for verbose outputs
Adding RFC information for UDP PORT defination
Removing Spaces in type names
Print EID record related flags in verbose mode
Using tok2str
Fixing -Wpedantic issues
Negative testcases, Packet structure comments, verbose mode flag printing
Printing Map Version
Print auth_data, decouple type and xtr_present extraction, handle malformed packets correctly
Tests for latest code changes
Printing useful info incase not built with IPv6 support
|