monitor: Deal with user channel open/close notifications
diff --git a/monitor/packet.c b/monitor/packet.c
index 9dc709e..c8796cf 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -109,7 +109,8 @@
#define UNKNOWN_MANUFACTURER 0xffff
#define CTRL_RAW 0x0000
-#define CTRL_MGMT 0x0001
+#define CTRL_USER 0x0001
+#define CTRL_MGMT 0x0002
#define MAX_CTRL 64
@@ -9174,7 +9175,8 @@
sprintf(channel, "0x%4.4x", cookie);
- if ((format == CTRL_RAW || format == CTRL_MGMT) && size >= 8) {
+ if ((format == CTRL_RAW || format == CTRL_USER || format == CTRL_MGMT)
+ && size >= 8) {
uint8_t version;
uint16_t revision;
uint32_t flags;
@@ -9202,10 +9204,20 @@
flags & 0x0001 ? "(privileged) " : "",
version, revision);
- if (format == CTRL_RAW)
+ switch (format) {
+ case CTRL_RAW:
title = "RAW Open";
- else
+ break;
+ case CTRL_USER:
+ title = "USER Open";
+ break;
+ case CTRL_MGMT:
title = "MGMT Open";
+ break;
+ default:
+ title = "Control Open";
+ break;
+ }
print_packet(tv, cred, '@', index, channel, COLOR_CTRL_OPEN,
title, comm, details);
@@ -9251,6 +9263,9 @@
case CTRL_RAW:
title = "RAW Close";
break;
+ case CTRL_USER:
+ title = "USER Close";
+ break;
case CTRL_MGMT:
title = "MGMT Close";
break;