summaryrefslogtreecommitdiff
path: root/monitor/main.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2020-04-08 10:08:24 +0200
committerMarcel Holtmann <marcel@holtmann.org>2020-04-08 10:09:05 +0200
commit5b294a56664a8c7088d1eea2bc089d812a515794 (patch)
tree649e8a42a7eb8b55db0b2849bca082260e3233f4 /monitor/main.c
parentcbbb0c2ead89ed19280ecd94e8a2fb0d22216bb6 (diff)
downloadbluez-5b294a56664a8c7088d1eea2bc089d812a515794.tar.gz
monitor: Add support for opening extra mgmt socket for events
Diffstat (limited to 'monitor/main.c')
-rw-r--r--monitor/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/monitor/main.c b/monitor/main.c
index 479df859c..24ec3c567 100644
--- a/monitor/main.c
+++ b/monitor/main.c
@@ -69,6 +69,7 @@ static void usage(void)
"\t-d, --tty <tty> Read data from TTY\n"
"\t-B, --tty-speed <rate> Set TTY speed (default 115200)\n"
"\t-V, --vendor <compid> Set default company identifier\n"
+ "\t-M, --mgmt Open channel for mgmt events\n"
"\t-t, --time Show time instead of time offset\n"
"\t-T, --date Show time and date information\n"
"\t-S, --sco Dump SCO traffic\n"
@@ -92,6 +93,7 @@ static const struct option main_options[] = {
{ "tty", required_argument, NULL, 'd' },
{ "tty-speed", required_argument, NULL, 'B' },
{ "vendor", required_argument, NULL, 'V' },
+ { "mgmt", no_argument, NULL, 'M' },
{ "time", no_argument, NULL, 't' },
{ "date", no_argument, NULL, 'T' },
{ "sco", no_argument, NULL, 'S' },
@@ -130,7 +132,7 @@ int main(int argc, char *argv[])
int opt;
struct sockaddr_un addr;
- opt = getopt_long(argc, argv, "r:w:a:s:p:i:d:B:V:tTSAE:PJ:R:vh",
+ opt = getopt_long(argc, argv, "r:w:a:s:p:i:d:B:V:MtTSAE:PJ:R:vh",
main_options, NULL);
if (opt < 0)
break;
@@ -180,6 +182,9 @@ int main(int argc, char *argv[])
str = optarg;
packet_set_fallback_manufacturer(atoi(str));
break;
+ case 'M':
+ filter_mask |= PACKET_FILTER_SHOW_MGMT_SOCKET;
+ break;
case 't':
filter_mask &= ~PACKET_FILTER_SHOW_TIME_OFFSET;
filter_mask |= PACKET_FILTER_SHOW_TIME;