- ann_class = 0;
- if (g_strv_length(keyval) == 2) {
- for (l = dec->annotations; l; l = l->next, ann_class++) {
- ann_descr = l->data;
- if (!canon_cmp(ann_descr[0], keyval[1]))
- /* Found it. */
- break;
- }
- if (!l) {
- g_critical("Annotation '%s' not found "
- "for protocol decoder '%s'.", keyval[1], keyval[0]);
- return 1;
+ if (g_strv_length(keyval) == 2 && keyval[1][0] != '\0') {
+ annlist = g_strsplit(keyval[1], ":", 0);
+ for (ann = annlist; *ann && **ann; ann++) {
+ ann_class = 0;
+ for (l = dec->annotations; l; l = l->next, ann_class++) {
+ ann_descr = l->data;
+ if (!canon_cmp(ann_descr[0], *ann))
+ /* Found it. */
+ break;
+ }
+ if (!l) {
+ g_critical("Annotation '%s' not found "
+ "for protocol decoder '%s'.", *ann, keyval[0]);
+ return 1;
+ }
+ l_ann = g_hash_table_lookup(pd_ann_visible, keyval[0]);
+ l_ann = g_slist_append(l_ann, GINT_TO_POINTER(ann_class));
+ g_hash_table_replace(pd_ann_visible, g_strdup(keyval[0]), l_ann);
+ g_debug("cli: Showing protocol decoder %s annotation "
+ "class %d (%s).", keyval[0], ann_class, ann_descr[0]);