monitor: Add support for RAW Open and RAW Close control messages
diff --git a/monitor/packet.c b/monitor/packet.c
index 224d450..6412af4 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -108,6 +108,7 @@
 
 #define UNKNOWN_MANUFACTURER 0xffff
 
+#define CTRL_RAW  0x0000
 #define CTRL_MGMT 0x0001
 
 #define MAX_CTRL 64
@@ -9173,13 +9174,14 @@
 
 	sprintf(channel, "0x%4.4x", cookie);
 
-	if (format == CTRL_MGMT && size >= 8) {
+	if ((format == CTRL_RAW || format == CTRL_MGMT) && size >= 8) {
 		uint8_t version;
 		uint16_t revision;
 		uint32_t flags;
 		uint8_t ident_len;
 		const char *comm;
 		char details[48];
+		const char *title;
 
 		version = get_u8(data);
 		revision = get_le16(data + 1);
@@ -9200,8 +9202,13 @@
 				flags & 0x0001 ? "(privileged) " : "",
 				version, revision);
 
+		if (format == CTRL_RAW)
+			title = "RAW Open";
+		else
+			title = "MGMT Open";
+
 		print_packet(tv, cred, '@', index, channel, COLOR_CTRL_OPEN,
-						"MGMT Open", comm, details);
+						title, comm, details);
 	} else {
 		char label[7];
 
@@ -9222,6 +9229,7 @@
 	uint32_t cookie;
 	uint16_t format;
 	char channel[11], label[22];
+	const char *title;
 
 	if (size < 4) {
 		print_packet(tv, cred, '*', index, NULL, COLOR_ERROR,
@@ -9239,16 +9247,22 @@
 
 	release_ctrl(cookie, &format, label);
 
-	if (format == CTRL_MGMT) {
-		print_packet(tv, cred, '@', index, channel, COLOR_CTRL_CLOSE,
-						"MGMT Close", label, NULL);
-	} else {
+	switch (format) {
+	case CTRL_RAW:
+		title = "RAW Close";
+		break;
+	case CTRL_MGMT:
+		title = "MGMT Close";
+		break;
+	default:
 		sprintf(label, "0x%4.4x", format);
-
-		print_packet(tv, cred, '@', index, channel, COLOR_CTRL_CLOSE,
-						"Control Close", label, NULL);
+		title = "Control Close";
+		break;
 	}
 
+	print_packet(tv, cred, '@', index, channel, COLOR_CTRL_CLOSE,
+							title, label, NULL);
+
 	packet_hexdump(data, size);
 }