| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This way, even if we longjmped out of the code because trucation,
the prism header length is subtracted for -x/-X print.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
uint32_t for flags, because there are calls with uint16_t and uint32_t.
This change avoids (for presentflags):
print-802_11.c:2795:41: runtime error: implicit conversion from type
'uint32_t' (aka 'unsigned int') of value 2147502191 (32-bit, unsigned)
to type 'int' changed the value to -2147465105 (32-bit, signed)
#0 0x815e130 in print_radiotap_field ./print-802_11.c:2795:41
|
|
|
|
| |
Should fix Coverity CID 1463833.
|
|\
| |
| | |
Fix and update 802.11 reason codes
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix and update 802.11 status codes
|
| |/ |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Moreover:
Use 'goto trunc' in some length tests.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We cannot use nd_print() because the parameter is not a pointer on the
packet buffer.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
For coherency.
We have: DLT_IEEE802_11_RADIO_AVS and ieee802_11_radio_avs_if_print().
Thus rename ieee802_11_avs_radio_print() to ieee802_11_radio_avs_print().
|
|
|
|
| |
Use parens around the sizeof argument, to match the style used elsewhere.
|
|
|
|
|
| |
Use float values, rather than double values, to initialize an array of
floats.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
At one point, I remember a discussion resulting in the official name of
the next-generation replacement for pcap format being changed to
"pcapng", with no hyphen.
Make tcpdump reflect that.
While we're at it, uppdate to use "macOS" as the name of Apple's
UNIX-for-Macs, as appropriate (don't use it for versions that were still
called Mac OS X or OS X).
|
| |
|
| |
|
| |
|
|
|
|
|
| |
ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l)
ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
|
| |
|
| |
|
| |
|
|
|
|
| |
In: switch (... p[n] ...) ...
|
|
|
|
| |
In some macros and functions call, p[n]
|
|
|
|
|
|
| |
In ND_PRINT() macro call(s) (step 7).
p[n] ...
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Have separate cpack_ routines for signed and unsigned numbers, with the
signed ones using _S_ extract macros. That way, we can do more type
checking.
Add EXTRACT_LE_S_ macros.
Use signed variables for IEEE80211_RADIOTAP_TX_ATTENUATION and
IEEE80211_RADIOTAP_DB_TX_ATTENUATION, rather than using unsigned
variables that we cast to int.
Also, use EXTRACT_U_1() in cpack_uint8.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Assignment, *(p op e)
Partial list.
|
|
|
|
|
| |
It indicates clearly that these macros are used to extract big-endian
integral values.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
offset has already been advanced to point to the bitmap; we shouldn't
add the amount to advance again.
This fixes a buffer over-read discovered by Brian 'geeknik' Carpenter.
Add a test using the capture file supplied by the reporter(s).
While we're at it, remove some redundant tests - we've already checked,
before the case statement, whether we have captured the entire
information element and whether the entire information element is
present in the on-the-wire packet; in the cases for particular IEs, we
only need to make sure we don't go past the end of the IE.
|
|
|
|
|
|
|
|
| |
The arguments to memcpy() were completely wrong.
This fixes a buffer over-read discovered by Kamil Frankowicz.
Add a test using the capture file supplied by Brian 'geeknik' Carpenter.
|