X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/5ee91ef4b64a56003edc9535f6445d3bba1fdffd..2fd7b16acb63b86d7291abb4c68c27e24bc50a85:/tcpdump.c diff --git a/tcpdump.c b/tcpdump.c index 7159d1c7..5e232197 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -157,7 +157,6 @@ The Regents of the University of California. All rights reserved.\n"; #include "netdissect.h" #include "interface.h" #include "addrtoname.h" -#include "machdep.h" #include "pcap-missing.h" #include "ascii_strcasecmp.h" @@ -705,6 +704,7 @@ show_remote_devices_and_exit(void) #define OPTION_FP_TYPE 135 #define OPTION_COUNT 136 #define OPTION_PRINT_SAMPLING 137 +#define OPTION_LENGTHS 138 static const struct option longopts[] = { #if defined(HAVE_PCAP_CREATE) || defined(_WIN32) @@ -753,12 +753,13 @@ static const struct option longopts[] = { { "number", no_argument, NULL, '#' }, { "print", no_argument, NULL, OPTION_PRINT }, { "print-sampling", required_argument, NULL, OPTION_PRINT_SAMPLING }, + { "lengths", no_argument, NULL, OPTION_LENGTHS }, { "version", no_argument, NULL, OPTION_VERSION }, { NULL, 0, NULL, 0 } }; #ifdef HAVE_PCAP_FINDALLDEVS_EX -#define LIST_REMOTE_INTERFACES_USAGE "[ --list-remote-interfaces remote-source ]" +#define LIST_REMOTE_INTERFACES_USAGE " [ --list-remote-interfaces remote-source ]" #else #define LIST_REMOTE_INTERFACES_USAGE #endif @@ -1565,16 +1566,6 @@ main(int argc, char **argv) error("Attempting to initialize Winsock failed"); #endif - /* - * On platforms where the CPU doesn't support unaligned loads, - * force unaligned accesses to abort with SIGBUS, rather than - * being fixed up (slowly) by the OS kernel; on those platforms, - * misaligned accesses are bugs, and we want tcpdump to crash so - * that the bugs are reported. - */ - if (abort_on_misalignment(ebuf, sizeof(ebuf)) < 0) - error("%s", ebuf); - /* * An explicit tzset() call is usually not needed as it happens * implicitly the first time we call localtime() or mktime(), @@ -1990,6 +1981,10 @@ main(int argc, char **argv) ndo->ndo_packet_number = 1; break; + case OPTION_LENGTHS: + ndo->ndo_lengths = 1; + break; + case OPTION_VERSION: print_version(stdout); exit_tcpdump(S_SUCCESS); @@ -3340,7 +3335,7 @@ print_usage(FILE *f) "\t\t[ -i interface ]" IMMEDIATE_MODE_USAGE j_FLAG_USAGE "\n"); #ifdef HAVE_PCAP_FINDALLDEVS_EX (void)fprintf(f, -"\t\t" LIST_REMOTE_INTERFACES_USAGE "\n"); +"\t\t[ --lengths ]" LIST_REMOTE_INTERFACES_USAGE "\n"); #endif #ifdef USE_LIBSMI (void)fprintf(f,