| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This parameter will be needed at the next step.
|
|
|
|
|
|
|
|
| |
The errors were:
print-cdp.c:363:13: runtime error: unsigned integer overflow: 0 - 1
cannot be represented in type 'u_int' (aka 'unsigned int')
print-cdp.c:375:13: runtime error: unsigned integer overflow: 0 - 1
cannot be represented in type 'u_int' (aka 'unsigned int')
|
|
|
|
|
|
|
|
| |
Remove the tstr[] strings.
Update the output of some tests accordingly.
Moreover:
Add or update some ndo_protocol fields.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Update this field in printer entry functions.
It will be used for some printings.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
0x000f is a query for a VoIP VLAN ID, 0x000e is the reply for that.
0x0010 is a power consumption message.
Display 2-byte VoIP VLAN queries. Treat 2-byte VoIP VLAN replies as
errors; I've seen the former but not the latter.
Don't use unsigned long for values that fit in an unsigned int.
|
| |
|
|
|
|
|
| |
ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l)
ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
|
|
|
|
| |
Assignment, p[n]
|
|
|
|
| |
Moreover: Use more the ND_ISPRINT() macro.
|
|
|
|
|
|
| |
In ND_PRINT() macro call(s) (step 9).
*(p)
|
|
|
|
|
|
| |
In ND_PRINT() macro call(s) (step 8).
*(p + e)
|
|
|
|
|
|
| |
In ND_PRINT() macro call(s) (step 7).
p[n] ...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
In ND_PRINT() macro calls, *p++.
Partial list.
|
|
|
|
|
|
| |
e op *p
Partial list.
|
|
|
|
|
|
| |
Assignment, *(p op e)
Partial list.
|
| |
|
|
|
|
| |
In ND_PRINT() macro calls.
|
|
|
|
|
| |
It indicates clearly that these macros are used to extract big-endian
integral values.
|
|
|
|
|
| |
The value was fetched before:
al = EXTRACT_16BITS(&p[pl]); /* address length */
|
|
|
|
|
|
|
|
| |
with the tag '\summary:' for greping.
Remark: Currently some printers have no summary line.
Moreover:
Summarize all printers with a single line in INSTALL.txt
|
|
|
|
| |
Add a fn_print_char() to do filtering.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Have our own routines to convert between IPv4/IPv6 addresses and
strings; that helps if, for example, we want to build binary versions of
tcpdump for Windows that can run both on NT 5 (W2K/WXP), which doesn't
have inet_ntop() or inet_pton(), and NT 6 (Vista/7/8/10), which do. It
also means that we don't require IPv6 library support on UN*X to print
addresses (if somebody wants to build tcpdump for older UN*Xes lacking
IPv6 support in the system library or in add-on libraries).
Get rid of files in the missing directory that we don't need, and
various no-longer-necessary autoconf tests.
|
|
|
|
| |
Get the full log via: git log --follow netdissect-stdinc.h
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
The bounds check is already done before by ND_TCHECK2(*tptr, len).
So we are deliberately ignoring the return values of fn_printn with last
argument NULL (no bounds check).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
In the "the TLV length is too short" message, we're printing the length
of the entire TLV; report it as "TLV length". If we pass that test,
we've subtracted out the lengths of the T and the L, leaving only the
length of the V, so report it as "value length".
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
| |
The TLV length includes the T and the L, so it must be at least 4.
This means we don't need the "avoid infinite loop" check later; that
check was wrong, as per GitHub issue #401 and #402; this fixes #402,
which has a different patch for that bug.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Have them take a netdissect_options * argument, and get the "no name
resolution" flag from it.
Move the declaration of dnaddr_string to addrtoname.h, along with the
other XXX-to-string routines.
|
| |
|