From d550f4727c342321a375a663325b872658e76fcd Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 1 Feb 2005 13:28:04 +0000 Subject: [PATCH] hcidump: Add option for verbose decoding --- tools/hcidump.1 | 3 +++ tools/hcidump.c | 10 ++++++++-- tools/parser/parser.h | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/hcidump.1 b/tools/hcidump.1 index a17dd23bd..9e87e8e02 100644 --- a/tools/hcidump.1 +++ b/tools/hcidump.1 @@ -90,6 +90,9 @@ Sets the PSM value for the Hardcopy Control Channel .TP .BR -O ", " "\-\^\-obex" Sets the RFCOMM channel value for the Object Exchange protocol +.TP +.BR -V ", " "\-\^\-verbose" +Enables a more verbose decoding of every packet. .SH FILTERS .B filter diff --git a/tools/hcidump.c b/tools/hcidump.c index ec35e702c..6cb77c53b 100644 --- a/tools/hcidump.c +++ b/tools/hcidump.c @@ -447,7 +447,8 @@ static void usage(void) " -C, --cmtp=psm PSM for CMTP\n" " -H, --hcrp=psm PSM for HCRP\n" " -O, --obex=channel Channel for OBEX\n" - " -?, --help Give this help list\n" + " -V, --verbose Verbose decoding\n" + " -h, --help Give this help list\n" " --usage Give a short usage message\n" ); } @@ -470,6 +471,7 @@ static struct option main_options[] = { { "cmtp", 1, 0, 'C' }, { "hcrp", 1, 0, 'H' }, { "obex", 1, 0, 'O' }, + { "verbose", 0, 0, 'V' }, { "help", 0, 0, 'h' }, { 0 } }; @@ -482,7 +484,7 @@ int main(int argc, char *argv[]) printf("HCI sniffer - Bluetooth packet analyzer ver %s\n", VERSION); - while ((opt=getopt_long(argc, argv, "i:l:p:m:w:r:s:n:taxXRBC:H:O:h", main_options, NULL)) != -1) { + while ((opt=getopt_long(argc, argv, "i:l:p:m:w:r:s:n:taxXRBC:H:O:Vh", main_options, NULL)) != -1) { switch(opt) { case 'i': device = atoi(optarg + 3); @@ -574,6 +576,10 @@ int main(int argc, char *argv[]) set_proto(0, 0, atoi(optarg), SDP_UUID_OBEX); break; + case 'V': + flags |= DUMP_VERBOSE; + break; + case 'h': default: usage(); diff --git a/tools/parser/parser.h b/tools/parser/parser.h index f0d63b18b..ae13017c0 100644 --- a/tools/parser/parser.h +++ b/tools/parser/parser.h @@ -53,6 +53,7 @@ struct frame { #define DUMP_EXT 0x04 #define DUMP_RAW 0x08 #define DUMP_BPA 0x10 +#define DUMP_VERBOSE 0x40 #define DUMP_TSTAMP 0x80 #define DUMP_TYPE_MASK (DUMP_ASCII | DUMP_HEX | DUMP_EXT) -- 2.47.3