From ae722e690ffec917ffbfd026f3be0ead2b67f119 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 13 Mar 2005 15:13:36 +0000 Subject: [PATCH] hcidump: Remove the BPA mode --- tools/hcidump.1 | 5 +---- tools/hcidump.c | 25 ++++++------------------- tools/parser/parser.h | 2 +- 3 files changed, 8 insertions(+), 24 deletions(-) diff --git a/tools/hcidump.1 b/tools/hcidump.1 index 062f8d48c..9cc22c805 100644 --- a/tools/hcidump.1 +++ b/tools/hcidump.1 @@ -77,10 +77,7 @@ For every packet, not only is the packet type displayed, but also all data in he For every packet, not only is the packet type displayed, but also all data in hex and ASCII. .TP .BR -R ", " "\-\^\-raw" -Raw mode: do not display packet type, only data. -.TP -.BR -B ", " "\-\^\-bpa" -BPA mode: only display vendor specific data packets. +For every packet, only the raw data is displayed. .TP .BR -C ", " "\-\^\-cmtp" Sets the PSM value for the CAPI Message Transport Protocol diff --git a/tools/hcidump.c b/tools/hcidump.c index 880c8f3da..335d815c0 100644 --- a/tools/hcidump.c +++ b/tools/hcidump.c @@ -283,15 +283,8 @@ static int open_socket(int dev, unsigned long flags) /* Setup filter */ hci_filter_clear(&flt); - if (flags & DUMP_BPA) { - hci_filter_set_ptype(HCI_VENDOR_PKT, &flt); - hci_filter_set_ptype(HCI_EVENT_PKT, &flt); - hci_filter_set_event(EVT_VENDOR, &flt); - } else { - hci_filter_all_ptypes(&flt); - hci_filter_all_events(&flt); - hci_filter_clear_ptype(HCI_VENDOR_PKT, &flt); - } + hci_filter_all_ptypes(&flt); + hci_filter_all_events(&flt); if (setsockopt(sk, SOL_HCI, HCI_FILTER, &flt, sizeof(flt)) < 0) { perror("Can't set HCI filter"); exit(1); @@ -410,6 +403,8 @@ static struct { { "avdtp", FILT_AVDTP }, { "obex", FILT_OBEX }, { "capi", FILT_CAPI }, + { "csr", FILT_CSR }, + { "dga", FILT_DGA }, { 0 } }; @@ -443,8 +438,7 @@ static void usage(void) " -a, --ascii Dump data in ascii\n" " -x, --hex Dump data in hex\n" " -X, --ext Dump data in hex and ascii\n" - " -R, --raw Raw mode\n" - " -B, --bpa BPA mode\n" + " -R, --raw Dump raw data\n" " -C, --cmtp=psm PSM for CMTP\n" " -H, --hcrp=psm PSM for HCRP\n" " -O, --obex=channel Channel for OBEX\n" @@ -468,7 +462,6 @@ static struct option main_options[] = { { "hex", 0, 0, 'x' }, { "ext", 0, 0, 'X' }, { "raw", 0, 0, 'R' }, - { "bpa", 0, 0, 'B' }, { "cmtp", 1, 0, 'C' }, { "hcrp", 1, 0, 'H' }, { "obex", 1, 0, 'O' }, @@ -485,7 +478,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:Vh", main_options, NULL)) != -1) { + while ((opt=getopt_long(argc, argv, "i:l:p:m:w:r:s:n:taxXRC:H:O:Vh", main_options, NULL)) != -1) { switch(opt) { case 'i': device = atoi(optarg + 3); @@ -559,12 +552,6 @@ int main(int argc, char *argv[]) flags |= DUMP_RAW; break; - case 'B': - flags |= DUMP_BPA; - if (defcompid == DEFAULT_COMPID) - defcompid = 12; - break; - case 'C': set_proto(0, atoi(optarg), 0, SDP_UUID_CMTP); break; diff --git a/tools/parser/parser.h b/tools/parser/parser.h index 6409e3851..ef0cdb1df 100644 --- a/tools/parser/parser.h +++ b/tools/parser/parser.h @@ -74,7 +74,7 @@ struct frame { #define FILT_OBEX 0x00010000 #define FILT_CAPI 0x00020000 #define FILT_CSR 0x1000000a -#define FILT_BPA 0x1000000f +#define FILT_DGA 0x1000000c #define STRUCT_OFFSET(type, member) ((uint8_t *)&(((type *)NULL)->member) - \ (uint8_t *)((type *)NULL)) -- 2.47.3