diff --git a/monitor/main.c b/monitor/main.c
index de48db5..faf629e 100644
--- a/monitor/main.c
+++ b/monitor/main.c
"\t-w, --write <file> Save traces in btsnoop format\n"
"\t-a, --analyze <file> Analyze traces in btsnoop format\n"
"\t-s, --server <socket> Start monitor server socket\n"
+ "\t-p, --priority <level> Show only priority or lower\n"
"\t-i, --index <num> Show only specified controller\n"
"\t-t, --time Show time instead of time offset\n"
"\t-T, --date Show time and date information\n"
for (;;) {
int opt;
- opt = getopt_long(argc, argv, "r:w:a:s:i:tTSE:vh",
+ opt = getopt_long(argc, argv, "r:w:a:s:p:i:tTSE:vh",
main_options, NULL);
if (opt < 0)
break;
case 's':
control_server(optarg);
break;
+ case 'p':
+ packet_set_priority(optarg);
+ break;
case 'i':
if (strlen(optarg) > 3 && !strncmp(optarg, "hci", 3))
str = optarg + 3;
diff --git a/monitor/packet.c b/monitor/packet.c
index 8674542..1e3fc4c 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
#define COLOR_PHY_PACKET COLOR_BLUE
static time_t time_offset = ((time_t) -1);
+static int priority_level = 6;
static unsigned long filter_mask = 0;
static bool index_filter = false;
static uint16_t index_number = 0;
filter_mask &= ~filter;
}
+void packet_set_priority(const char *priority)
+{
+ priority_level = atoi(priority);
+}
+
void packet_select_index(uint16_t index)
{
filter_mask &= ~PACKET_FILTER_SHOW_INDEX;
const char *label;
const char *color;
+ if (priority > priority_level)
+ return;
+
switch (priority) {
case 0x03:
color = COLOR_ERROR;
diff --git a/monitor/packet.h b/monitor/packet.h
index 218a63b..322f101 100644
--- a/monitor/packet.h
+++ b/monitor/packet.h
void packet_add_filter(unsigned long filter);
void packet_del_filter(unsigned long filter);
+void packet_set_priority(const char *priority);
void packet_select_index(uint16_t index);
void packet_hexdump(const unsigned char *buf, uint16_t len);