X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/2cd0a90c24ccf01ad9a034d7d5a6a651c82a4785..5cea888d12b8ca4009baff3207a3d5712c58acc7:/tcpdump.c?ds=inline diff --git a/tcpdump.c b/tcpdump.c index 64aad160..107cdbb6 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -150,6 +150,8 @@ The Regents of the University of California. All rights reserved.\n"; #include "print.h" +#include "fptype.h" + #ifndef PATH_MAX #define PATH_MAX 1024 #endif @@ -687,6 +689,7 @@ show_remote_devices_and_exit(void) #define OPTION_LIST_REMOTE_INTERFACES 132 #define OPTION_TSTAMP_MICRO 133 #define OPTION_TSTAMP_NANO 134 +#define OPTION_FP_TYPE 135 static const struct option longopts[] = { #if defined(HAVE_PCAP_CREATE) || defined(_WIN32) @@ -730,6 +733,7 @@ static const struct option longopts[] = { { "debug-filter-parser", no_argument, NULL, 'Y' }, #endif { "relinquish-privileges", required_argument, NULL, 'Z' }, + { "fp-type", no_argument, NULL, OPTION_FP_TYPE }, { "number", no_argument, NULL, '#' }, { "print", no_argument, NULL, OPTION_PRINT }, { "version", no_argument, NULL, OPTION_VERSION }, @@ -1891,6 +1895,17 @@ main(int argc, char **argv) break; #endif + case OPTION_FP_TYPE: + /* + * Print out the type of floating-point arithmetic + * we're doing; it's probably IEEE, unless somebody + * tries to run this on a VAX, but the precision + * may differ (e.g., it might be 32-bit, 64-bit, + * or 80-bit). + */ + float_type_check(0x4e93312d); + return 0; + default: print_usage(); exit_tcpdump(S_ERR_HOST_PROGRAM);