tcpdump.
Check whether __attribute__((format)) can be applied to function
pointers and, if not, don't apply it to function pointers; some older
versions of GCC appear to support applying it to functions, but not
pointers to functions.
As we've gotten rid of missing/getaddrinfo.c, don't use it.
elsewhere in the macro.
For the Alpha C compiler, don't set -std1 unless it's necessary for ANSI
mode - we don't want to limit the compiler only to C89 features and,
more importantly, C89 headers (<inttypes.h> doesn't work, on at least
some versions of Digital UNIX and some C compiler versions, with -std1).
Remove unused items, and items for which we now have AC_DEFINE() calls
that supply a comment, from acconfig.h.
Note that a host OS that matches "osf*" is assumed to be DEC
OSF1/Digital UNIX/Tru64 UNIX.
1) getrpcbynumber() is declared in <netdb.h>, not any of the RPC
header files
and
2) if _XOPEN_SOURCE_EXTENDED is defined, <netdb.h> doesn't declare
it
so we undefine it.
use the V_CCOPT flags, because some of those might disable inlining;
otherwise, the test for inlining will succeed, but inlining won't work
with the options we're using when compiling.
use the V_CCOPT flags, because some of those might disable inlining;
otherwise, the test for inlining will succeed, but inlining won't work
with the options we're using when compiling.
interface address, not just the *first* interface address.
For the name service message:
add length checking, both against truncated packets and bogus
lengths;
use fn_printn to print the name, to protect against control
characters, etc. in the name.
are.
To extract a 32-bit big-endian quantity from a particular address, use
EXTRACT_32BITS(), don't do pointer casting - casting a "char *" or
"unsigned char *" to point to a multi-byte quantity doesn't guarantee
the pointer can be dereferenced and give you the right answer (SPARC
traps on unaligned pointer accesses, some other processor types might
also trap, or might ignore the low bits of the pointer).
I think this is a mistake in the procedure used to display the
bitfield. Instead of tok2str() it should be bittok2str() - at
least since I changed it it display the flag field of the RSVP
session attribute correctly.
Diff file attached.
Additionally I've taken the freedom to shorten the displayed
strings a bit, taking the "desired" away that was in every
string. While correct RFC it fills the screen. Not sure about
your procedures changing output but as it never displayed before
anyway ... ;-)
on a system that comes with libpcap, to link with the system libpcap
even if, say, you've installed a newer libpcap under /usr/local and its
pcap-config added -L/usr/local/lib to LDFLAGS, as the -L/usr/lib comes
earlier in LDFLAGS. (For "would", read "did, when I tried it".)
option names, so that the "-v" display, which prints options separated
by spaces, isn't ambiguous. (The BOOTP dissector has hyphens in the
BOOTP/DHCP option names.)
ndo_error, and ndo_warning function pointers in a netdissect_options
structure.
Fix some errors adding that caught.
Have the RRCP dissector extract fields itself, with the EXTRACT_ macros
and a u_char pointer, rather than printing numbers from a structure
which doesn't put structure members on natural boundaries
(__attribute__((packed)) doesn't help, as not all compilers support it)
- note also that not all processors support dereferencing unaligned
pointers, e.g. SPARC - and assuming some fields are in the "right" byte
order. Also have it check whether data is available in the packet
before referring to it.
so we can't rely on it, and it shouldn't be necessary in any case (all
items in that structure are aligned on their natural boundaries, and the
structure length is a multiple of the natural boundary of the most
strictly aligned member).
script and, if we find it, query it to see what additional libraries are
needed to link with that library.
If we're not, check for a system pcap-config script and, if we find it,
query it to see what C compiler flags and linker flags are needed to
build with that library.
Unfortunately OLSR uses the same IDs for IPv4 and IPv6 packets, even
though the size of "messages" differ. The version of the internet protocol
is therefore handed to the "olsr_print" function.
The code isn't very nice, due to a high density of #ifdef INET6'es. If
IPv6-support really should be optional, I'm afraid this is inevitable.
Both, compilation with and without IPv6 support has been tested.
The patch addresses fixes other issues, too. The length given in the packet
was used for pointer arithmetic without checking if the value was in a
reasonable range first in several places. It should now be possible to
decode more than one "namespace message" within a single packet. Other
changes remove trailing whitespace or fix lines indented with tabs (the
majority of the file is indented using spaces).
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
Especially not to do pointer arithmetic.
This is a real problem even without malicious people around if you use
OLSR via IPv6, because the message IDs didn't change but addresses are
now longer than four bytes.
Signed-off-by: Florian Forster <octo@leeloo.lan.home.verplant.org>
printed when trying to print packets for a DLT_ for which we don't have
a printer to indicate that you can still save to a capture file in that
case. (Slightly changed not to require DLT_USB_LINUX_MMAPPED to be
defined, for older libpcaps that only define DLT_USB_LINUX.)