Diff between 093f6c968c0e031876a1e8a4497179c27e391581 and 73a9e627efef661c6ba7a2e62f8aac4728bf0eef

Changed Files

File Additions Deletions Status
monitor/main.c +4 -0 modified
monitor/packet.c +33 -0 modified
monitor/packet.h +2 -0 modified

Full Patch

diff --git a/monitor/main.c b/monitor/main.c
index e72b240..aed9b03 100644
--- a/monitor/main.c
+++ b/monitor/main.c
@@ -70,6 +70,7 @@ static const struct option main_options[] = {
 	{ "time",    no_argument,       NULL, 't' },
 	{ "date",    no_argument,       NULL, 'T' },
 	{ "sco",     no_argument,	NULL, 'S' },
+	{ "todo",    no_argument,       NULL, '#' },
 	{ "version", no_argument,       NULL, 'v' },
 	{ "help",    no_argument,       NULL, 'h' },
 	{ }
@@ -126,6 +127,9 @@ int main(int argc, char *argv[])
 		case 'S':
 			filter_mask |= PACKET_FILTER_SHOW_SCO_DATA;
 			break;
+		case '#':
+			packet_todo();
+			return EXIT_SUCCESS;
 		case 'v':
 			printf("%s\n", VERSION);
 			return EXIT_SUCCESS;
diff --git a/monitor/packet.c b/monitor/packet.c
index 212ccc6..65ead26 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -6574,3 +6574,36 @@ void packet_hci_scodata(struct timeval *tv, uint16_t index, bool in,
 	if (filter_mask & PACKET_FILTER_SHOW_SCO_DATA)
 		packet_hexdump(data, size);
 }
+
+void packet_todo(void)
+{
+	int i;
+
+	printf("HCI commands with missing decodings:\n");
+
+	for (i = 0; opcode_table[i].str; i++) {
+		if (opcode_table[i].bit < 0)
+			continue;
+
+		if (opcode_table[i].cmd_func)
+			continue;
+
+		printf("\t%s\n", opcode_table[i].str);
+	}
+
+	printf("HCI events with missing decodings:\n");
+
+	for (i = 0; event_table[i].str; i++) {
+		if (event_table[i].func)
+			continue;
+
+		printf("\t%s\n", event_table[i].str);
+	}
+
+	for (i = 0; subevent_table[i].str; i++) {
+		if (subevent_table[i].func)
+			continue;
+
+		printf("\t%s\n", subevent_table[i].str);
+	}
+}
diff --git a/monitor/packet.h b/monitor/packet.h
index 07c1ec3..d44849c 100644
--- a/monitor/packet.h
+++ b/monitor/packet.h
@@ -67,3 +67,5 @@ void packet_hci_acldata(struct timeval *tv, uint16_t index, bool in,
 					const void *data, uint16_t size);
 void packet_hci_scodata(struct timeval *tv, uint16_t index, bool in,
 					const void *data, uint16_t size);
+
+void packet_todo(void);