Convert ASN.1 dissectors to use filterable expert info.
authorMichael Mann <mmann78@netscape.net>
Mon, 3 Jun 2013 03:42:36 +0000 (03:42 -0000)
committerMichael Mann <mmann78@netscape.net>
Mon, 3 Jun 2013 03:42:36 +0000 (03:42 -0000)
NOTE: Kerberos ASN.1 template was updated, but not generated to source.

svn path=/trunk/; revision=49707

58 files changed:
asn1/acse/packet-acse-template.c
asn1/c1222/packet-c1222-template.c
asn1/camel/camel.cnf
asn1/camel/packet-camel-template.c
asn1/cdt/cdt.cnf
asn1/cdt/packet-cdt-template.c
asn1/dop/packet-dop-template.c
asn1/goose/goose.cnf
asn1/goose/packet-goose-template.c
asn1/gsm_map/packet-gsm_map-template.c
asn1/h248/h248.cnf
asn1/h248/packet-h248-template.c
asn1/inap/inap.cnf
asn1/inap/packet-inap-template.c
asn1/kerberos/packet-kerberos-template.c
asn1/ldap/ldap.cnf
asn1/ldap/packet-ldap-template.c
asn1/lte-rrc/lte-rrc.cnf
asn1/lte-rrc/packet-lte-rrc-template.c
asn1/mms/mms.cnf
asn1/mms/packet-mms-template.c
asn1/nbap/nbap.cnf
asn1/nbap/packet-nbap-template.c
asn1/p1/p1.cnf
asn1/p1/packet-p1-template.c
asn1/pres/packet-pres-template.c
asn1/pres/pres.cnf
asn1/ros/packet-ros-template.c
asn1/ros/ros-err.cnf
asn1/ros/ros-inv.cnf
asn1/ros/ros-res.cnf
asn1/rrc/packet-rrc-template.c
asn1/rrc/rrc.cnf
asn1/rtse/packet-rtse-template.c
asn1/snmp/packet-snmp-template.c
asn1/snmp/snmp.cnf
asn1/sv/packet-sv-template.c
asn1/sv/sv.cnf
epan/dissectors/packet-acse.c
epan/dissectors/packet-c1222.c
epan/dissectors/packet-camel.c
epan/dissectors/packet-cdt.c
epan/dissectors/packet-dop.c
epan/dissectors/packet-goose.c
epan/dissectors/packet-gsm_map.c
epan/dissectors/packet-h248.c
epan/dissectors/packet-inap.c
epan/dissectors/packet-ldap.c
epan/dissectors/packet-lte-rrc.c
epan/dissectors/packet-mms.c
epan/dissectors/packet-nbap.c
epan/dissectors/packet-p1.c
epan/dissectors/packet-pres.c
epan/dissectors/packet-ros.c
epan/dissectors/packet-rrc.c
epan/dissectors/packet-rtse.c
epan/dissectors/packet-snmp.c
epan/dissectors/packet-sv.c

index 638e502926e3512feacab6b025a7808310a7fb68..42ca6e900ac7b7048bb510f39fb2a932aaaf5c1c 100644 (file)
@@ -74,6 +74,8 @@ int proto_clacse = -1;
 static gint ett_acse = -1;
 #include "packet-acse-ett.c"
 
+static expert_field ei_acse_dissector_not_available = EI_INIT;
+
 static struct SESSION_DATA_STRUCTURE* session = NULL;
 
 static const char *object_identifier_id;
@@ -215,7 +217,7 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
                        call_ber_oid_callback(oid, tvb, offset, pinfo, parent_tree);
                } else {
                        proto_item *ti = proto_tree_add_text(parent_tree, tvb, offset, -1, "dissector is not available");
-                       expert_add_info_format(pinfo, ti, PI_UNDECODED, PI_WARN, "Dissector is not available");
+                       expert_add_info(pinfo, ti, &ei_acse_dissector_not_available);
                }
                top_tree = NULL;
                return;
@@ -275,6 +277,12 @@ void proto_register_acse(void) {
 #include "packet-acse-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_acse_dissector_not_available, { "acse.dissector_not_available", PI_UNDECODED, PI_WARN, "Dissector is not available", EXPFILL }},
+  };
+
+  expert_module_t* expert_acse;
+
   /* Register protocol */
   proto_acse = proto_register_protocol(PNAME, PSNAME, PFNAME);
   register_dissector("acse", dissect_acse, proto_acse);
@@ -286,7 +294,8 @@ void proto_register_acse(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_acse, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
-
+  expert_acse = expert_register_protocol(proto_acse);
+  expert_register_field_array(expert_acse, ei, array_length(ei));
 }
 
 
index fdc28971b38ffce7aa2f0c6ad0d2fa3e6f6e9670..e2158b6ecaaa188ebbf0747e0e29901a8bb98024 100644 (file)
@@ -181,6 +181,19 @@ static guint32 iv_element_len = 0;
 
 #include "packet-c1222-ett.c"
 
+static expert_field ei_c1222_command_truncated = EI_INIT;
+static expert_field ei_c1222_bad_checksum = EI_INIT;
+static expert_field ei_c1222_epsem_missing = EI_INIT;
+#ifdef HAVE_LIBGCRYPT
+static expert_field ei_c1222_epsem_failed_authentication = EI_INIT;
+#else
+static expert_field ei_c1222_epsem_not_authenticated = EI_INIT;
+#endif
+static expert_field ei_c1222_epsem_not_decryped = EI_INIT;
+static expert_field ei_c1222_ed_class_missing = EI_INIT;
+static expert_field ei_c1222_epsem_ber_length_error = EI_INIT;
+static expert_field ei_c1222_epsem_field_length_error = EI_INIT;
+static expert_field ei_c1222_mac_missing = EI_INIT;
 
 /*------------------------------
  * Data Structures
@@ -378,7 +391,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
            proto_item_set_text(tree, "C12.22 EPSEM: %s (id %d, user \"%s\")",
                    val_to_str(cmd,commandnames,"Unknown (0x%02x)"), user_id, user_name);
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 LOGON command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 LOGON command truncated");
        }
        break;
     case C1222_CMD_SECURITY:
@@ -399,7 +412,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                      val_to_str(cmd,commandnames,"Unknown (0x%02x)"), password);
            }
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 SECURITY command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 SECURITY command truncated");
        }
        break;
     case C1222_CMD_AUTHENTICATE:
@@ -415,10 +428,10 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                proto_item_set_text(tree, "C12.22 EPSEM: %s (%d bytes: %s)",
                    val_to_str(cmd,commandnames,"Unknown (0x%02x)"), auth_len, auth_req);
            } else {
-               expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 AUTHENTICATE command truncated");
+               expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 AUTHENTICATE command truncated");
            }
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 AUTHENTICATE command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 AUTHENTICATE command truncated");
        }
        break;
     case C1222_CMD_FULL_READ:
@@ -431,7 +444,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
            *offset += 2;
            *length -= 2;
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 READ command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 READ command truncated");
        }
        break;
     case C1222_CMD_PARTIAL_READ_OFFSET:
@@ -450,7 +463,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                    val_to_str(cmd,commandnames,"Unknown (0x%02x)"),
                    val_to_str((table >> 8) & 0xF8, tableflags,"Unknown (0x%04x)"), table & 0x7FF);
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 READ command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 READ command truncated");
        }
        break;
     case C1222_CMD_FULL_WRITE:
@@ -471,7 +484,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                item = proto_tree_add_uint(tree, hf_c1222_write_chksum, tvb, *offset, 1, chksum);
                calcsum = c1222_cksum(tvb, (*offset)-tblsize, tblsize);
                if (chksum != calcsum) {
-                 expert_add_info_format(pinfo, item, PI_CHECKSUM, PI_ERROR, "Bad checksum [should be 0x%02x]", calcsum);
+                 expert_add_info_format_text(pinfo, item, &ei_c1222_bad_checksum, "Bad checksum [should be 0x%02x]", calcsum);
                }
                proto_item_set_text(tree, "C12.22 EPSEM: %s (%s-%d)",
                        val_to_str(cmd,commandnames,"Unknown (0x%02x)"),
@@ -479,10 +492,10 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                *offset += 1;
                *length -= 1;
            } else {
-               expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 WRITE command truncated");
+               expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 WRITE command truncated");
            }
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 WRITE command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 WRITE command truncated");
        }
        break;
     case C1222_CMD_PARTIAL_WRITE_OFFSET:
@@ -506,7 +519,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                item = proto_tree_add_uint(tree, hf_c1222_write_chksum, tvb, *offset, 1, chksum);
                calcsum = c1222_cksum(tvb, (*offset)-tblsize, tblsize);
                if (chksum != calcsum) {
-                 expert_add_info_format(pinfo, item, PI_CHECKSUM, PI_ERROR, "Bad checksum [should be 0x%02x]", calcsum);
+                 expert_add_info_format_text(pinfo, item, &ei_c1222_bad_checksum, "Bad checksum [should be 0x%02x]", calcsum);
                }
                proto_item_set_text(tree, "C12.22 EPSEM: %s (%s-%d)",
                        val_to_str(cmd,commandnames,"Unknown (0x%02x)"),
@@ -514,10 +527,10 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                *offset += 1;
                *length -= 1;
            } else {
-               expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 WRITE command truncated");
+               expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 WRITE command truncated");
            }
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 WRITE command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 WRITE command truncated");
        }
        break;
     case C1222_CMD_WAIT:
@@ -529,7 +542,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
            proto_item_set_text(tree, "C12.22 EPSEM: %s (%d seconds)",
                val_to_str(cmd,commandnames,"Unknown (0x%02x)"), wait_seconds);
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 WAIT command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 WAIT command truncated");
        }
        break;
     case C1222_CMD_NEGOTIATE:
@@ -545,7 +558,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
            proto_item_set_text(tree, "C12.22 EPSEM: %s (pkt size %d, num pkts %d, with %d baud rates)",
                    val_to_str(cmd,commandnames,"Unknown (0x%02x)"), packet_size, nbr_packet, numrates);
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 NEGOTIATE command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 NEGOTIATE command truncated");
        }
        break;
     case C1222_CMD_TIMING_SETUP:
@@ -569,7 +582,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
            proto_item_set_text(tree, "C12.22 EPSEM: %s (traffic to %d s, inter-char to %d s, response to %d s, %d retries)",
                    val_to_str(cmd,commandnames,"Unknown (0x%02x)"), traffic, inter_char, resp_to, nbr_retries);
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 NEGOTIATE command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 NEGOTIATE command truncated");
        }
        break;
 
@@ -580,7 +593,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
            if (*length >= *length) {
              proto_tree_add_item(tree, hf_c1222_data, tvb, *offset, *length, ENC_NA);
            } else {
-               expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 unknown command truncated");
+               expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 unknown command truncated");
            }
        }
        break;
@@ -872,7 +885,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
   gboolean encrypted = FALSE;
 
   if ((tvb == NULL) && (len == 0)) {
-      expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 EPSEM missing");
+      expert_add_info(pinfo, tree, &ei_c1222_epsem_missing);
       return offset;
   }
   /* parse the flags byte which is always unencrypted */
@@ -913,9 +926,9 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
        if (!decrypt_packet(buffer, len2, FALSE)) {
 #ifdef HAVE_LIBGCRYPT
          crypto_bad = TRUE;
-         expert_add_info_format(pinfo, tree, PI_SECURITY, PI_ERROR, "C12.22 EPSEM failed authentication");
+         expert_add_info(pinfo, tree, &ei_c1222_epsem_failed_authentication);
 #else /* HAVE_LIBGCRYPT */
-         expert_add_info_format(pinfo, tree, PI_SECURITY, PI_WARN, "C12.22 EPSEM could not be authenticated");
+         expert_add_info(pinfo, tree, &ei_c1222_epsem_not_authenticated);
 #endif /* HAVE_LIBGCRYPT */
        } else {
          crypto_good = TRUE;
@@ -929,7 +942,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
   /* it's only encrypted if we have an undecrypted payload */
   if (encrypted) {
     proto_tree_add_item(tree, hf_c1222_epsem_total, tvb, offset, -1, ENC_NA);
-    expert_add_info_format(pinfo, tree, PI_UNDECODED, PI_WARN, "C12.22 EPSEM could not be decrypted");
+    expert_add_info(pinfo, tree, &ei_c1222_epsem_not_decryped);
     local_offset = offset+len2-4;
     epsem_buffer = tvb;
   } else {  /* it's not (now) encrypted */
@@ -940,7 +953,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
        proto_tree_add_item(tree, hf_c1222_epsem_ed_class, epsem_buffer, local_offset, 4, ENC_NA);
        local_offset += 4;
       } else {
-       expert_add_info_format(pinfo, tree, PI_SECURITY, PI_ERROR, "C12.22 ED Class missing");
+       expert_add_info(pinfo, tree, &ei_c1222_ed_class_missing);
       }
     }
     /* what follows are one or more <epsem-data> elements possibly followed by
@@ -952,7 +965,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
       if (ber_len_ok(epsem_buffer, local_offset)) {
        local_offset = dissect_ber_length(pinfo, tree, epsem_buffer, local_offset, (guint32 *)&len2, &ind);
       } else {
-       expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 EPSEM BER length error");
+       expert_add_info(pinfo, tree, &ei_c1222_epsem_ber_length_error);
        return offset+len;
       }
       if (tvb_offset_exists(epsem_buffer, local_offset+len2-1)) {
@@ -962,7 +975,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
        parse_c1222_detailed(epsem_buffer, pinfo, cmd_tree, cmd_err, (guint32 *)&len2, &local_offset);
        local_offset += len2;
       } else {
-       expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 EPSEM field length error");
+       expert_add_info(pinfo, tree, &ei_c1222_epsem_field_length_error);
        return offset+len;
       }
     }
@@ -977,7 +990,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
       item = proto_tree_add_boolean(crypto_tree, hf_c1222_epsem_crypto_bad, tvb, local_offset, 4, crypto_bad);
       PROTO_ITEM_SET_GENERATED(item);
     } else {
-      expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 MAC missing");
+      expert_add_info(pinfo, tree, &ei_c1222_mac_missing);
       return offset+len;
     }
   }
@@ -1273,6 +1286,23 @@ void proto_register_c1222(void) {
 #include "packet-c1222-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_c1222_command_truncated, { "c1222.command_truncated", PI_MALFORMED, PI_ERROR, "C12.22 command truncated", EXPFILL }},
+     { &ei_c1222_bad_checksum, { "c1222.bad_checksum", PI_CHECKSUM, PI_ERROR, "Bad checksum", EXPFILL }},
+     { &ei_c1222_epsem_missing, { "c1222.epsem.missing", PI_MALFORMED, PI_ERROR, "C12.22 EPSEM missing", EXPFILL }},
+#ifdef HAVE_LIBGCRYPT
+     { &ei_c1222_epsem_failed_authentication, { "c1222.epsem.failed_authentication", PI_SECURITY, PI_ERROR, "C12.22 EPSEM failed authentication", EXPFILL }},
+#else
+     { &ei_c1222_epsem_not_authenticated, { "c1222.epsem.not_authenticated", PI_SECURITY, PI_WARN, "C12.22 EPSEM could not be authenticated", EXPFILL }},
+#endif
+     { &ei_c1222_epsem_not_decryped, { "c1222.epsem.not_decryped", PI_UNDECODED, PI_WARN, "C12.22 EPSEM could not be decrypted", EXPFILL }},
+     { &ei_c1222_ed_class_missing, { "c1222.ed_class_missing", PI_SECURITY, PI_ERROR, "C12.22 ED Class missing", EXPFILL }},
+     { &ei_c1222_epsem_ber_length_error, { "c1222.epsem.ber_length_error", PI_MALFORMED, PI_ERROR, "C12.22 EPSEM BER length error", EXPFILL }},
+     { &ei_c1222_epsem_field_length_error, { "c1222.epsem.field_length_error", PI_MALFORMED, PI_ERROR, "C12.22 EPSEM field length error", EXPFILL }},
+     { &ei_c1222_mac_missing, { "c1222.mac_missing", PI_MALFORMED, PI_ERROR, "C12.22 MAC missing", EXPFILL }},
+  };
+
+  expert_module_t* expert_c1222;
   module_t *c1222_module;
 
 #ifdef HAVE_LIBGCRYPT
@@ -1288,6 +1318,8 @@ void proto_register_c1222(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_c1222, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_c1222 = expert_register_protocol(proto_c1222);
+  expert_register_field_array(expert_c1222, ei, array_length(ei));
   c1222_module = prefs_register_protocol(proto_c1222, proto_reg_handoff_c1222);
   prefs_register_bool_preference(c1222_module, "desegment",
        "Reassemble all C12.22 messages spanning multiple TCP segments",
index 2ed2407687560926e5b381de44cfd1dd7c8ed69d..43002894d97f756f876c64741322abb12261cebf 100644 (file)
@@ -121,7 +121,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
     default:
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
       proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-      expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+      expert_add_info_format_text(actx->pinfo, cause, &ei_camel_unknown_invokeData, "Unknown invokeData %d",opcode);
       /* todo call the asn.1 dissector */
       break;
   }
@@ -141,7 +141,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
     proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnResultData %d",opcode);
+    expert_add_info_format_text(actx->pinfo, cause, &ei_camel_unknown_returnResultData, "Unknown returnResultData %d",opcode);
   }
   return offset;
 }
@@ -159,7 +159,7 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,a
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
     proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnErrorData %d",errorCode);
+    expert_add_info_format_text(actx->pinfo, cause, &ei_camel_unknown_returnErrorData, "Unknown returnErrorData %d",errorCode);
   }
   return offset;
 }
index 6a500dc418251cb6d4dd13ec0234ae5742e10686..33802e148ff02abfcd30d2f611c9324c4cde06ac 100644 (file)
@@ -135,6 +135,9 @@ static gint ett_camel_locationnumber = -1;
 
 #include "packet-camel-ett.c"
 
+static expert_field ei_camel_unknown_invokeData = EI_INIT;
+static expert_field ei_camel_unknown_returnResultData = EI_INIT;
+static expert_field ei_camel_unknown_returnErrorData = EI_INIT;
 
 /* Preference settings default */
 #define MAX_SSN 254
@@ -704,6 +707,15 @@ void proto_register_camel(void) {
 
 #include "packet-camel-ettarr.c"
   };
+
+  static ei_register_info ei[] = {
+     { &ei_camel_unknown_invokeData, { "camel.unknown.invokeData", PI_MALFORMED, PI_WARN, "Unknown invokeData", EXPFILL }},
+     { &ei_camel_unknown_returnResultData, { "camel.unknown.returnResultData", PI_MALFORMED, PI_WARN, "Unknown returnResultData", EXPFILL }},
+     { &ei_camel_unknown_returnErrorData, { "camel.unknown.returnErrorData", PI_MALFORMED, PI_WARN, "Unknown returnResultData", EXPFILL }},
+  };
+
+  expert_module_t* expert_camel;
+
   /* Register protocol */
   proto_camel = proto_register_protocol(PNAME, PSNAME, PFNAME);
 
@@ -713,6 +725,8 @@ void proto_register_camel(void) {
 
   proto_register_field_array(proto_camel, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_camel = expert_register_protocol(proto_camel);
+  expert_register_field_array(expert_camel, ei, array_length(ei));
 
   rose_ctx_init(&camel_rose_ctx);
 
index cf3d3fc626480b299402bdca405d8fd57a1702ca..bb4523afdc2d2eeeec03515386cfd16516863098 100644 (file)
@@ -74,8 +74,7 @@ CompressedData    B "1.3.26.0.4406.0.4.2"  "cdt"
   if (compr_tvb == NULL) {
     tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
                               "[Error: Unable to get compressed content]");
-    expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
-                            "Unable to get compressed content");
+    expert_add_info(actx->pinfo, tf, &ei_cdt_unable_compress_content);
     col_append_str (actx->pinfo->cinfo, COL_INFO, 
                     "[Error: Unable to get compressed content]");
     return offset;
@@ -86,8 +85,7 @@ CompressedData    B "1.3.26.0.4406.0.4.2"  "cdt"
   if (next_tvb == NULL) {
     tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
                               "[Error: Unable to uncompress content]");
-    expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
-                            "Unable to uncompress content");
+    expert_add_info(actx->pinfo, tf, &ei_cdt_unable_uncompress_content);
     col_append_str (actx->pinfo->cinfo, COL_INFO, 
                     "[Error: Unable to uncompress content]");
     return offset;
index a5c6edd5b5f324391f502c68708796f885ce66da..f9e4e7c386422e71f840b442cc1bf2389b05ffb9 100644 (file)
@@ -63,6 +63,9 @@ static dissector_handle_t data_handle = NULL;
 /* Initialize the subtree pointers */
 #include "packet-cdt-ett.c"
 
+static expert_field ei_cdt_unable_compress_content = EI_INIT;
+static expert_field ei_cdt_unable_uncompress_content = EI_INIT;
+
 #include "packet-cdt-fn.c"
 
 
@@ -101,13 +104,21 @@ void proto_register_cdt (void) {
 #include "packet-cdt-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_cdt_unable_compress_content, { "cdt.unable_compress_content", PI_UNDECODED, PI_ERROR, "Unable to get compressed content", EXPFILL }},
+     { &ei_cdt_unable_uncompress_content, { "cdt.unable_uncompress_content", PI_UNDECODED, PI_ERROR, "Unable to get uncompressed content", EXPFILL }},
+  };
+
+  expert_module_t* expert_cdt;
+
   /* Register protocol */
   proto_cdt = proto_register_protocol (PNAME, PSNAME, PFNAME);
 
   /* Register fields and subtrees */
   proto_register_field_array (proto_cdt, hf, array_length(hf));
   proto_register_subtree_array (ett, array_length(ett));
-
+  expert_cdt = expert_register_protocol(proto_cdt);
+  expert_register_field_array(expert_cdt, ei, array_length(ei));
 }
 
 
index 07b40d18be84bfe889ca9312670d04976bf02c80..41a3d462f9a561eed0c33d729b5b0c6c521d9510 100644 (file)
@@ -69,6 +69,8 @@ static gint ett_dop = -1;
 static gint ett_dop_unknown = -1;
 #include "packet-dop-ett.c"
 
+static expert_field ei_dop_unknown_binding_parameter = EI_INIT;
+
 /* Dissector table */
 static dissector_table_t dop_dissector_table;
 
@@ -102,7 +104,7 @@ call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet
         next_tree = proto_item_add_subtree(item, ett_dop_unknown);
      }
      offset = dissect_unknown_ber(pinfo, tvb, offset, next_tree);
-     expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN, "Unknown binding-parameter");
+     expert_add_info(pinfo, item, &ei_dop_unknown_binding_parameter);
    }
 
    return offset;
@@ -245,6 +247,11 @@ void proto_register_dop(void) {
 #include "packet-dop-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_dop_unknown_binding_parameter, { "dop.unknown_binding_parameter", PI_UNDECODED, PI_WARN, "Unknown binding-parameter", EXPFILL }},
+  };
+
+  expert_module_t* expert_dop;
   module_t *dop_module;
 
   /* Register protocol */
@@ -257,6 +264,8 @@ void proto_register_dop(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_dop, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_dop = expert_register_protocol(proto_dop);
+  expert_register_field_array(expert_dop, ei, array_length(ei));
 
   /* Register our configuration options for DOP, particularly our port */
 
index c456f6c50b354e6a61a1ce7b21c419493733aa6e..dc90f4827fec080b5ddd3926874203616ba63b59 100644 (file)
@@ -32,7 +32,7 @@
                                "BER Error: malformed UTCTime encoding, "
                                "length must be 8 bytes");
                proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-               expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "BER Error: malformed UTCTime encoding");
+               expert_add_info(actx->pinfo, cause, &ei_goose_mal_utctime);
                if(hf_index >= 0)
                {
                        proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
index 99c44a0585ba2b05efcbddf18e2a507da69bb243..0577d5f6ab21e8216b988116730b7411240bd2ae 100644 (file)
@@ -46,6 +46,8 @@ static int hf_goose_length = -1;
 static int hf_goose_reserve1 = -1;
 static int hf_goose_reserve2 = -1;
 
+static expert_field ei_goose_mal_utctime = EI_INIT;
+
 #include "packet-goose-hf.c"
 
 /* Initialize the subtree pointers */
@@ -130,6 +132,12 @@ void proto_register_goose(void) {
 #include "packet-goose-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_goose_mal_utctime, { "goose.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed UTCTime encoding", EXPFILL }},
+  };
+
+  expert_module_t* expert_goose;
+
        /* Register protocol */
        proto_goose = proto_register_protocol(PNAME, PSNAME, PFNAME);
        register_dissector("goose", dissect_goose, proto_goose);
@@ -137,7 +145,8 @@ void proto_register_goose(void) {
        /* Register fields and subtrees */
        proto_register_field_array(proto_goose, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
-
+       expert_goose = expert_register_protocol(proto_goose);
+       expert_register_field_array(expert_goose, ei, array_length(ei));
 }
 
 /*--- proto_reg_handoff_goose --- */
index ea39f5d1b3faa64cfd0911ee607f735d2bcfd813..76a131a76b709adb1b1a3a2e37ba88e2463488ea 100644 (file)
@@ -183,6 +183,11 @@ static gint ett_gsm_map_ericsson_locationInformation = -1;
 
 #include "packet-gsm_map-ett.c"
 
+static expert_field ei_gsm_map_unknown_sequence3 = EI_INIT;
+static expert_field ei_gsm_map_unknown_sequence = EI_INIT;
+static expert_field ei_gsm_map_unknown_parameter = EI_INIT;
+static expert_field ei_gsm_map_unknown_invokeData = EI_INIT;
+
 static dissector_table_t       sms_dissector_table;    /* SMS TPDU */
 static dissector_handle_t      data_handle;
 static dissector_handle_t      ranap_handle;
@@ -982,24 +987,21 @@ static int dissect_mc_message(tvbuff_t *tvb,
       offset= (sequence3) (implicit_seq3, tvb, offset, actx, tree, hf_index_seq3);
     } else {
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented [3] sequence, cannot decode");
-      proto_item_set_expert_flags(cause, PI_UNDECODED, PI_ERROR);
-      expert_add_info_format(actx->pinfo, cause, PI_UNDECODED, PI_ERROR, "Unknown or not implemented [3] sequence");
+      expert_add_info(actx->pinfo, cause, &ei_gsm_map_unknown_sequence3);
     }
   } else if (octet == 0x30) {
     if (sequence != NULL) {
       offset= (sequence) (implicit_seq, tvb, 0, actx, tree, hf_index_seq);
     } else {
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented sequence");
-      proto_item_set_expert_flags(cause, PI_UNDECODED, PI_ERROR);
-      expert_add_info_format(actx->pinfo, cause, PI_UNDECODED, PI_ERROR, "Unknown or not implemented sequence");
+      expert_add_info(actx->pinfo, cause, &ei_gsm_map_unknown_sequence);
     }
   } else {
     if (parameter != NULL) {
       offset= (parameter) (implicit_param, tvb, offset, actx, tree, hf_index_param);
     } else {
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented parameter");
-      proto_item_set_expert_flags(cause, PI_UNDECODED, PI_ERROR);
-      expert_add_info_format(actx->pinfo, cause, PI_UNDECODED, PI_ERROR, "Unknown or not implemented parameter");
+      expert_add_info(actx->pinfo, cause, &ei_gsm_map_unknown_parameter);
     }
   }
   return offset;
@@ -1356,8 +1358,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
   default:
     if(!dissector_try_uint(map_prop_arg_opcode_table, (guint8)opcode, tvb, actx->pinfo, tree)){
         cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
-        proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-        expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+        expert_add_info_format_text(actx->pinfo, cause, &ei_gsm_map_unknown_invokeData, "Unknown invokeData %d",opcode);
        }
        offset+= tvb_length_remaining(tvb,offset);
        break;
@@ -1664,8 +1665,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,
  default:
    if(!dissector_try_uint(map_prop_res_opcode_table, (guint8)opcode, tvb, actx->pinfo, tree)){
        cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
-       proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-       expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+       expert_add_info_format_text(actx->pinfo, cause, &ei_gsm_map_unknown_invokeData, "Unknown invokeData %d",opcode);
    }
    offset+= tvb_length_remaining(tvb,offset);
    break;
@@ -1829,8 +1829,7 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,
   default:
     if(!dissector_try_uint(map_prop_err_opcode_table, (guint8)opcode, tvb, actx->pinfo, tree)){
         cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
-        proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-        expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",errorCode);
+        expert_add_info_format_text(actx->pinfo, cause, &ei_gsm_map_unknown_invokeData, "Unknown invokeData %d",errorCode);
     }
        offset+= tvb_length_remaining(tvb,offset);
     break;
@@ -2315,6 +2314,7 @@ void proto_reg_handoff_gsm_map(void) {
 /*--- proto_register_gsm_map -------------------------------------------*/
 void proto_register_gsm_map(void) {
        module_t *gsm_map_module;
+       expert_module_t* expert_gsm_map;
 
   /* List of fields */
   static hf_register_info hf[] = {
@@ -2646,6 +2646,13 @@ void proto_register_gsm_map(void) {
 #include "packet-gsm_map-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_gsm_map_unknown_sequence3, { "gsm_map.unknown.sequence3", PI_UNDECODED, PI_ERROR, "Unknown or not implemented [3] sequence", EXPFILL }},
+     { &ei_gsm_map_unknown_sequence, { "gsm_map.unknown.sequence", PI_UNDECODED, PI_ERROR, "Unknown or not implemented sequence", EXPFILL }},
+     { &ei_gsm_map_unknown_parameter, { "gsm_map.unknown.parameter", PI_UNDECODED, PI_ERROR, "Unknown or not implemented parameter", EXPFILL }},
+     { &ei_gsm_map_unknown_invokeData, { "gsm_map.unknown.invokeData", PI_MALFORMED, PI_WARN, "Unknown invokeData", EXPFILL }},
+  };
+
   static const enum_val_t application_context_modes[] = {
     {"Use Application Context from the trace", "Use application context from the trace", APPLICATON_CONTEXT_FROM_TRACE},
     {"Treat as AC 1", "Treat as AC 1", 1},
@@ -2663,6 +2670,8 @@ void proto_register_gsm_map(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_gsm_map, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_gsm_map = expert_register_protocol(proto_gsm_map);
+  expert_register_field_array(expert_gsm_map, ei, array_length(ei));
 
   sms_dissector_table = register_dissector_table("gsm_map.sms_tpdu",
                                                 "GSM SMS TPDU", FT_UINT8,
index 4f632d49f120c9bc1f44a7052c23bdd1f738e7d8..a87b1afa9f038d2223a6a2637375e23069e9e4f7 100644 (file)
@@ -300,7 +300,7 @@ AuditReplyV1/auditResult    audit_result
 
 #.FN_BODY ErrorDescriptor/errorCode
     offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_h248_error_code, &error_code);
-    expert_add_info_format(actx->pinfo, actx->created_item, PI_RESPONSE_CODE, PI_WARN, "Errored Command");
+    expert_add_info(actx->pinfo, actx->created_item, &ei_h248_errored_command);
     
     if (curr_info.cmd) {
         gcp_cmd_set_error(curr_info.cmd,error_code);
index 679fd2ba666b3d16bbaad2606078387027c8f2ca..8b14fcf9f7394e1ca871d1c8d6762ec1a1799c03 100644 (file)
@@ -88,6 +88,8 @@ static gcp_hf_ett_t h248_arrel = {{-1,-1,-1,-1,-1,-1},{-1,-1,-1,-1}};
 
 #include "packet-h248-ett.c"
 
+static expert_field ei_h248_errored_command = EI_INIT;
+
 static dissector_table_t subdissector_table;
 
 static emem_tree_t* msgs = NULL;
@@ -1587,8 +1589,12 @@ void proto_register_h248(void) {
 #include "packet-h248-ettarr.c"
     };
 
-    module_t *h248_module;
+    static ei_register_info ei[] = {
+        { &ei_h248_errored_command, { "h248.errored_command", PI_RESPONSE_CODE, PI_WARN, "Errored Command", EXPFILL }},
+    };
 
+    expert_module_t* expert_h248;
+    module_t *h248_module;
 
     /* Register protocol */
     proto_h248 = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -1598,6 +1604,8 @@ void proto_register_h248(void) {
     /* Register fields and subtrees */
     proto_register_field_array(proto_h248, hf, array_length(hf));
     proto_register_subtree_array(ett, array_length(ett));
+    expert_h248 = expert_register_protocol(proto_h248);
+    expert_register_field_array(expert_h248, ei, array_length(ei));
     
     subdissector_table = register_dissector_table("h248.magic_num", "H248 Magic Num", FT_UINT32, BASE_HEX);
 
index eacfba450feac20c0b49a3c7aee8905b0871e9eb..5756f59fa4ff8a91d1eee3df76baf1c3b71168d3 100644 (file)
@@ -86,8 +86,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
 #.TABLE2_FTR
     default:
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
-      proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-      expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+      expert_add_info_format_text(actx->pinfo, cause, &ei_inap_unknown_invokeData, "Unknown invokeData %d",opcode);
       /* todo call the asn.1 dissector */
       break;
   }
@@ -106,8 +105,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,
 #.TABLE2_FTR
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
-    proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnResultData %d",opcode);
+    expert_add_info_format_text(actx->pinfo, cause, &ei_inap_unknown_returnResultData, "Unknown returnResultData %d",opcode);
   }
   return offset;
 }
@@ -124,8 +122,7 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,a
 #.TABLE2_FTR
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
-    proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnErrorData %d",errorCode);
+    expert_add_info_format_text(actx->pinfo, cause, &ei_inap_unknown_returnErrorData, "Unknown returnErrorData %d",errorCode);
   }
   return offset;
 }
index 921ebfbe0a7fc573c7e78ed466224a8a436f083f..59943d4cac39e54f0a1ee7f5251ce86228ab2dc2 100644 (file)
@@ -78,6 +78,10 @@ static gint ett_inapisup_parameter = -1;
 static gint ett_inap_HighLayerCompatibility = -1;
 #include "packet-inap-ett.c"
 
+static expert_field ei_inap_unknown_invokeData = EI_INIT;
+static expert_field ei_inap_unknown_returnResultData = EI_INIT;
+static expert_field ei_inap_unknown_returnErrorData = EI_INIT;
+
 #include "packet-inap-table.c"
 
 const value_string inap_general_problem_strings[] = {
@@ -210,12 +214,22 @@ void proto_register_inap(void) {
 #include "packet-inap-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_inap_unknown_invokeData, { "inap.unknown.invokeData", PI_MALFORMED, PI_WARN, "Unknown invokeData", EXPFILL }},
+     { &ei_inap_unknown_returnResultData, { "inap.unknown.returnResultData", PI_MALFORMED, PI_WARN, "Unknown returnResultData", EXPFILL }},
+     { &ei_inap_unknown_returnErrorData, { "inap.unknown.returnErrorData", PI_MALFORMED, PI_WARN, "Unknown returnResultData", EXPFILL }},
+  };
+
+  expert_module_t* expert_inap;
+
   /* Register protocol */
   proto_inap = proto_register_protocol(PNAME, PSNAME, PFNAME);
   register_dissector("inap", dissect_inap, proto_inap);
   /* Register fields and subtrees */
   proto_register_field_array(proto_inap, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_inap = expert_register_protocol(proto_inap);
+  expert_register_field_array(expert_inap, ei, array_length(ei));
 
   /* Set default SSNs */
   range_convert_str(&global_ssn_range, "106,241", MAX_SSN);
index 07d28f1ddaeeaf274553b0a99b7abc5523fad8f5..d9c745cd6df5942ba21d5a5e80de470ef767a7fb 100644 (file)
@@ -153,6 +153,8 @@ static gint ett_krb_recordmark = -1;
 
 #include "packet-kerberos-ett.c"
 
+static expert_field ei_kerberos_decrypted_keytype = EI_INIT;
+
 static dissector_handle_t krb4_handle=NULL;
 
 /* Global variables */
@@ -387,7 +389,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
                if(ret == 0){
                        char *user_data;
 
-                       expert_add_info_format(pinfo, NULL, PI_SECURITY, PI_CHAT,
+                       expert_add_info_format_text(pinfo, NULL, &ei_kerberos_decrypted_keytype,
                                                                   "Decrypted keytype %d in frame %u using %s",
                                                                   ek->keytype, pinfo->fd->num, ek->key_origin);
 
@@ -1990,11 +1992,18 @@ void proto_register_kerberos(void) {
 #include "packet-kerberos-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_kerberos_decrypted_keytype, { "kerberos.decrypted_keytype", PI_SECURITY, PI_CHAT, "Decryted keytype", EXPFILL }},
+  };
+
+       expert_module_t* expert_krb;
        module_t *krb_module;
 
        proto_kerberos = proto_register_protocol("Kerberos", "KRB5", "kerberos");
        proto_register_field_array(proto_kerberos, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
+       expert_krb = expert_register_protocol(proto_kerberos);
+       expert_register_field_array(expert_krb, ei, array_length(ei));
 
        /* Register preferences */
        krb_module = prefs_register_protocol(proto_kerberos, kerberos_prefs_apply_cb);
index 0408238f89de851e58842734ae6cb18d62d59a97..6394a73ba279862bb6670fa58fa291306d6258af 100644 (file)
@@ -682,12 +682,12 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v
        attributedesc_string=NULL;
 
        if (Filter_length++ > MAX_FILTER_LEN) {
-               expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_ERROR, "Filter length exceeds %%u. Giving up.", MAX_FILTER_LEN);
+               expert_add_info_format_text(actx->pinfo, tree, &ei_ldap_exceeded_filter_length, "Filter length exceeds %%u. Giving up.", MAX_FILTER_LEN);
                THROW(ReportedBoundsError);
        }
 
        if (Filter_elements++ > MAX_FILTER_ELEMENTS) {
-               expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_ERROR, "Found more than %%u filter elements. Giving up.", MAX_FILTER_ELEMENTS);
+               expert_add_info_format_text(actx->pinfo, tree, &ei_ldap_too_many_filter_elements, "Found more than %%u filter elements. Giving up.", MAX_FILTER_ELEMENTS);
                THROW(ReportedBoundsError);
        }
 
index e828a225335966ca11d4b85d6a6fb6d7d7ac043e..daa7488c03a52cb6b42f196c39af92ce910cb409 100644 (file)
@@ -197,6 +197,9 @@ static gint ett_mscldap_ipdetails = -1;
 
 #include "packet-ldap-ett.c"
 
+static expert_field ei_ldap_exceeded_filter_length = EI_INIT;
+static expert_field ei_ldap_too_many_filter_elements = EI_INIT;
+
 static dissector_table_t ldap_name_dissector_table=NULL;
 static const char *object_identifier_id = NULL; /* LDAP OID */
 
@@ -2249,6 +2252,12 @@ void proto_register_ldap(void) {
      UAT_END_FIELDS
   };
 
+  static ei_register_info ei[] = {
+     { &ei_ldap_exceeded_filter_length, { "ldap.exceeded_filter_length", PI_UNDECODED, PI_ERROR, "Filter length exceeds number. Giving up", EXPFILL }},
+     { &ei_ldap_too_many_filter_elements, { "ldap.too_many_filter_elements", PI_UNDECODED, PI_ERROR, "Found more than %%u filter elements. Giving up.", EXPFILL }},
+  };
+
+  expert_module_t* expert_ldap;
   module_t *ldap_module;
   uat_t *attributes_uat;
 
@@ -2257,7 +2266,8 @@ void proto_register_ldap(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_ldap, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
-
+  expert_ldap = expert_register_protocol(proto_ldap);
+  expert_register_field_array(expert_ldap, ei, array_length(ei));
 
   register_dissector("ldap", dissect_ldap_tcp, proto_ldap);
 
index e6a4013c29abea95170115485c69835044605aae..c003aa609377253d6b6a86a0f836d57f0949c2b2 100644 (file)
@@ -140,12 +140,12 @@ if(ue_cap_tvb){
     subtree2 = proto_item_add_subtree(item, ett_lte_rrc_UE_CapabilityRAT_Container);
     byte = tvb_get_guint8(ue_cap_tvb, 0);
     if (byte != 0x33) {
-      expert_add_info_format(actx->pinfo, item, PI_MALFORMED, PI_ERROR,
+      expert_add_info_format_text(actx->pinfo, item, &ei_lte_rrc_unexpected_type_value,
                              "Unexpected type value (found 0x%02X)", byte);
     }
     byte = tvb_get_guint8(ue_cap_tvb, 1);
     if (byte != 0x03) {
-      expert_add_info_format(actx->pinfo, item, PI_MALFORMED, PI_ERROR,
+      expert_add_info_format_text(actx->pinfo, item, &ei_lte_rrc_unexpected_length_value,
                              "Unexpected length value (found %d)", byte);
     }
     de_ms_cm_2(ue_cap_tvb, subtree2, actx->pinfo, 2, 3, NULL, 0);
@@ -1114,7 +1114,7 @@ SoundingRS-UL-ConfigDedicated/setup/duration STRINGS=TFS(&lte_rrc_duration_val)
 #.FN_BODY Paging/systemInfoModification
 %(DEFAULT_BODY)s
   col_append_str(actx->pinfo->cinfo, COL_INFO, " (systemInfoModification)");
-  expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_WARN, "SIBs changing in next BCCH modification period - signalled in Paging message");
+  expert_add_info(actx->pinfo, actx->created_item, &ei_lte_rrc_sibs_changing);
 
 #.FN_BODY Paging/pagingRecordList
   /* Number of items is (last 3 bits of first byte and first bit of second) + 1 */
@@ -1151,7 +1151,7 @@ SoundingRS-UL-ConfigDedicated/setup/duration STRINGS=TFS(&lte_rrc_duration_val)
     if (p_previous != NULL) {
       /* Subtract one from stored result to get previous value */
       guint32 previous = GPOINTER_TO_UINT(p_previous) - 1;
-      expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_WARN,
+      expert_add_info_format_text(actx->pinfo, actx->created_item, &ei_lte_rrc_si_info_value_changed,
                              "SI Info Value changed (now %%u, was %%u)", value, previous);
     }
   }
@@ -1159,9 +1159,9 @@ SoundingRS-UL-ConfigDedicated/setup/duration STRINGS=TFS(&lte_rrc_duration_val)
 #.FN_BODY Paging/etws-Indication
 %(DEFAULT_BODY)s
   col_append_str(actx->pinfo->cinfo, COL_INFO, " (ETWS)");
-  expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_WARN, "Earthquake and Tsunami Warning System Indication!");
+  expert_add_info(actx->pinfo, actx->created_item, &ei_lte_rrc_earthquake_warning_sys);
 
 #.FN_BODY Paging-v920-IEs/cmas-Indication-r9
 %(DEFAULT_BODY)s
   col_append_str(actx->pinfo->cinfo, COL_INFO, " (CMAS)");
-  expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_WARN, "Commercial Mobile Alert System Indication!");
+  expert_add_info(actx->pinfo, actx->created_item, &ei_lte_rrc_commercial_mobile_alert_sys);
index dbd1ffba1a69cb966172471772658d0b5448a354..524c1efbc1d99a8a6bb52a492687ed4beeacce01 100644 (file)
@@ -194,6 +194,14 @@ static gint ett_lte_rrc_warningType = -1;
 static gint ett_lte_rrc_dataCodingScheme = -1;
 static gint ett_lte_rrc_warningMessageSegment = -1;
 
+static expert_field ei_lte_rrc_number_pages_le15 = EI_INIT;
+static expert_field ei_lte_rrc_si_info_value_changed = EI_INIT;
+static expert_field ei_lte_rrc_sibs_changing = EI_INIT;
+static expert_field ei_lte_rrc_earthquake_warning_sys = EI_INIT;
+static expert_field ei_lte_rrc_commercial_mobile_alert_sys = EI_INIT;
+static expert_field ei_lte_rrc_unexpected_type_value = EI_INIT;
+static expert_field ei_lte_rrc_unexpected_length_value = EI_INIT;
+
 /* Forward declarations */
 static int dissect_DL_DCCH_Message_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_);
 static int dissect_UECapabilityInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_);
@@ -1794,7 +1802,7 @@ dissect_lte_rrc_warningMessageSegment(tvbuff_t *warning_msg_seg_tvb, proto_tree
   nb_of_pages = tvb_get_guint8(warning_msg_seg_tvb, 0);
   ti = proto_tree_add_uint(tree, hf_lte_rrc_warningMessageSegment_nb_pages, warning_msg_seg_tvb, 0, 1, nb_of_pages);
   if (nb_of_pages > 15) {
-    expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+    expert_add_info_format_text(pinfo, ti, &ei_lte_rrc_number_pages_le15,
                            "Number of pages should be <=15 (found %u)", nb_of_pages);
     nb_of_pages = 15;
   }
@@ -2522,6 +2530,17 @@ void proto_register_lte_rrc(void) {
     &ett_lte_rrc_warningMessageSegment
   };
 
+  static ei_register_info ei[] = {
+     { &ei_lte_rrc_number_pages_le15, { "lte_rrc.number_pages_le15", PI_MALFORMED, PI_ERROR, "Number of pages should be <=15", EXPFILL }},
+     { &ei_lte_rrc_si_info_value_changed, { "lte_rrc.si_info_value_changed", PI_SEQUENCE, PI_WARN, "SI Info Value changed", EXPFILL }},
+     { &ei_lte_rrc_sibs_changing, { "lte_rrc.sibs_changing", PI_SEQUENCE, PI_WARN, "SIBs changing in next BCCH modification period - signalled in Paging message", EXPFILL }},
+     { &ei_lte_rrc_earthquake_warning_sys, { "lte_rrc.earthquake_warning_sys", PI_SEQUENCE, PI_WARN, "Earthquake and Tsunami Warning System Indication!", EXPFILL }},
+     { &ei_lte_rrc_commercial_mobile_alert_sys, { "lte_rrc.commercial_mobile_alert_sys", PI_SEQUENCE, PI_WARN, "Commercial Mobile Alert System Indication!", EXPFILL }},
+     { &ei_lte_rrc_unexpected_type_value, { "lte_rrc.unexpected_type_value", PI_MALFORMED, PI_ERROR, "Unexpected type value", EXPFILL }},
+     { &ei_lte_rrc_unexpected_length_value, { "lte_rrc.unexpected_length_value", PI_MALFORMED, PI_ERROR, "Unexpected type length", EXPFILL }},
+  };
+
+  expert_module_t* expert_lte_rrc;
 
   /* Register protocol */
   proto_lte_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -2539,6 +2558,8 @@ void proto_register_lte_rrc(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_lte_rrc, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_lte_rrc = expert_register_protocol(proto_lte_rrc);
+  expert_register_field_array(expert_lte_rrc, ei, array_length(ei));
 
   /* Register the dissectors defined in lte-rrc.conf */
 #include "packet-lte-rrc-dis-reg.c"
index 852dbb343b876e2e8cdb2aede13a63e408cf2cb3..610dac564b2ff21aa5b94239aae2c87f6f6f894d 100644 (file)
@@ -92,8 +92,7 @@ UtcTime       TYPE = FT_STRING DISPLAY = BASE_NONE
        cause = proto_tree_add_text(tree, tvb, offset, len,
                        "BER Error: malformed TimeOfDay encoding, "
                        "length must be 4 or 6 bytes");
-       proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-       expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "BER Error: malformed TimeOfDay encoding");
+       expert_add_info(actx->pinfo, cause, &ei_mms_mal_timeofday_encoding);
        if(hf_index >= 0)
        {
                proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
@@ -118,8 +117,7 @@ UtcTime     TYPE = FT_STRING DISPLAY = BASE_NONE
                cause = proto_tree_add_text(tree, tvb, offset, len,
                                "BER Error: malformed IEC61850 UTCTime encoding, "
                                "length must be 8 bytes");
-               proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-               expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "BER Error: malformed IEC61850 UTCTime encoding");
+               expert_add_info(actx->pinfo, cause, &ei_mms_mal_utctime_encoding);
                if(hf_index >= 0)
                {
                        proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
index f4deec0ee081d3ad4d0f86d58b3d7af8f554f103..64753b27181efba3612eea31affe62ed477251d9 100644 (file)
@@ -49,6 +49,9 @@ static int proto_mms = -1;
 static gint ett_mms = -1;
 #include "packet-mms-ett.c"
 
+static expert_field ei_mms_mal_timeofday_encoding = EI_INIT;
+static expert_field ei_mms_mal_utctime_encoding = EI_INIT;
+
 #include "packet-mms-fn.c"
 
 /*
@@ -97,13 +100,21 @@ void proto_register_mms(void) {
 #include "packet-mms-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_mms_mal_timeofday_encoding, { "mms.malformed.timeofday_encoding", PI_MALFORMED, PI_WARN, "BER Error: malformed TimeOfDay encoding", EXPFILL }},
+     { &ei_mms_mal_utctime_encoding, { "mms.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed IEC61850 UTCTime encoding", EXPFILL }},
+  };
+
+  expert_module_t* expert_mms;
+
   /* Register protocol */
   proto_mms = proto_register_protocol(PNAME, PSNAME, PFNAME);
   register_dissector("mms", dissect_mms, proto_mms);
   /* Register fields and subtrees */
   proto_register_field_array(proto_mms, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
-
+  expert_mms = expert_register_protocol(proto_mms);
+  expert_register_field_array(expert_mms, ei, array_length(ei));
 
 }
 
index 5c39adb5514b328ab16a62f8856356141a2a0ac0..a3fec653ac790e01fbbc9326d43487234661ca24 100644 (file)
@@ -1300,7 +1300,7 @@ BindingID_port = 0;
                     if((cur_val=(nbap_com_context_id_t *)g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){
                         umts_fp_conversation_info->com_context_id = cur_val->crnc_context;
                     }else{
-                        expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not set Communication Context-ID, fragments over reconfigured channels might fail");
+                        expert_add_info(actx->pinfo, NULL, &ei_nbap_no_set_comm_context_id);
                     }
                 }
 
@@ -1474,7 +1474,7 @@ BindingID_port = 0;
                     if((cur_val=(nbap_com_context_id_t *)g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){
                         umts_fp_conversation_info->com_context_id = cur_val->crnc_context;
                     }else{
-                        expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not set Communication Context-ID, fragments over reconfigured channels might fail");
+                        expert_add_info(actx->pinfo, NULL, &ei_nbap_no_set_comm_context_id);
                     }
                 }
 
@@ -1518,13 +1518,13 @@ num_items = 1;
         if((cur_val=(nbap_com_context_id_t *)g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){
             com_context_id= cur_val->crnc_context;
         }else{
-            expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not find Communication Context-ID, unable to reconfigure this E-DCH flow.");
+            expert_add_info(actx->pinfo, NULL, &ei_nbap_no_find_comm_context_id);
         }
     }
 
     /*This should not happen*/
     if(( old_info = (nbap_edch_port_info_t *)g_tree_lookup(edch_flow_port_map, GINT_TO_POINTER((gint)com_context_id))) == NULL ){
-        expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not find port information for reconfigured E-DCH flow, unable to reconfigure");
+        expert_add_info(actx->pinfo, NULL, &ei_nbap_no_find_port_info);
         return offset;
     }
     nbap_debug1("    Found com_context_id %%u", com_context_id);
index 7016f3fd68e7854fddbb867cfbf6a8f943d92913..78069585c47bca655f5d0ce2f48034d399629e17 100644 (file)
@@ -97,6 +97,10 @@ static int ett_nbap_ib_sg_data = -1;
 
 #include "packet-nbap-ett.c"
 
+static expert_field ei_nbap_no_find_comm_context_id = EI_INIT;
+static expert_field ei_nbap_no_find_port_info = EI_INIT;
+static expert_field ei_nbap_no_set_comm_context_id = EI_INIT;
+static expert_field ei_nbap_hsdsch_entity_not_specified = EI_INIT;
 
 extern int proto_fp;
 
@@ -392,7 +396,7 @@ static void add_hsdsch_bind(packet_info *pinfo, proto_tree * tree){
                                        /*XXX: Is this craziness, what is physical_layer? */
                                        if(nbap_hsdsch_channel_info[i].entity == entity_not_specified ){
                                                /*Error*/
-                                               expert_add_info_format(pinfo, tree, PI_MALFORMED,PI_ERROR, "HSDSCH Entity not specified!");
+                                               expert_add_info(pinfo, NULL, &ei_nbap_hsdsch_entity_not_specified);
                                        }else{
                                                umts_fp_conversation_info->hsdsch_entity = (enum fp_hsdsch_entity)nbap_hsdsch_channel_info[i].entity;
                                        }
@@ -494,11 +498,22 @@ void proto_register_nbap(void)
        #include "packet-nbap-ettarr.c"
        };
 
+       static ei_register_info ei[] = {
+               { &ei_nbap_no_set_comm_context_id, { "nbap.no_set_comm_context_id", PI_MALFORMED, PI_WARN, "Couldn't not set Communication Context-ID, fragments over reconfigured channels might fail", EXPFILL }},
+               { &ei_nbap_no_find_comm_context_id, { "nbap.no_find_comm_context_id", PI_MALFORMED, PI_WARN, "Couldn't not find Communication Context-ID, unable to reconfigure this E-DCH flow.", EXPFILL }},
+               { &ei_nbap_no_find_port_info, { "nbap.no_find_port_info", PI_MALFORMED, PI_WARN, "Couldn't not find port information for reconfigured E-DCH flow, unable to reconfigure", EXPFILL }},
+               { &ei_nbap_hsdsch_entity_not_specified, { "nbap.hsdsch_entity_not_specified", PI_MALFORMED,PI_ERROR, "HSDSCH Entity not specified!", EXPFILL }},
+       };
+
+       expert_module_t* expert_nbap;
+
        /* Register protocol */
        proto_nbap = proto_register_protocol(PNAME, PSNAME, PFNAME);
        /* Register fields and subtrees */
        proto_register_field_array(proto_nbap, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
+       expert_nbap = expert_register_protocol(proto_nbap);
+       expert_register_field_array(expert_nbap, ei, array_length(ei));
 
        /* Register dissector */
        register_dissector("nbap", dissect_nbap, proto_nbap);
index a16c540d2b2ab5fa0b9d3d201961047048f6d525..1c9a6160f74202cf6018339e43eb3b9e94f49758 100644 (file)
@@ -546,7 +546,7 @@ MessageToken                                                B       "2.6.1.7.36"    "id-hat-forwarded-token"
                                "Dissector for standard-extension %%d not implemented.  Contact Wireshark developers if you want this supported", extension_id);
                        next_tree = proto_item_add_subtree(item, ett_p1_unknown_standard_extension);
                        offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
-                       expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown standard-extension");
+                       expert_add_info(actx->pinfo, item, &ei_p1_unknown_standard_extension);
                }
        } else if (object_identifier_id) {
                offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
@@ -585,7 +585,7 @@ MessageToken                                                B       "2.6.1.7.36"    "id-hat-forwarded-token"
                        "Dissector for extension-attribute-type %%d not implemented.  Contact Wireshark developers if you want this supported", extension_id);
                next_tree = proto_item_add_subtree(item, ett_p1_unknown_extension_attribute_type);
                offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
-               expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown extension-attribute-type");
+               expert_add_info(actx->pinfo, item, &ei_p1_unknown_extension_attribute_type);
        }
 
 
@@ -665,7 +665,7 @@ MessageToken                                                B       "2.6.1.7.36"    "id-hat-forwarded-token"
       proto_tree *next_tree = NULL;
 
       item = proto_tree_add_text(top_tree ? top_tree : tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "P1 Unknown Content (unknown built-in content-type)");
-      expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown built-in content-type");
+      expert_add_info(actx->pinfo, item, &ei_p1_unknown_built_in_content_type);
       if (item) {
         next_tree=proto_item_add_subtree(item, ett_p1_content_unknown);
       }
@@ -1247,7 +1247,7 @@ MessageToken                                              B       "2.6.1.7.36"    "id-hat-forwarded-token"
                        "Dissector for tokendata-type %%d not implemented.  Contact Wireshark developers if you want this supported", extension_id);
                next_tree = proto_item_add_subtree(item, ett_p1_unknown_tokendata_type);
                offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
-               expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown tokendata-type");
+               expert_add_info(actx->pinfo, item, &ei_p1_unknown_tokendata_type);
        }
 
 #.FN_BODY PerDomainBilateralInformation/bilateral-information
index 7400b1478fde9aebbd6897cccd7e7961bcf1836a..bee6d586cabe6dd9e22ba925428e1944e3ba79f4 100644 (file)
@@ -90,6 +90,11 @@ static gint ett_p1_unknown_extension_attribute_type = -1;
 static gint ett_p1_unknown_tokendata_type = -1;
 #include "packet-p1-ett.c"
 
+static expert_field ei_p1_unknown_extension_attribute_type = EI_INIT;
+static expert_field ei_p1_unknown_standard_extension = EI_INIT;
+static expert_field ei_p1_unknown_built_in_content_type = EI_INIT;
+static expert_field ei_p1_unknown_tokendata_type = EI_INIT;
+
 /* Dissector tables */
 static dissector_table_t p1_extension_dissector_table;
 static dissector_table_t p1_extension_attribute_dissector_table;
@@ -268,6 +273,14 @@ void proto_register_p1(void) {
 #include "packet-p1-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_p1_unknown_extension_attribute_type, { "p1.unknown.extension_attribute_type", PI_UNDECODED, PI_WARN, "Unknown extension-attribute-type", EXPFILL }},
+     { &ei_p1_unknown_standard_extension, { "p1.unknown.standard_extension", PI_UNDECODED, PI_WARN, "Unknown standard-extension", EXPFILL }},
+     { &ei_p1_unknown_built_in_content_type, { "p1.unknown.built_in_content_type", PI_UNDECODED, PI_WARN, "Unknown built-in content-type", EXPFILL }},
+     { &ei_p1_unknown_tokendata_type, { "p1.unknown.tokendata_type", PI_UNDECODED, PI_WARN, "Unknown tokendata-type", EXPFILL }},
+  };
+
+  expert_module_t* expert_p1;
   module_t *p1_module;
 
   /* Register protocol */
@@ -279,6 +292,8 @@ void proto_register_p1(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_p1, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_p1 = expert_register_protocol(proto_p1);
+  expert_register_field_array(expert_p1, ei, array_length(ei));
 
   p1_extension_dissector_table = register_dissector_table("p1.extension", "P1-EXTENSION", FT_UINT32, BASE_DEC);
   p1_extension_attribute_dissector_table = register_dissector_table("p1.extension-attribute", "P1-EXTENSION-ATTRIBUTE", FT_UINT32, BASE_DEC);
index dc6872daf6b3e03909639ccea69603ecb7aeb737..7b176379701fb801adae42fd224ea58f03014721 100644 (file)
@@ -98,6 +98,8 @@ static gint ett_pres           = -1;
 
 #include "packet-pres-ett.c"
 
+static expert_field ei_pres_dissector_not_available = EI_INIT;
+
 UAT_DEC_CB_DEF(pres_users, ctx_id, pres_user_t)
 UAT_CSTRING_CB_DEF(pres_users, oid, pres_user_t)
 
@@ -401,6 +403,10 @@ void proto_register_pres(void) {
 #include "packet-pres-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_pres_dissector_not_available, { "pres.dissector_not_available", PI_UNDECODED, PI_WARN, "Dissector is not available", EXPFILL }},
+  };
+
   static uat_field_t users_flds[] = {
     UAT_FLD_DEC(pres_users,ctx_id,"Context Id","Presentation Context Identifier"),
     UAT_FLD_CSTRING(pres_users,oid,"Syntax Name OID","Abstract Syntax Name (Object Identifier)"),
@@ -421,7 +427,8 @@ void proto_register_pres(void) {
                              NULL,
                              users_flds);
 
-  static module_t *pres_module;
+  expert_module_t* expert_pres;
+  module_t *pres_module;
 
   /* Register protocol */
   proto_pres = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -433,6 +440,8 @@ void proto_register_pres(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_pres, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_pres = expert_register_protocol(proto_pres);
+  expert_register_field_array(expert_pres, ei, array_length(ei));
   register_init_routine(pres_init);
 
   pres_module = prefs_register_protocol(proto_pres, NULL);
index 6fab8901d1f39b9136f8e7cebc67b6b2b09df626..1f9699b790a52cfb1906068748c357240847e9ef 100644 (file)
@@ -44,7 +44,7 @@ CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason
                call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree);
        } else {
                proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
-               expert_add_info_format(actx->pinfo, ti, PI_UNDECODED, PI_WARN, "Dissector is not available");
+               expert_add_info(actx->pinfo, ti, &ei_pres_dissector_not_available);
        }
 
 #.FN_BODY PDV-list/presentation-data-values/octet-aligned
@@ -58,7 +58,7 @@ CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason
                call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree);
        } else {
                proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
-               expert_add_info_format(actx->pinfo, ti, PI_UNDECODED, PI_WARN, "Dissector is not available");
+               expert_add_info(actx->pinfo, ti, &ei_pres_dissector_not_available);
                %(DEFAULT_BODY)s
        }
 
index 5ec12a9f07c629fadd893e858494b8754a6d3c94..b8e4741022298b8f50ab3409cdcf262e691abd11 100644 (file)
@@ -79,6 +79,9 @@ static int hf_ros_time = -1;
 static gint ett_ros = -1;
 #include "packet-ros-ett.c"
 
+static expert_field ei_ros_dissector_oid_not_implemented = EI_INIT;
+static expert_field ei_ros_unknown_ros_pdu = EI_INIT;
+
 static dissector_table_t ros_oid_dissector_table=NULL;
 
 static GHashTable *oid_table=NULL;
@@ -217,7 +220,7 @@ call_ros_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *p
                proto_item *item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "ROS: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid);
                proto_tree *next_tree=proto_item_add_subtree(item, ett_ros_unknown);
 
-               expert_add_info_format (pinfo, item, PI_UNDECODED, PI_WARN,
+               expert_add_info_format_text(pinfo, item, &ei_ros_dissector_oid_not_implemented,
                                         "ROS: Dissector for OID %s not implemented", oid);
                dissect_unknown_ber(pinfo, next_tvb, offset, next_tree);
        }
@@ -434,7 +437,7 @@ dissect_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
                        item = proto_tree_add_text(tree, tvb, offset, -1,"Unknown ROS PDU");
 
                        if(item){
-                               expert_add_info_format (pinfo, item, PI_UNDECODED, PI_WARN, "Unknown ROS PDU");
+                               expert_add_info(pinfo, item, &ei_ros_unknown_ros_pdu);
                                next_tree=proto_item_add_subtree(item, ett_ros_unknown);
                                dissect_unknown_ber(pinfo, tvb, offset, next_tree);
                        }
@@ -496,12 +499,21 @@ void proto_register_ros(void) {
 #include "packet-ros-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_ros_dissector_oid_not_implemented, { "ros.dissector_oid_not_implemented", PI_UNDECODED, PI_WARN, "ROS: Dissector for OID not implemented", EXPFILL }},
+     { &ei_ros_unknown_ros_pdu, { "ros.unknown_ros_pdu", PI_UNDECODED, PI_WARN, "Unknown ROS PDU", EXPFILL }},
+  };
+
+  expert_module_t* expert_ros;
+
   /* Register protocol */
   proto_ros = proto_register_protocol(PNAME, PSNAME, PFNAME);
   register_dissector("ros", dissect_ros, proto_ros);
   /* Register fields and subtrees */
   proto_register_field_array(proto_ros, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_ros = expert_register_protocol(proto_ros);
+  expert_register_field_array(expert_ros, ei, array_length(ei));
 
   ros_oid_dissector_table = register_dissector_table("ros.oid", "ROS OID Dissectors", FT_STRING, BASE_NONE);
   oid_table=g_hash_table_new(g_str_hash, g_str_equal);
index 9ec5a788cd7db9198053d820f7dbe9b87c4a3daa..4b5ec2a86a4283dce3a6a3e20317e87ff0d442ac 100644 (file)
@@ -42,6 +42,6 @@
   actx->pinfo->private_data = actx->rose_ctx;
   call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree); 
   if (!err_handle) {
-    expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_WARN, "Undecoded %s", descr);
+    expert_add_info_format_text(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr);
   }
 #.END
index 8c663d9b7b387a0516f8f950c3a82e2d1f4be0a3..e2a61994cbf99f1aa5db5c710c34e378e6ddb5c9 100644 (file)
@@ -43,6 +43,6 @@
   actx->pinfo->private_data = actx->rose_ctx;
   call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree);
   if (!arg_handle) {
-    expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_WARN, "Undecoded %s", descr);
+    expert_add_info_format_text(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr);
   }
 #.END
index 5b0a4cc8f9b5c0eb369b5deb3f2e390d5e33662a..f02a779cc5db5b72ba4ff0034f05ed4915e3092d 100644 (file)
@@ -44,7 +44,7 @@
     actx->pinfo->private_data = actx->rose_ctx;
     call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree); 
     if (!res_handle) {
-      expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_WARN, "Undecoded %s", descr);
+      expert_add_info_format_text(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr);
     }
   }
 #.END
index 03e78a8c8e3abf89e9aacaa89c00341181a17818..8018f684638fbdd47b9539577c715e78a4471fec 100644 (file)
@@ -111,6 +111,8 @@ static int ett_rrc = -1;
 static gint ett_rrc_eutraFeatureGroupIndicators = -1;
 static gint ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo = -1;
 
+static expert_field ei_rrc_no_hrnti = EI_INIT;
+
 /* Global variables */
 static proto_tree *top_tree;
 
@@ -292,12 +294,19 @@ void proto_register_rrc(void) {
     &ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo,
   };
 
+  static ei_register_info ei[] = {
+     { &ei_rrc_no_hrnti, { "rrc.no_hrnti", PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI", EXPFILL }},
+  };
+
+  expert_module_t* expert_rrc;
 
   /* Register protocol */
   proto_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME);
   /* Register fields and subtrees */
   proto_register_field_array(proto_rrc, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_rrc = expert_register_protocol(proto_rrc);
+  expert_register_field_array(expert_rrc, ei, array_length(ei));
 
   register_dissector("rrc", dissect_rrc, proto_rrc);
 
index f27bc426c260e013e024943fdcbce388d6ab1989..14737d51ca48f2af436c4258b2412e5735289b61 100644 (file)
@@ -720,7 +720,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
         if(num_chans_per_flow[flowd] > 1 ){
             rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0);
             if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
-                expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI");
+                expert_add_info(actx->pinfo, actx->created_item, &ei_rrc_no_hrnti);
             }
             else{
                 /*If it doesnt exists, insert it*/
@@ -756,7 +756,7 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE
         if(num_chans_per_flow[flowd] > 1 ){
             rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0);
             if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
-                expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI");
+                expert_add_info(actx->pinfo, actx->created_item, &ei_rrc_no_hrnti);
             }
             else{
                 /*If it doesnt exists, insert it*/
index 381b1e443efabf905202ffcaf22da4421712429c..9e5d39834b9a9fd9a9c6472ec9a9c907f9d7f072 100644 (file)
@@ -62,6 +62,8 @@ static gboolean rtse_reassemble = TRUE;
 static gint ett_rtse = -1;
 #include "packet-rtse-ett.c"
 
+static expert_field ei_rtse_dissector_oid_not_implemented = EI_INIT;
+static expert_field ei_rtse_unknown_rtse_pdu = EI_INIT;
 
 static dissector_table_t rtse_oid_dissector_table=NULL;
 static GHashTable *oid_table=NULL;
@@ -149,7 +151,7 @@ call_rtse_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *
                proto_item *item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "RTSE: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid);
                proto_tree *next_tree=proto_item_add_subtree(item, ett_rtse_unknown);
 
-               expert_add_info_format (pinfo, item, PI_UNDECODED, PI_WARN,
+               expert_add_info_format_text(pinfo, item, &ei_rtse_dissector_oid_not_implemented,
                                         "RTSE: Dissector for OID %s not implemented", oid);
                dissect_unknown_ber(pinfo, next_tvb, offset, next_tree);
        }
@@ -288,12 +290,9 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
                        if(offset == old_offset){
                                item = proto_tree_add_text(tree, tvb, offset, -1, "Unknown RTSE PDU");
 
-                               if(item){
-                                       expert_add_info_format (pinfo, item, PI_UNDECODED, PI_WARN, "Unknown RTSE PDU");
-                                       next_tree=proto_item_add_subtree(item, ett_rtse_unknown);
-                                       dissect_unknown_ber(pinfo, tvb, offset, next_tree);
-                               }
-
+                               expert_add_info (pinfo, item, &ei_rtse_unknown_rtse_pdu);
+                               next_tree=proto_item_add_subtree(item, ett_rtse_unknown);
+                               dissect_unknown_ber(pinfo, tvb, offset, next_tree);
                                break;
                        }
                }
@@ -363,6 +362,12 @@ void proto_register_rtse(void) {
 #include "packet-rtse-ettarr.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_rtse_dissector_oid_not_implemented, { "rtse.dissector_oid_not_implemented", PI_UNDECODED, PI_WARN, "RTSE: Dissector for OID not implemented", EXPFILL }},
+     { &ei_rtse_unknown_rtse_pdu, { "rtse.unknown_rtse_pdu", PI_UNDECODED, PI_WARN, "Unknown RTSE PDU", EXPFILL }},
+  };
+
+  expert_module_t* expert_rtse;
   module_t *rtse_module;
 
   /* Register protocol */
@@ -371,6 +376,8 @@ void proto_register_rtse(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_rtse, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_rtse = expert_register_protocol(proto_rtse);
+  expert_register_field_array(expert_rtse, ei, array_length(ei));
   register_init_routine (&rtse_reassemble_init);
   rtse_module = prefs_register_protocol_subtree("OSI", proto_rtse, NULL);
 
index 79f87d6fc2cf1a0f452fbc0a49f5edca4636bc96..e06eed5eda8ef22078e10a8d93f29025669f88e8 100644 (file)
@@ -254,6 +254,34 @@ static gint ett_decoding_error = -1;
 
 #include "packet-snmp-ett.c"
 
+static expert_field ei_snmp_failed_decrypted_data_pdu = EI_INIT;
+static expert_field ei_snmp_decrypted_data_bad_formatted = EI_INIT;
+static expert_field ei_snmp_verify_authentication_error = EI_INIT;
+static expert_field ei_snmp_authentication_ok = EI_INIT;
+static expert_field ei_snmp_authentication_error = EI_INIT;
+static expert_field ei_snmp_varbind_not_uni_class_seq = EI_INIT;
+static expert_field ei_snmp_varbind_has_indicator = EI_INIT;
+static expert_field ei_snmp_objectname_not_oid = EI_INIT;
+static expert_field ei_snmp_objectname_has_indicator = EI_INIT;
+static expert_field ei_snmp_value_not_primitive_encoding = EI_INIT;
+static expert_field ei_snmp_invalid_oid = EI_INIT;
+static expert_field ei_snmp_varbind_wrong_tag = EI_INIT;
+static expert_field ei_snmp_varbind_response = EI_INIT;
+static expert_field ei_snmp_no_instance_subid = EI_INIT;
+static expert_field ei_snmp_wrong_num_of_subids = EI_INIT;
+static expert_field ei_snmp_index_suboid_too_short = EI_INIT;
+static expert_field ei_snmp_unimplemented_instance_index = EI_INIT;
+static expert_field ei_snmp_index_suboid_len0 = EI_INIT;
+static expert_field ei_snmp_index_suboid_too_long = EI_INIT;
+static expert_field ei_snmp_index_string_too_long = EI_INIT;
+static expert_field ei_snmp_column_parent_not_row = EI_INIT;
+static expert_field ei_snmp_uint_too_large = EI_INIT;
+static expert_field ei_snmp_int_too_large = EI_INIT;
+static expert_field ei_snmp_integral_value0 = EI_INIT;
+static expert_field ei_snmp_missing_mib = EI_INIT;
+static expert_field ei_snmp_varbind_wrong_length_value = EI_INIT;
+static expert_field ei_snmp_varbind_wrong_class_tag = EI_INIT;
+
 static const true_false_string auth_flags = {
        "OK",
        "Failed"
@@ -430,14 +458,14 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
        if (!pc && ber_class==BER_CLASS_UNI && tag==BER_UNI_TAG_SEQUENCE) {
                proto_item* pi = proto_tree_add_text(tree, tvb, seq_offset, seq_len,"VarBind must be an universal class sequence");
                pt = proto_item_add_subtree(pi,ett_decoding_error);
-               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "VarBind is not an universal class sequence");
+               expert_add_info(actx->pinfo, pi, &ei_snmp_varbind_not_uni_class_seq);
                return dissect_unknown_ber(actx->pinfo, tvb, seq_offset, pt);
        }
 
        if (ind) {
                proto_item* pi = proto_tree_add_text(tree, tvb, seq_offset, seq_len,"Indicator must be clear in VarBind");
                pt = proto_item_add_subtree(pi,ett_decoding_error);
-               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "VarBind has indicator set");
+               expert_add_info(actx->pinfo, pi, &ei_snmp_varbind_has_indicator);
                return dissect_unknown_ber(actx->pinfo, tvb, seq_offset, pt);
        }
 
@@ -449,14 +477,14 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
        if (! ( !pc && ber_class==BER_CLASS_UNI && tag==BER_UNI_TAG_OID) ) {
                proto_item* pi = proto_tree_add_text(tree, tvb, seq_offset, seq_len,"ObjectName must be an OID in primitive encoding");
                pt = proto_item_add_subtree(pi,ett_decoding_error);
-               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "ObjectName not an OID");
+               expert_add_info(actx->pinfo, pi, &ei_snmp_objectname_not_oid);
                return dissect_unknown_ber(actx->pinfo, tvb, seq_offset, pt);
        }
 
        if (ind) {
                proto_item* pi = proto_tree_add_text(tree, tvb, seq_offset, seq_len,"Indicator must be clear in ObjectName");
                pt = proto_item_add_subtree(pi,ett_decoding_error);
-               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "ObjectName has indicator set");
+               expert_add_info(actx->pinfo, pi, &ei_snmp_objectname_has_indicator);
                return dissect_unknown_ber(actx->pinfo, tvb, seq_offset, pt);
        }
 
@@ -470,7 +498,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
        if (! (!pc) ) {
                proto_item* pi = proto_tree_add_text(tree, tvb, seq_offset, seq_len,"the value must be in primitive encoding");
                pt = proto_item_add_subtree(pi,ett_decoding_error);
-               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "value not in primitive encoding");
+               expert_add_info(actx->pinfo, pi, &ei_snmp_value_not_primitive_encoding);
                return dissect_unknown_ber(actx->pinfo, tvb, seq_offset, pt);
        }
 
@@ -498,7 +526,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
                repr = oid_encoded2string(oid_bytes, name_len);
                pi = proto_tree_add_text(pt_name,tvb, 0, 0, "invalid oid: %s", repr);
                pt = proto_item_add_subtree(pi, ett_decoding_error);
-               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "invalid oid: %s", repr);
+               expert_add_info_format_text(actx->pinfo, pi, &ei_snmp_invalid_oid, "invalid oid: %s", repr);
                return dissect_unknown_ber(actx->pinfo, tvb, name_offset, pt);
        }
 
@@ -532,13 +560,13 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
                        default: {
                                pi = proto_tree_add_text(pt_varbind,tvb,0,0,"Wrong tag for Error Value: expected 0, 1, or 2 but got: %d",tag);
                                pt = proto_item_add_subtree(pi,ett_decoding_error);
-                               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "Wrong tag for SNMP VarBind error value");
+                               expert_add_info(actx->pinfo, pi, &ei_snmp_varbind_wrong_tag);
                                return dissect_unknown_ber(actx->pinfo, tvb, value_start, pt);
                        }
                }
 
                pi = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
-               expert_add_info_format(actx->pinfo, pi, PI_RESPONSE_CODE, PI_NOTE, "%s",note);
+               expert_add_info_format_text(actx->pinfo, pi, &ei_snmp_varbind_response, "%s",note);
                g_strlcpy (label, note, ITEM_LABEL_LENGTH);
                goto set_label;
        }
@@ -558,13 +586,13 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
                                        goto set_label;
                                } else {
                                        proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"A scalar should have one instance sub-id this one has none");
-                                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "No instance sub-id in scalar value");
+                                       expert_add_info(actx->pinfo, pi, &ei_snmp_no_instance_subid);
                                        oid_info_is_ok = FALSE;
                                        goto indexing_done;
                                }
                        } else {
                                proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"A scalar should have only one instance sub-id this has: %d",oid_left);
-                               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "Wrong number of instance sub-ids in scalar value");
+                               expert_add_info(actx->pinfo, pi, &ei_snmp_wrong_num_of_subids);
                                oid_info_is_ok = FALSE;
                                goto indexing_done;
                        }
@@ -588,7 +616,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
 
                                                if (key_start >= oid_matched+oid_left) {
                                                        proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"index sub-oid shorter than expected");
-                                                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "index sub-oid shorter than expected");
+                                                       expert_add_info(actx->pinfo, pi, &ei_snmp_index_suboid_too_short);
                                                        oid_info_is_ok = FALSE;
                                                        goto indexing_done;
                                                }
@@ -596,7 +624,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
                                                switch(k->key_type) {
                                                        case OID_KEY_TYPE_WRONG: {
                                                                proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"OID instaces not handled, if you want this implemented please contact the wireshark developers");
-                                                               expert_add_info_format(actx->pinfo, pi, PI_UNDECODED, PI_WARN, "Unimplemented instance index");
+                                                               expert_add_info(actx->pinfo, pi, &ei_snmp_unimplemented_instance_index);
                                                                oid_info_is_ok = FALSE;
                                                                goto indexing_done;
                                                        }
@@ -628,14 +656,14 @@ show_oid_index:
 
                                                                if( suboid_len == 0 ) {
                                                                        proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"an index sub-oid OID cannot be 0 bytes long!");
-                                                                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "index sub-oid OID with len=0");
+                                                                       expert_add_info(actx->pinfo, pi, &ei_snmp_index_suboid_len0);
                                                                        oid_info_is_ok = FALSE;
                                                                        goto indexing_done;
                                                                }
 
                                                                if( key_len < suboid_len ) {
                                                                        proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"index sub-oid should not be longer than remaining oid size");
-                                                                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "index sub-oid longer than remaining oid size");
+                                                                       expert_add_info(actx->pinfo, pi, &ei_snmp_index_suboid_too_long);
                                                                        oid_info_is_ok = FALSE;
                                                                        goto indexing_done;
                                                                }
@@ -682,7 +710,7 @@ show_oid_index:
 
                                                                if( key_len < buf_len ) {
                                                                        proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"index string should not be longer than remaining oid size");
-                                                                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "index string longer than remaining oid size");
+                                                                       expert_add_info(actx->pinfo, pi, &ei_snmp_index_string_too_long);
                                                                        oid_info_is_ok = FALSE;
                                                                        goto indexing_done;
                                                                }
@@ -724,13 +752,13 @@ show_oid_index:
                                        goto indexing_done;
                                } else {
                                        proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"We do not know how to handle this OID, if you want this implemented please contact the wireshark developers");
-                                       expert_add_info_format(actx->pinfo, pi, PI_UNDECODED, PI_WARN, "Unimplemented instance index");
+                                       expert_add_info(actx->pinfo, pi, &ei_snmp_unimplemented_instance_index);
                                        oid_info_is_ok = FALSE;
                                        goto indexing_done;
                                }
                        } else {
                                proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"The COLUMS's parent is not a ROW. This is a BUG! please contact the wireshark developers.");
-                               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_ERROR, "COLUMS's parent is not a ROW");
+                               expert_add_info(actx->pinfo, pi, &ei_snmp_column_parent_not_row);
                                oid_info_is_ok = FALSE;
                                goto indexing_done;
                        }
@@ -854,7 +882,7 @@ indexing_done:
                                if (value_len > 9 || tvb_get_guint8(tvb, value_offset) != 0) {
                                        /* It is.  Fail. */
                                        pi_value = proto_tree_add_text(pt_varbind,tvb,value_offset,value_len,"Integral value too large");
-                                       expert_add_info_format(actx->pinfo, pi_value, PI_UNDECODED, PI_NOTE, "Unsigned integer value > 2^64 - 1");
+                                       expert_add_info(actx->pinfo, pi_value, &ei_snmp_uint_too_large);
                                        goto already_added;
                                }
                                /* Cheat and skip the leading 0 byte */
@@ -865,7 +893,7 @@ indexing_done:
                                 * For now, just reject these.
                                 */
                                pi_value = proto_tree_add_text(pt_varbind,tvb,value_offset,value_len,"Integral value too large or too small");
-                               expert_add_info_format(actx->pinfo, pi_value, PI_UNDECODED, PI_NOTE, "Signed integer value > 2^63 - 1 or <= -2^63");
+                               expert_add_info(actx->pinfo, pi_value, &ei_snmp_int_too_large);
                                goto already_added;
                        }
                } else if (value_len == 0) {
@@ -880,13 +908,13 @@ indexing_done:
                        header_field_info *hfinfo = proto_registrar_get_nth(hfid);
                        if (hfinfo->type == FT_UINT64 || hfinfo->type == FT_INT64) {
                                pi_value = proto_tree_add_text(pt_varbind,tvb,value_offset,value_len,"Integral value is zero-length");
-                               expert_add_info_format(actx->pinfo, pi_value, PI_UNDECODED, PI_NOTE, "Integral value is zero-length");
+                               expert_add_info(actx->pinfo, pi_value, &ei_snmp_integral_value0);
                                goto already_added;
                        }
                }
                pi_value = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
                if (format_error != BER_NO_ERROR) {
-                       expert_add_info_format(actx->pinfo, pi_value, PI_UNDECODED, PI_NOTE, "Unresolved value, Missing MIB");
+                       expert_add_info(actx->pinfo, pi_value, &ei_snmp_missing_mib);
                }
 
 already_added:
@@ -939,7 +967,7 @@ set_label:
                        proto_item* pi = proto_tree_add_text(p_tree,tvb,0,0,"Wrong value length: %u  expecting: %u <= len <= %u",
                                                             value_len, min_len, max_len == -1 ? 0xFFFFFF : max_len);
                        pt = proto_item_add_subtree(pi,ett_decoding_error);
-                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "Wrong length for SNMP VarBind/value");
+                       expert_add_info(actx->pinfo, pi, &ei_snmp_varbind_wrong_length_value);
                        return dissect_unknown_ber(actx->pinfo, tvb, value_start, pt);
                }
                case BER_WRONG_TAG: {
@@ -948,7 +976,7 @@ set_label:
                                                             oid_info->value_type->ber_class, oid_info->value_type->ber_tag,
                                                             ber_class, tag);
                        pt = proto_item_add_subtree(pi,ett_decoding_error);
-                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "Wrong class/tag for SNMP VarBind/value");
+                       expert_add_info(actx->pinfo, pi, &ei_snmp_varbind_wrong_class_tag);
                        return dissect_unknown_ber(actx->pinfo, tvb, value_start, pt);
                }
                default:
@@ -2308,6 +2336,38 @@ void proto_register_snmp(void) {
          &ett_decoding_error,
 #include "packet-snmp-ettarr.c"
   };
+  static ei_register_info ei[] = {
+     { &ei_snmp_failed_decrypted_data_pdu, { "snmp.failed_decrypted_data_pdu", PI_MALFORMED, PI_WARN, "Failed to decrypt encryptedPDU", EXPFILL }},
+     { &ei_snmp_decrypted_data_bad_formatted, { "snmp.decrypted_data_bad_formatted", PI_MALFORMED, PI_WARN, "Decrypted data not formatted as expected", EXPFILL }},
+     { &ei_snmp_verify_authentication_error, { "snmp.verify_authentication_error", PI_MALFORMED, PI_ERROR, "Error while verifying Message authenticity", EXPFILL }},
+     { &ei_snmp_authentication_ok, { "snmp.authentication_ok", PI_CHECKSUM, PI_CHAT, "SNMP Authentication OK", EXPFILL }},
+     { &ei_snmp_authentication_error, { "snmp.authentication_error", PI_CHECKSUM, PI_WARN, "SNMP Authentication Error", EXPFILL }},
+     { &ei_snmp_varbind_not_uni_class_seq, { "snmp.varbind.not_uni_class_seq", PI_MALFORMED, PI_WARN, "VarBind is not an universal class sequence", EXPFILL }},
+     { &ei_snmp_varbind_has_indicator, { "snmp.varbind.has_indicator", PI_MALFORMED, PI_WARN, "VarBind has indicator set", EXPFILL }},
+     { &ei_snmp_objectname_not_oid, { "snmp.objectname_not_oid", PI_MALFORMED, PI_WARN, "ObjectName not an OID", EXPFILL }},
+     { &ei_snmp_objectname_has_indicator, { "snmp.objectname_has_indicator", PI_MALFORMED, PI_WARN, "ObjectName has indicator set", EXPFILL }},
+     { &ei_snmp_value_not_primitive_encoding, { "snmp.value_not_primitive_encoding", PI_MALFORMED, PI_WARN, "value not in primitive encoding", EXPFILL }},
+     { &ei_snmp_invalid_oid, { "snmp.invalid_oid", PI_MALFORMED, PI_WARN, "invalid oid", EXPFILL }},
+     { &ei_snmp_varbind_wrong_tag, { "snmp.varbind.wrong_tag", PI_MALFORMED, PI_WARN, "Wrong tag for SNMP VarBind error value", EXPFILL }},
+     { &ei_snmp_varbind_response, { "snmp.varbind.response", PI_RESPONSE_CODE, PI_NOTE, "Response", EXPFILL }},
+     { &ei_snmp_no_instance_subid, { "snmp.no_instance_subid", PI_MALFORMED, PI_WARN, "No instance sub-id in scalar value", EXPFILL }},
+     { &ei_snmp_wrong_num_of_subids, { "snmp.wrong_num_of_subids", PI_MALFORMED, PI_WARN, "Wrong number of instance sub-ids in scalar value", EXPFILL }},
+     { &ei_snmp_index_suboid_too_short, { "snmp.index_suboid_too_short", PI_MALFORMED, PI_WARN, "index sub-oid shorter than expected", EXPFILL }},
+     { &ei_snmp_unimplemented_instance_index, { "snmp.unimplemented_instance_index", PI_UNDECODED, PI_WARN, "Unimplemented instance index", EXPFILL }},
+     { &ei_snmp_index_suboid_len0, { "snmp.ndex_suboid_len0", PI_MALFORMED, PI_WARN, "index sub-oid OID with len=0", EXPFILL }},
+     { &ei_snmp_index_suboid_too_long, { "snmp.index_suboid_too_long", PI_MALFORMED, PI_WARN, "index sub-oid longer than remaining oid size", EXPFILL }},
+     { &ei_snmp_index_string_too_long, { "snmp.index_string_too_long", PI_MALFORMED, PI_WARN, "index string longer than remaining oid size", EXPFILL }},
+     { &ei_snmp_column_parent_not_row, { "snmp.column_parent_not_row", PI_MALFORMED, PI_ERROR, "COLUMS's parent is not a ROW", EXPFILL }},
+     { &ei_snmp_uint_too_large, { "snmp.uint_too_large", PI_UNDECODED, PI_NOTE, "Unsigned integer value > 2^64 - 1", EXPFILL }},
+     { &ei_snmp_int_too_large, { "snmp.int_too_large", PI_UNDECODED, PI_NOTE, "Signed integer value > 2^63 - 1 or <= -2^63", EXPFILL }},
+     { &ei_snmp_integral_value0, { "snmp.integral_value0", PI_UNDECODED, PI_NOTE, "Integral value is zero-length", EXPFILL }},
+     { &ei_snmp_missing_mib, { "snmp.missing_mib", PI_UNDECODED, PI_NOTE, "Unresolved value, Missing MIB", EXPFILL }},
+     { &ei_snmp_varbind_wrong_length_value, { "snmp.varbind.wrong_length_value", PI_MALFORMED, PI_WARN, "Wrong length for SNMP VarBind/value", EXPFILL }},
+     { &ei_snmp_varbind_wrong_class_tag, { "snmp.varbind.wrong_class_tag", PI_MALFORMED, PI_WARN, "Wrong class/tag for SNMP VarBind/value", EXPFILL }},
+
+  };
+
+  expert_module_t* expert_snmp;
   module_t *snmp_module;
 
   static uat_field_t users_fields[] = {
@@ -2362,6 +2422,8 @@ void proto_register_snmp(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_snmp, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_snmp = expert_register_protocol(proto_snmp);
+  expert_register_field_array(expert_snmp, ei, array_length(ei));
 
 
   /* Register configuration preferences */
index 4db5c729829b83992f579d794d86aa783d06c279..d7ab134b1b8ba51970cd154e6a9154b93b3b85de 100644 (file)
@@ -133,7 +133,7 @@ gint pdu_type=-1;
                        proto_item* cause = proto_tree_add_text(encryptedpdu_tree, crypt_tvb, 0, -1,
                                "Failed to decrypt encryptedPDU: %%s", error);
                        
-                       expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN,
+                       expert_add_info_format_text(actx->pinfo, cause, &ei_snmp_failed_decrypted_data_pdu,
                                "Failed to decrypt encryptedPDU: %%s", error);
 
                        col_set_str(actx->pinfo->cinfo, COL_INFO, "encryptedPDU: Failed to decrypt");
@@ -147,8 +147,7 @@ gint pdu_type=-1;
                                proto_item* cause = proto_tree_add_text(encryptedpdu_tree, cleartext_tvb, 0, -1,
                                                                                        "Decrypted data not formatted as expected, wrong key?");
                                
-                               expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN,
-                                                                          "Decrypted data not formatted as expected");
+                               expert_add_info(actx->pinfo, cause, &ei_snmp_decrypted_data_bad_formatted);
 
                                col_set_str(actx->pinfo->cinfo, COL_INFO, "encryptedPDU: Decrypted data not formatted as expected");
                                
@@ -197,25 +196,22 @@ gint pdu_type=-1;
                if (error) {
                        authen_item = proto_tree_add_text(authen_tree,tvb,0,0,"Error while verifying Message authenticity: %s", error);
                        PROTO_ITEM_SET_GENERATED(authen_item);
-                       expert_add_info_format( actx->pinfo, authen_item, PI_MALFORMED, PI_ERROR, "Error while verifying Message authenticity: %s", error );
+                       expert_add_info_format_text( actx->pinfo, authen_item, &ei_snmp_verify_authentication_error, "Error while verifying Message authenticity: %s", error );
                } else {
-                       int severity;
-                       const gchar* msg;                       
+                       expert_field* expert;
 
                        authen_item = proto_tree_add_boolean(authen_tree, hf_snmp_msgAuthentication, tvb, 0, 0, usm_p.authOK);
                        PROTO_ITEM_SET_GENERATED(authen_item);
                        
                        if (usm_p.authOK) {
-                               msg = "SNMP Authentication OK";
-                               severity = PI_CHAT;
+                               expert = &ei_snmp_authentication_ok;
                        } else {
                                const gchar* calc_auth_str = bytestring_to_str(calc_auth,calc_auth_len,' ');
                                proto_item_append_text(authen_item, " calculated = %s", calc_auth_str);
-                               msg = "SNMP Authentication Error";
-                               severity = PI_WARN;
+                               expert = &ei_snmp_authentication_error;
                        }
 
-                       expert_add_info_format( actx->pinfo, authen_item, PI_CHECKSUM, severity, "%s", msg );
+                       expert_add_info( actx->pinfo, authen_item, expert);
                }
        }
 
index 9b3f730b0d61dce288150cab2f49984269879366..5ad3a71e9fe6a342ae3f2104a8d939021d3f5231 100644 (file)
@@ -110,6 +110,8 @@ static int ett_phsmeas_q = -1;
 
 #include "packet-sv-ett.c"
 
+static expert_field ei_sv_mal_utctime = EI_INIT;
+
 #if 0
 static const value_string sv_q_validity_vals[] = {
   {   0, "good" },
@@ -317,6 +319,12 @@ void proto_register_sv(void) {
 #include "packet-sv-ettarr.c"
        };
 
+       static ei_register_info ei[] = {
+               { &ei_sv_mal_utctime, { "sv.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed UTCTime encoding", EXPFILL }},
+       };
+
+       expert_module_t* expert_sv;
+
        /* Register protocol */
        proto_sv = proto_register_protocol(PNAME, PSNAME, PFNAME);
        register_dissector("sv", dissect_sv, proto_sv);
@@ -324,6 +332,8 @@ void proto_register_sv(void) {
        /* Register fields and subtrees */
        proto_register_field_array(proto_sv, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
+       expert_sv = expert_register_protocol(proto_sv);
+       expert_register_field_array(expert_sv, ei, array_length(ei));
 
        /* Register tap */
        sv_tap = register_tap("sv");
index 2aa8afb41f12215ee660392e21fdabd1a6cbefcf..fe9a4ee72a5661aa5e8b0c7e471e6aa22c20d667 100644 (file)
@@ -38,7 +38,7 @@
                                "BER Error: malformed UTCTime encoding, "
                                "length must be 8 bytes");
                proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-               expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "BER Error: malformed UTCTime encoding");
+               expert_add_info(actx->pinfo, cause, &ei_sv_mal_utctime);
                if(hf_index >= 0)
                {
                        proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
index 2a86dd0d7ea4a1a48fed1bd02c32bda91357ac7a..2a7b87e000ceb8bb77569d4c46ac040a4c518c6e 100644 (file)
@@ -235,6 +235,8 @@ static gint ett_acse_Authentication_value = -1;
 /*--- End of included file: packet-acse-ett.c ---*/
 #line 76 "../../asn1/acse/packet-acse-template.c"
 
+static expert_field ei_acse_dissector_not_available = EI_INIT;
+
 static struct SESSION_DATA_STRUCTURE* session = NULL;
 
 static const char *object_identifier_id;
@@ -1688,7 +1690,7 @@ dissect_acse_AE_title(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _
 
 
 /*--- End of included file: packet-acse-fn.c ---*/
-#line 152 "../../asn1/acse/packet-acse-template.c"
+#line 154 "../../asn1/acse/packet-acse-template.c"
 
 
 /*
@@ -1755,7 +1757,7 @@ dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
                        call_ber_oid_callback(oid, tvb, offset, pinfo, parent_tree);
                } else {
                        proto_item *ti = proto_tree_add_text(parent_tree, tvb, offset, -1, "dissector is not available");
-                       expert_add_info_format(pinfo, ti, PI_UNDECODED, PI_WARN, "Dissector is not available");
+                       expert_add_info(pinfo, ti, &ei_acse_dissector_not_available);
                }
                top_tree = NULL;
                return;
@@ -2239,7 +2241,7 @@ void proto_register_acse(void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-acse-hfarr.c ---*/
-#line 270 "../../asn1/acse/packet-acse-template.c"
+#line 272 "../../asn1/acse/packet-acse-template.c"
   };
 
   /* List of subtrees */
@@ -2285,9 +2287,15 @@ void proto_register_acse(void) {
     &ett_acse_Authentication_value,
 
 /*--- End of included file: packet-acse-ettarr.c ---*/
-#line 276 "../../asn1/acse/packet-acse-template.c"
+#line 278 "../../asn1/acse/packet-acse-template.c"
+  };
+
+  static ei_register_info ei[] = {
+     { &ei_acse_dissector_not_available, { "acse.dissector_not_available", PI_UNDECODED, PI_WARN, "Dissector is not available", EXPFILL }},
   };
 
+  expert_module_t* expert_acse;
+
   /* Register protocol */
   proto_acse = proto_register_protocol(PNAME, PSNAME, PFNAME);
   register_dissector("acse", dissect_acse, proto_acse);
@@ -2299,7 +2307,8 @@ void proto_register_acse(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_acse, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
-
+  expert_acse = expert_register_protocol(proto_acse);
+  expert_register_field_array(expert_acse, ei, array_length(ei));
 }
 
 
index 5959fbc8bc68db31e4bf53d2e6971b4b6647f6c5..adb36fb54d814bb8baad2822f3ebc228c72b6066 100644 (file)
@@ -229,6 +229,19 @@ static gint ett_c1222_Calling_authentication_value_c1221_U = -1;
 /*--- End of included file: packet-c1222-ett.c ---*/
 #line 183 "../../asn1/c1222/packet-c1222-template.c"
 
+static expert_field ei_c1222_command_truncated = EI_INIT;
+static expert_field ei_c1222_bad_checksum = EI_INIT;
+static expert_field ei_c1222_epsem_missing = EI_INIT;
+#ifdef HAVE_LIBGCRYPT
+static expert_field ei_c1222_epsem_failed_authentication = EI_INIT;
+#else
+static expert_field ei_c1222_epsem_not_authenticated = EI_INIT;
+#endif
+static expert_field ei_c1222_epsem_not_decryped = EI_INIT;
+static expert_field ei_c1222_ed_class_missing = EI_INIT;
+static expert_field ei_c1222_epsem_ber_length_error = EI_INIT;
+static expert_field ei_c1222_epsem_field_length_error = EI_INIT;
+static expert_field ei_c1222_mac_missing = EI_INIT;
 
 /*------------------------------
  * Data Structures
@@ -426,7 +439,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
            proto_item_set_text(tree, "C12.22 EPSEM: %s (id %d, user \"%s\")",
                    val_to_str(cmd,commandnames,"Unknown (0x%02x)"), user_id, user_name);
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 LOGON command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 LOGON command truncated");
        }
        break;
     case C1222_CMD_SECURITY:
@@ -447,7 +460,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                      val_to_str(cmd,commandnames,"Unknown (0x%02x)"), password);
            }
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 SECURITY command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 SECURITY command truncated");
        }
        break;
     case C1222_CMD_AUTHENTICATE:
@@ -463,10 +476,10 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                proto_item_set_text(tree, "C12.22 EPSEM: %s (%d bytes: %s)",
                    val_to_str(cmd,commandnames,"Unknown (0x%02x)"), auth_len, auth_req);
            } else {
-               expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 AUTHENTICATE command truncated");
+               expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 AUTHENTICATE command truncated");
            }
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 AUTHENTICATE command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 AUTHENTICATE command truncated");
        }
        break;
     case C1222_CMD_FULL_READ:
@@ -479,7 +492,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
            *offset += 2;
            *length -= 2;
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 READ command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 READ command truncated");
        }
        break;
     case C1222_CMD_PARTIAL_READ_OFFSET:
@@ -498,7 +511,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                    val_to_str(cmd,commandnames,"Unknown (0x%02x)"),
                    val_to_str((table >> 8) & 0xF8, tableflags,"Unknown (0x%04x)"), table & 0x7FF);
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 READ command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 READ command truncated");
        }
        break;
     case C1222_CMD_FULL_WRITE:
@@ -519,7 +532,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                item = proto_tree_add_uint(tree, hf_c1222_write_chksum, tvb, *offset, 1, chksum);
                calcsum = c1222_cksum(tvb, (*offset)-tblsize, tblsize);
                if (chksum != calcsum) {
-                 expert_add_info_format(pinfo, item, PI_CHECKSUM, PI_ERROR, "Bad checksum [should be 0x%02x]", calcsum);
+                 expert_add_info_format_text(pinfo, item, &ei_c1222_bad_checksum, "Bad checksum [should be 0x%02x]", calcsum);
                }
                proto_item_set_text(tree, "C12.22 EPSEM: %s (%s-%d)",
                        val_to_str(cmd,commandnames,"Unknown (0x%02x)"),
@@ -527,10 +540,10 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                *offset += 1;
                *length -= 1;
            } else {
-               expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 WRITE command truncated");
+               expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 WRITE command truncated");
            }
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 WRITE command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 WRITE command truncated");
        }
        break;
     case C1222_CMD_PARTIAL_WRITE_OFFSET:
@@ -554,7 +567,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                item = proto_tree_add_uint(tree, hf_c1222_write_chksum, tvb, *offset, 1, chksum);
                calcsum = c1222_cksum(tvb, (*offset)-tblsize, tblsize);
                if (chksum != calcsum) {
-                 expert_add_info_format(pinfo, item, PI_CHECKSUM, PI_ERROR, "Bad checksum [should be 0x%02x]", calcsum);
+                 expert_add_info_format_text(pinfo, item, &ei_c1222_bad_checksum, "Bad checksum [should be 0x%02x]", calcsum);
                }
                proto_item_set_text(tree, "C12.22 EPSEM: %s (%s-%d)",
                        val_to_str(cmd,commandnames,"Unknown (0x%02x)"),
@@ -562,10 +575,10 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
                *offset += 1;
                *length -= 1;
            } else {
-               expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 WRITE command truncated");
+               expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 WRITE command truncated");
            }
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 WRITE command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 WRITE command truncated");
        }
        break;
     case C1222_CMD_WAIT:
@@ -577,7 +590,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
            proto_item_set_text(tree, "C12.22 EPSEM: %s (%d seconds)",
                val_to_str(cmd,commandnames,"Unknown (0x%02x)"), wait_seconds);
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 WAIT command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 WAIT command truncated");
        }
        break;
     case C1222_CMD_NEGOTIATE:
@@ -593,7 +606,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
            proto_item_set_text(tree, "C12.22 EPSEM: %s (pkt size %d, num pkts %d, with %d baud rates)",
                    val_to_str(cmd,commandnames,"Unknown (0x%02x)"), packet_size, nbr_packet, numrates);
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 NEGOTIATE command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 NEGOTIATE command truncated");
        }
        break;
     case C1222_CMD_TIMING_SETUP:
@@ -617,7 +630,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
            proto_item_set_text(tree, "C12.22 EPSEM: %s (traffic to %d s, inter-char to %d s, response to %d s, %d retries)",
                    val_to_str(cmd,commandnames,"Unknown (0x%02x)"), traffic, inter_char, resp_to, nbr_retries);
        } else {
-           expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 NEGOTIATE command truncated");
+           expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 NEGOTIATE command truncated");
        }
        break;
 
@@ -628,7 +641,7 @@ parse_c1222_detailed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int cm
            if (*length >= *length) {
              proto_tree_add_item(tree, hf_c1222_data, tvb, *offset, *length, ENC_NA);
            } else {
-               expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 unknown command truncated");
+               expert_add_info_format_text(pinfo, tree, &ei_c1222_command_truncated, "C12.22 unknown command truncated");
            }
        }
        break;
@@ -920,7 +933,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
   gboolean encrypted = FALSE;
 
   if ((tvb == NULL) && (len == 0)) {
-      expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 EPSEM missing");
+      expert_add_info(pinfo, tree, &ei_c1222_epsem_missing);
       return offset;
   }
   /* parse the flags byte which is always unencrypted */
@@ -961,9 +974,9 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
        if (!decrypt_packet(buffer, len2, FALSE)) {
 #ifdef HAVE_LIBGCRYPT
          crypto_bad = TRUE;
-         expert_add_info_format(pinfo, tree, PI_SECURITY, PI_ERROR, "C12.22 EPSEM failed authentication");
+         expert_add_info(pinfo, tree, &ei_c1222_epsem_failed_authentication);
 #else /* HAVE_LIBGCRYPT */
-         expert_add_info_format(pinfo, tree, PI_SECURITY, PI_WARN, "C12.22 EPSEM could not be authenticated");
+         expert_add_info(pinfo, tree, &ei_c1222_epsem_not_authenticated);
 #endif /* HAVE_LIBGCRYPT */
        } else {
          crypto_good = TRUE;
@@ -977,7 +990,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
   /* it's only encrypted if we have an undecrypted payload */
   if (encrypted) {
     proto_tree_add_item(tree, hf_c1222_epsem_total, tvb, offset, -1, ENC_NA);
-    expert_add_info_format(pinfo, tree, PI_UNDECODED, PI_WARN, "C12.22 EPSEM could not be decrypted");
+    expert_add_info(pinfo, tree, &ei_c1222_epsem_not_decryped);
     local_offset = offset+len2-4;
     epsem_buffer = tvb;
   } else {  /* it's not (now) encrypted */
@@ -988,7 +1001,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
        proto_tree_add_item(tree, hf_c1222_epsem_ed_class, epsem_buffer, local_offset, 4, ENC_NA);
        local_offset += 4;
       } else {
-       expert_add_info_format(pinfo, tree, PI_SECURITY, PI_ERROR, "C12.22 ED Class missing");
+       expert_add_info(pinfo, tree, &ei_c1222_ed_class_missing);
       }
     }
     /* what follows are one or more <epsem-data> elements possibly followed by
@@ -1000,7 +1013,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
       if (ber_len_ok(epsem_buffer, local_offset)) {
        local_offset = dissect_ber_length(pinfo, tree, epsem_buffer, local_offset, (guint32 *)&len2, &ind);
       } else {
-       expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 EPSEM BER length error");
+       expert_add_info(pinfo, tree, &ei_c1222_epsem_ber_length_error);
        return offset+len;
       }
       if (tvb_offset_exists(epsem_buffer, local_offset+len2-1)) {
@@ -1010,7 +1023,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
        parse_c1222_detailed(epsem_buffer, pinfo, cmd_tree, cmd_err, (guint32 *)&len2, &local_offset);
        local_offset += len2;
       } else {
-       expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 EPSEM field length error");
+       expert_add_info(pinfo, tree, &ei_c1222_epsem_field_length_error);
        return offset+len;
       }
     }
@@ -1025,7 +1038,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
       item = proto_tree_add_boolean(crypto_tree, hf_c1222_epsem_crypto_bad, tvb, local_offset, 4, crypto_bad);
       PROTO_ITEM_SET_GENERATED(item);
     } else {
-      expert_add_info_format(pinfo, tree, PI_MALFORMED, PI_ERROR, "C12.22 MAC missing");
+      expert_add_info(pinfo, tree, &ei_c1222_mac_missing);
       return offset+len;
     }
   }
@@ -1482,7 +1495,7 @@ static void dissect_C1222_MESSAGE_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_,
 
 
 /*--- End of included file: packet-c1222-fn.c ---*/
-#line 988 "../../asn1/c1222/packet-c1222-template.c"
+#line 1001 "../../asn1/c1222/packet-c1222-template.c"
 
 /**
  * Dissects a a full (reassembled) C12.22 message.
@@ -1855,7 +1868,7 @@ void proto_register_c1222(void) {
         "OCTET_STRING_SIZE_CONSTR002", HFILL }},
 
 /*--- End of included file: packet-c1222-hfarr.c ---*/
-#line 1264 "../../asn1/c1222/packet-c1222-template.c"
+#line 1277 "../../asn1/c1222/packet-c1222-template.c"
   };
 
   /* List of subtrees */
@@ -1877,9 +1890,26 @@ void proto_register_c1222(void) {
     &ett_c1222_Calling_authentication_value_c1221_U,
 
 /*--- End of included file: packet-c1222-ettarr.c ---*/
-#line 1274 "../../asn1/c1222/packet-c1222-template.c"
+#line 1287 "../../asn1/c1222/packet-c1222-template.c"
+  };
+
+  static ei_register_info ei[] = {
+     { &ei_c1222_command_truncated, { "c1222.command_truncated", PI_MALFORMED, PI_ERROR, "C12.22 command truncated", EXPFILL }},
+     { &ei_c1222_bad_checksum, { "c1222.bad_checksum", PI_CHECKSUM, PI_ERROR, "Bad checksum", EXPFILL }},
+     { &ei_c1222_epsem_missing, { "c1222.epsem.missing", PI_MALFORMED, PI_ERROR, "C12.22 EPSEM missing", EXPFILL }},
+#ifdef HAVE_LIBGCRYPT
+     { &ei_c1222_epsem_failed_authentication, { "c1222.epsem.failed_authentication", PI_SECURITY, PI_ERROR, "C12.22 EPSEM failed authentication", EXPFILL }},
+#else
+     { &ei_c1222_epsem_not_authenticated, { "c1222.epsem.not_authenticated", PI_SECURITY, PI_WARN, "C12.22 EPSEM could not be authenticated", EXPFILL }},
+#endif
+     { &ei_c1222_epsem_not_decryped, { "c1222.epsem.not_decryped", PI_UNDECODED, PI_WARN, "C12.22 EPSEM could not be decrypted", EXPFILL }},
+     { &ei_c1222_ed_class_missing, { "c1222.ed_class_missing", PI_SECURITY, PI_ERROR, "C12.22 ED Class missing", EXPFILL }},
+     { &ei_c1222_epsem_ber_length_error, { "c1222.epsem.ber_length_error", PI_MALFORMED, PI_ERROR, "C12.22 EPSEM BER length error", EXPFILL }},
+     { &ei_c1222_epsem_field_length_error, { "c1222.epsem.field_length_error", PI_MALFORMED, PI_ERROR, "C12.22 EPSEM field length error", EXPFILL }},
+     { &ei_c1222_mac_missing, { "c1222.mac_missing", PI_MALFORMED, PI_ERROR, "C12.22 MAC missing", EXPFILL }},
   };
 
+  expert_module_t* expert_c1222;
   module_t *c1222_module;
 
 #ifdef HAVE_LIBGCRYPT
@@ -1895,6 +1925,8 @@ void proto_register_c1222(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_c1222, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_c1222 = expert_register_protocol(proto_c1222);
+  expert_register_field_array(expert_c1222, ei, array_length(ei));
   c1222_module = prefs_register_protocol(proto_c1222, proto_reg_handoff_c1222);
   prefs_register_bool_preference(c1222_module, "desegment",
        "Reassemble all C12.22 messages spanning multiple TCP segments",
index e38a8af430aa60748834d1285ed28b117e15c1f2..8a1e87466cab59d6f44ef7050fcd5ffffcb6ab0d 100644 (file)
@@ -831,6 +831,9 @@ static gint ett_camel_InvokeId = -1;
 /*--- End of included file: packet-camel-ett.c ---*/
 #line 137 "../../asn1/camel/packet-camel-template.c"
 
+static expert_field ei_camel_unknown_invokeData = EI_INIT;
+static expert_field ei_camel_unknown_returnResultData = EI_INIT;
+static expert_field ei_camel_unknown_returnErrorData = EI_INIT;
 
 /* Preference settings default */
 #define MAX_SSN 254
@@ -1150,7 +1153,7 @@ static const value_string camel_ectTreatmentIndicator_values[] = {
 #define noInvokeId                     NULL
 
 /*--- End of included file: packet-camel-val.h ---*/
-#line 273 "../../asn1/camel/packet-camel-template.c"
+#line 276 "../../asn1/camel/packet-camel-template.c"
 
 
 /*--- Included file: packet-camel-table.c ---*/
@@ -1240,7 +1243,7 @@ static const value_string camel_err_code_string_vals[] = {
 
 
 /*--- End of included file: packet-camel-table.c ---*/
-#line 275 "../../asn1/camel/packet-camel-template.c"
+#line 278 "../../asn1/camel/packet-camel-template.c"
 
 static char camel_number_to_char(int number)
 {
@@ -7003,7 +7006,7 @@ static void dissect_CAP_U_ABORT_REASON_PDU(tvbuff_t *tvb _U_, packet_info *pinfo
 
 
 /*--- End of included file: packet-camel-fn.c ---*/
-#line 322 "../../asn1/camel/packet-camel-template.c"
+#line 325 "../../asn1/camel/packet-camel-template.c"
 
 
 /*--- Included file: packet-camel-table2.c ---*/
@@ -7163,7 +7166,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
     default:
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
       proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-      expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+      expert_add_info_format_text(actx->pinfo, cause, &ei_camel_unknown_invokeData, "Unknown invokeData %d",opcode);
       /* todo call the asn.1 dissector */
       break;
   }
@@ -7184,7 +7187,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
     proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnResultData %d",opcode);
+    expert_add_info_format_text(actx->pinfo, cause, &ei_camel_unknown_returnResultData, "Unknown returnResultData %d",opcode);
   }
   return offset;
 }
@@ -7209,14 +7212,14 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,a
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
     proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnErrorData %d",errorCode);
+    expert_add_info_format_text(actx->pinfo, cause, &ei_camel_unknown_returnErrorData, "Unknown returnErrorData %d",errorCode);
   }
   return offset;
 }
 
 
 /*--- End of included file: packet-camel-table2.c ---*/
-#line 324 "../../asn1/camel/packet-camel-template.c"
+#line 327 "../../asn1/camel/packet-camel-template.c"
 
 
 static guint8 camel_pdu_type = 0;
@@ -7417,7 +7420,7 @@ void proto_reg_handoff_camel(void) {
 
 
 /*--- End of included file: packet-camel-dis-tab.c ---*/
-#line 517 "../../asn1/camel/packet-camel-template.c"
+#line 520 "../../asn1/camel/packet-camel-template.c"
   } else {
     range_foreach(ssn_range, range_delete_callback);
     g_free(ssn_range);
@@ -9531,7 +9534,7 @@ void proto_register_camel(void) {
         "InvokeId_present", HFILL }},
 
 /*--- End of included file: packet-camel-hfarr.c ---*/
-#line 690 "../../asn1/camel/packet-camel-template.c"
+#line 693 "../../asn1/camel/packet-camel-template.c"
   };
 
   /* List of subtrees */
@@ -9746,8 +9749,17 @@ void proto_register_camel(void) {
     &ett_camel_InvokeId,
 
 /*--- End of included file: packet-camel-ettarr.c ---*/
-#line 706 "../../asn1/camel/packet-camel-template.c"
+#line 709 "../../asn1/camel/packet-camel-template.c"
   };
+
+  static ei_register_info ei[] = {
+     { &ei_camel_unknown_invokeData, { "camel.unknown.invokeData", PI_MALFORMED, PI_WARN, "Unknown invokeData", EXPFILL }},
+     { &ei_camel_unknown_returnResultData, { "camel.unknown.returnResultData", PI_MALFORMED, PI_WARN, "Unknown returnResultData", EXPFILL }},
+     { &ei_camel_unknown_returnErrorData, { "camel.unknown.returnErrorData", PI_MALFORMED, PI_WARN, "Unknown returnResultData", EXPFILL }},
+  };
+
+  expert_module_t* expert_camel;
+
   /* Register protocol */
   proto_camel = proto_register_protocol(PNAME, PSNAME, PFNAME);
 
@@ -9757,6 +9769,8 @@ void proto_register_camel(void) {
 
   proto_register_field_array(proto_camel, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_camel = expert_register_protocol(proto_camel);
+  expert_register_field_array(expert_camel, ei, array_length(ei));
 
   rose_ctx_init(&camel_rose_ctx);
 
index cc418ac0bbc7b7ef4a28e0055bf5494c6bbafd56..afc6856b1b539728fbca8b60c6012b42a3dd6ba8 100644 (file)
@@ -94,6 +94,9 @@ static gint ett_cdt_T_contentType = -1;
 /*--- End of included file: packet-cdt-ett.c ---*/
 #line 65 "../../asn1/cdt/packet-cdt-template.c"
 
+static expert_field ei_cdt_unable_compress_content = EI_INIT;
+static expert_field ei_cdt_unable_uncompress_content = EI_INIT;
+
 
 /*--- Included file: packet-cdt-fn.c ---*/
 #line 1 "../../asn1/cdt/packet-cdt-fn.c"
@@ -250,8 +253,7 @@ dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
   if (compr_tvb == NULL) {
     tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
                               "[Error: Unable to get compressed content]");
-    expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
-                            "Unable to get compressed content");
+    expert_add_info(actx->pinfo, tf, &ei_cdt_unable_compress_content);
     col_append_str (actx->pinfo->cinfo, COL_INFO, 
                     "[Error: Unable to get compressed content]");
     return offset;
@@ -262,8 +264,7 @@ dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
   if (next_tvb == NULL) {
     tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
                               "[Error: Unable to uncompress content]");
-    expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
-                            "Unable to uncompress content");
+    expert_add_info(actx->pinfo, tf, &ei_cdt_unable_uncompress_content);
     col_append_str (actx->pinfo->cinfo, COL_INFO, 
                     "[Error: Unable to uncompress content]");
     return offset;
@@ -337,7 +338,7 @@ static void dissect_CompressedData_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_
 
 
 /*--- End of included file: packet-cdt-fn.c ---*/
-#line 67 "../../asn1/cdt/packet-cdt-template.c"
+#line 70 "../../asn1/cdt/packet-cdt-template.c"
 
 
 /*--- proto_register_cdt -------------------------------------------*/
@@ -408,7 +409,7 @@ void proto_register_cdt (void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-cdt-hfarr.c ---*/
-#line 97 "../../asn1/cdt/packet-cdt-template.c"
+#line 100 "../../asn1/cdt/packet-cdt-template.c"
   };
 
   /* List of subtrees */
@@ -422,16 +423,24 @@ void proto_register_cdt (void) {
     &ett_cdt_T_contentType,
 
 /*--- End of included file: packet-cdt-ettarr.c ---*/
-#line 102 "../../asn1/cdt/packet-cdt-template.c"
+#line 105 "../../asn1/cdt/packet-cdt-template.c"
+  };
+
+  static ei_register_info ei[] = {
+     { &ei_cdt_unable_compress_content, { "cdt.unable_compress_content", PI_UNDECODED, PI_ERROR, "Unable to get compressed content", EXPFILL }},
+     { &ei_cdt_unable_uncompress_content, { "cdt.unable_uncompress_content", PI_UNDECODED, PI_ERROR, "Unable to get uncompressed content", EXPFILL }},
   };
 
+  expert_module_t* expert_cdt;
+
   /* Register protocol */
   proto_cdt = proto_register_protocol (PNAME, PSNAME, PFNAME);
 
   /* Register fields and subtrees */
   proto_register_field_array (proto_cdt, hf, array_length(hf));
   proto_register_subtree_array (ett, array_length(ett));
-
+  expert_cdt = expert_register_protocol(proto_cdt);
+  expert_register_field_array(expert_cdt, ei, array_length(ei));
 }
 
 
@@ -444,7 +453,7 @@ void proto_reg_handoff_cdt (void) {
 
 
 /*--- End of included file: packet-cdt-dis-tab.c ---*/
-#line 117 "../../asn1/cdt/packet-cdt-template.c"
+#line 128 "../../asn1/cdt/packet-cdt-template.c"
 
   data_handle = find_dissector ("data");
 }
index ffc3fe1290409ab2e477495960cfe05b488d2d1d..f53814ed74ce6c3addc0bfb4fc8323c047d57dfd 100644 (file)
@@ -345,6 +345,8 @@ static gint ett_dop_GrantsAndDenials = -1;
 /*--- End of included file: packet-dop-ett.c ---*/
 #line 71 "../../asn1/dop/packet-dop-template.c"
 
+static expert_field ei_dop_unknown_binding_parameter = EI_INIT;
+
 /* Dissector table */
 static dissector_table_t dop_dissector_table;
 
@@ -2042,7 +2044,7 @@ static void dissect_ACIItem_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto
 
 
 /*--- End of included file: packet-dop-fn.c ---*/
-#line 84 "../../asn1/dop/packet-dop-template.c"
+#line 86 "../../asn1/dop/packet-dop-template.c"
 
 static int
 call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, const char *col_info)
@@ -2064,7 +2066,7 @@ call_dop_oid_callback(const char *base_string, tvbuff_t *tvb, int offset, packet
         next_tree = proto_item_add_subtree(item, ett_dop_unknown);
      }
      offset = dissect_unknown_ber(pinfo, tvb, offset, next_tree);
-     expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN, "Unknown binding-parameter");
+     expert_add_info(pinfo, item, &ei_dop_unknown_binding_parameter);
    }
 
    return offset;
@@ -2962,7 +2964,7 @@ void proto_register_dop(void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-dop-hfarr.c ---*/
-#line 239 "../../asn1/dop/packet-dop-template.c"
+#line 241 "../../asn1/dop/packet-dop-template.c"
   };
 
   /* List of subtrees */
@@ -3041,9 +3043,14 @@ void proto_register_dop(void) {
     &ett_dop_GrantsAndDenials,
 
 /*--- End of included file: packet-dop-ettarr.c ---*/
-#line 246 "../../asn1/dop/packet-dop-template.c"
+#line 248 "../../asn1/dop/packet-dop-template.c"
+  };
+
+  static ei_register_info ei[] = {
+     { &ei_dop_unknown_binding_parameter, { "dop.unknown_binding_parameter", PI_UNDECODED, PI_WARN, "Unknown binding-parameter", EXPFILL }},
   };
 
+  expert_module_t* expert_dop;
   module_t *dop_module;
 
   /* Register protocol */
@@ -3056,6 +3063,8 @@ void proto_register_dop(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_dop, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_dop = expert_register_protocol(proto_dop);
+  expert_register_field_array(expert_dop, ei, array_length(ei));
 
   /* Register our configuration options for DOP, particularly our port */
 
@@ -3097,7 +3106,7 @@ void proto_reg_handoff_dop(void) {
 
 
 /*--- End of included file: packet-dop-dis-tab.c ---*/
-#line 279 "../../asn1/dop/packet-dop-template.c"
+#line 288 "../../asn1/dop/packet-dop-template.c"
   /* APPLICATION CONTEXT */
 
   oid_add_from_string("id-ac-directory-operational-binding-management","2.5.3.3");
index 15241b85233e6420d75748d0bfe47061961c1fb1..a17e644ce349b03cc57379998436f222da03632e 100644 (file)
@@ -54,6 +54,8 @@ static int hf_goose_length = -1;
 static int hf_goose_reserve1 = -1;
 static int hf_goose_reserve2 = -1;
 
+static expert_field ei_goose_mal_utctime = EI_INIT;
+
 
 /*--- Included file: packet-goose-hf.c ---*/
 #line 1 "../../asn1/goose/packet-goose-hf.c"
@@ -118,7 +120,7 @@ static int hf_goose_mMSString = -1;               /* MMSString */
 static int hf_goose_utc_time = -1;                /* UtcTime */
 
 /*--- End of included file: packet-goose-hf.c ---*/
-#line 50 "../../asn1/goose/packet-goose-template.c"
+#line 52 "../../asn1/goose/packet-goose-template.c"
 
 /* Initialize the subtree pointers */
 static int ett_goose = -1;
@@ -145,7 +147,7 @@ static gint ett_goose_SEQUENCE_OF_Data = -1;
 static gint ett_goose_Data = -1;
 
 /*--- End of included file: packet-goose-ett.c ---*/
-#line 55 "../../asn1/goose/packet-goose-template.c"
+#line 57 "../../asn1/goose/packet-goose-template.c"
 
 
 /*--- Included file: packet-goose-fn.c ---*/
@@ -490,7 +492,7 @@ dissect_goose_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _
                                "BER Error: malformed UTCTime encoding, "
                                "length must be 8 bytes");
                proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-               expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "BER Error: malformed UTCTime encoding");
+               expert_add_info(actx->pinfo, cause, &ei_goose_mal_utctime);
                if(hf_index >= 0)
                {
                        proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
@@ -713,7 +715,7 @@ dissect_goose_GOOSEpdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
 
 
 /*--- End of included file: packet-goose-fn.c ---*/
-#line 57 "../../asn1/goose/packet-goose-template.c"
+#line 59 "../../asn1/goose/packet-goose-template.c"
 
 /*
 * Dissect GOOSE PDUs inside a PPDU.
@@ -1022,7 +1024,7 @@ void proto_register_goose(void) {
         "UtcTime", HFILL }},
 
 /*--- End of included file: packet-goose-hfarr.c ---*/
-#line 125 "../../asn1/goose/packet-goose-template.c"
+#line 127 "../../asn1/goose/packet-goose-template.c"
   };
 
   /* List of subtrees */
@@ -1050,9 +1052,15 @@ void proto_register_goose(void) {
     &ett_goose_Data,
 
 /*--- End of included file: packet-goose-ettarr.c ---*/
-#line 131 "../../asn1/goose/packet-goose-template.c"
+#line 133 "../../asn1/goose/packet-goose-template.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_goose_mal_utctime, { "goose.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed UTCTime encoding", EXPFILL }},
+  };
+
+  expert_module_t* expert_goose;
+
        /* Register protocol */
        proto_goose = proto_register_protocol(PNAME, PSNAME, PFNAME);
        register_dissector("goose", dissect_goose, proto_goose);
@@ -1060,7 +1068,8 @@ void proto_register_goose(void) {
        /* Register fields and subtrees */
        proto_register_field_array(proto_goose, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
-
+       expert_goose = expert_register_protocol(proto_goose);
+       expert_register_field_array(expert_goose, ei, array_length(ei));
 }
 
 /*--- proto_reg_handoff_goose --- */
index c582e5c5de5d48b8179242c004bd25b369cb0932..9adac91c3fb1ca0305e56e4e44ad620e68e83f2a 100644 (file)
@@ -2379,6 +2379,11 @@ static gint ett_gsm_map_ericsson_EnhancedCheckIMEI_Arg = -1;
 /*--- End of included file: packet-gsm_map-ett.c ---*/
 #line 185 "../../asn1/gsm_map/packet-gsm_map-template.c"
 
+static expert_field ei_gsm_map_unknown_sequence3 = EI_INIT;
+static expert_field ei_gsm_map_unknown_sequence = EI_INIT;
+static expert_field ei_gsm_map_unknown_parameter = EI_INIT;
+static expert_field ei_gsm_map_unknown_invokeData = EI_INIT;
+
 static dissector_table_t       sms_dissector_table;    /* SMS TPDU */
 static dissector_handle_t      data_handle;
 static dissector_handle_t      ranap_handle;
@@ -18269,7 +18274,7 @@ dissect_gsm_map_ericsson_EnhancedCheckIMEI_Arg(gboolean implicit_tag _U_, tvbuff
 
 
 /*--- End of included file: packet-gsm_map-fn.c ---*/
-#line 841 "../../asn1/gsm_map/packet-gsm_map-template.c"
+#line 846 "../../asn1/gsm_map/packet-gsm_map-template.c"
 
 /* Specific translation for MAP V3 */
 const value_string gsm_map_V1V2_opr_code_strings[] = {
@@ -18487,7 +18492,7 @@ const value_string gsm_map_opr_code_strings[] = {
 /* Unknown or empty loop list OPERATION */
 
 /*--- End of included file: packet-gsm_map-table.c ---*/
-#line 852 "../../asn1/gsm_map/packet-gsm_map-template.c"
+#line 857 "../../asn1/gsm_map/packet-gsm_map-template.c"
   { 0, NULL }
 };
 static const value_string gsm_map_err_code_string_vals[] = {
@@ -18698,7 +18703,7 @@ static const value_string gsm_map_err_code_string_vals[] = {
 /* Unknown or empty loop list OPERATION */
 
 /*--- End of included file: packet-gsm_map-table.c ---*/
-#line 856 "../../asn1/gsm_map/packet-gsm_map-template.c"
+#line 861 "../../asn1/gsm_map/packet-gsm_map-template.c"
     { 0, NULL }
 };
 static const true_false_string gsm_map_extension_value = {
@@ -18828,24 +18833,21 @@ static int dissect_mc_message(tvbuff_t *tvb,
       offset= (sequence3) (implicit_seq3, tvb, offset, actx, tree, hf_index_seq3);
     } else {
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented [3] sequence, cannot decode");
-      proto_item_set_expert_flags(cause, PI_UNDECODED, PI_ERROR);
-      expert_add_info_format(actx->pinfo, cause, PI_UNDECODED, PI_ERROR, "Unknown or not implemented [3] sequence");
+      expert_add_info(actx->pinfo, cause, &ei_gsm_map_unknown_sequence3);
     }
   } else if (octet == 0x30) {
     if (sequence != NULL) {
       offset= (sequence) (implicit_seq, tvb, 0, actx, tree, hf_index_seq);
     } else {
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented sequence");
-      proto_item_set_expert_flags(cause, PI_UNDECODED, PI_ERROR);
-      expert_add_info_format(actx->pinfo, cause, PI_UNDECODED, PI_ERROR, "Unknown or not implemented sequence");
+      expert_add_info(actx->pinfo, cause, &ei_gsm_map_unknown_sequence);
     }
   } else {
     if (parameter != NULL) {
       offset= (parameter) (implicit_param, tvb, offset, actx, tree, hf_index_param);
     } else {
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown or not implemented parameter");
-      proto_item_set_expert_flags(cause, PI_UNDECODED, PI_ERROR);
-      expert_add_info_format(actx->pinfo, cause, PI_UNDECODED, PI_ERROR, "Unknown or not implemented parameter");
+      expert_add_info(actx->pinfo, cause, &ei_gsm_map_unknown_parameter);
     }
   }
   return offset;
@@ -19202,8 +19204,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
   default:
     if(!dissector_try_uint(map_prop_arg_opcode_table, (guint8)opcode, tvb, actx->pinfo, tree)){
         cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
-        proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-        expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+        expert_add_info_format_text(actx->pinfo, cause, &ei_gsm_map_unknown_invokeData, "Unknown invokeData %d",opcode);
        }
        offset+= tvb_length_remaining(tvb,offset);
        break;
@@ -19510,8 +19511,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,
  default:
    if(!dissector_try_uint(map_prop_res_opcode_table, (guint8)opcode, tvb, actx->pinfo, tree)){
        cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
-       proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-       expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+       expert_add_info_format_text(actx->pinfo, cause, &ei_gsm_map_unknown_invokeData, "Unknown invokeData %d",opcode);
    }
    offset+= tvb_length_remaining(tvb,offset);
    break;
@@ -19675,8 +19675,7 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,
   default:
     if(!dissector_try_uint(map_prop_err_opcode_table, (guint8)opcode, tvb, actx->pinfo, tree)){
         cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
-        proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-        expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",errorCode);
+        expert_add_info_format_text(actx->pinfo, cause, &ei_gsm_map_unknown_invokeData, "Unknown invokeData %d",errorCode);
     }
        offset+= tvb_length_remaining(tvb,offset);
     break;
@@ -20161,6 +20160,7 @@ void proto_reg_handoff_gsm_map(void) {
 /*--- proto_register_gsm_map -------------------------------------------*/
 void proto_register_gsm_map(void) {
        module_t *gsm_map_module;
+       expert_module_t* expert_gsm_map;
 
   /* List of fields */
   static hf_register_info hf[] = {
@@ -27240,6 +27240,13 @@ void proto_register_gsm_map(void) {
 #line 2647 "../../asn1/gsm_map/packet-gsm_map-template.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_gsm_map_unknown_sequence3, { "gsm_map.unknown.sequence3", PI_UNDECODED, PI_ERROR, "Unknown or not implemented [3] sequence", EXPFILL }},
+     { &ei_gsm_map_unknown_sequence, { "gsm_map.unknown.sequence", PI_UNDECODED, PI_ERROR, "Unknown or not implemented sequence", EXPFILL }},
+     { &ei_gsm_map_unknown_parameter, { "gsm_map.unknown.parameter", PI_UNDECODED, PI_ERROR, "Unknown or not implemented parameter", EXPFILL }},
+     { &ei_gsm_map_unknown_invokeData, { "gsm_map.unknown.invokeData", PI_MALFORMED, PI_WARN, "Unknown invokeData", EXPFILL }},
+  };
+
   static const enum_val_t application_context_modes[] = {
     {"Use Application Context from the trace", "Use application context from the trace", APPLICATON_CONTEXT_FROM_TRACE},
     {"Treat as AC 1", "Treat as AC 1", 1},
@@ -27257,6 +27264,8 @@ void proto_register_gsm_map(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_gsm_map, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_gsm_map = expert_register_protocol(proto_gsm_map);
+  expert_register_field_array(expert_gsm_map, ei, array_length(ei));
 
   sms_dissector_table = register_dissector_table("gsm_map.sms_tpdu",
                                                 "GSM SMS TPDU", FT_UINT8,
@@ -27330,7 +27339,7 @@ void proto_register_gsm_map(void) {
 
 
 /*--- End of included file: packet-gsm_map-dis-tab.c ---*/
-#line 2678 "../../asn1/gsm_map/packet-gsm_map-template.c"
+#line 2687 "../../asn1/gsm_map/packet-gsm_map-template.c"
   oid_add_from_string("ericsson-gsm-Map-Ext","1.2.826.0.1249.58.1.0" );
   oid_add_from_string("accessTypeNotAllowed-id","1.3.12.2.1107.3.66.1.2");
   /*oid_add_from_string("map-ac networkLocUp(1) version3(3)","0.4.0.0.1.0.1.3" );
index 69508d1c89b3be1028be20bf26f35a7b76ad2dca..deb2db44d286b5046107ff06bf3cd72ca0f56d46 100644 (file)
@@ -563,6 +563,8 @@ static gint ett_h248_SigParameterV1 = -1;
 /*--- End of included file: packet-h248-ett.c ---*/
 #line 90 "../../asn1/h248/packet-h248-template.c"
 
+static expert_field ei_h248_errored_command = EI_INIT;
+
 static dissector_table_t subdissector_table;
 
 static emem_tree_t* msgs = NULL;
@@ -2080,7 +2082,7 @@ static int
 dissect_h248_T_errorCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
 #line 302 "../../asn1/h248/h248.cnf"
     offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_h248_error_code, &error_code);
-    expert_add_info_format(actx->pinfo, actx->created_item, PI_RESPONSE_CODE, PI_WARN, "Errored Command");
+    expert_add_info(actx->pinfo, actx->created_item, &ei_h248_errored_command);
     
     if (curr_info.cmd) {
         gcp_cmd_set_error(curr_info.cmd,error_code);
@@ -5365,7 +5367,7 @@ dissect_h248_ValueV1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
 
 
 /*--- End of included file: packet-h248-fn.c ---*/
-#line 1408 "../../asn1/h248/packet-h248-template.c"
+#line 1410 "../../asn1/h248/packet-h248-template.c"
 
 static void dissect_h248_tpkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
     dissect_tpkt_encap(tvb, pinfo, tree, h248_desegment, h248_handle);
@@ -6784,7 +6786,7 @@ void proto_register_h248(void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-h248-hfarr.c ---*/
-#line 1570 "../../asn1/h248/packet-h248-template.c"
+#line 1572 "../../asn1/h248/packet-h248-template.c"
 
         GCP_HF_ARR_ELEMS("h248",h248_arrel)
 
@@ -6950,11 +6952,15 @@ void proto_register_h248(void) {
     &ett_h248_SigParameterV1,
 
 /*--- End of included file: packet-h248-ettarr.c ---*/
-#line 1588 "../../asn1/h248/packet-h248-template.c"
+#line 1590 "../../asn1/h248/packet-h248-template.c"
     };
 
-    module_t *h248_module;
+    static ei_register_info ei[] = {
+        { &ei_h248_errored_command, { "h248.errored_command", PI_RESPONSE_CODE, PI_WARN, "Errored Command", EXPFILL }},
+    };
 
+    expert_module_t* expert_h248;
+    module_t *h248_module;
 
     /* Register protocol */
     proto_h248 = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -6964,6 +6970,8 @@ void proto_register_h248(void) {
     /* Register fields and subtrees */
     proto_register_field_array(proto_h248, hf, array_length(hf));
     proto_register_subtree_array(ett, array_length(ett));
+    expert_h248 = expert_register_protocol(proto_h248);
+    expert_register_field_array(expert_h248, ei, array_length(ei));
     
     subdissector_table = register_dissector_table("h248.magic_num", "H248 Magic Num", FT_UINT32, BASE_HEX);
 
index f24ae6e8eb1c5039d231de26a4034dd55e882c40..57615cd7e109ea99a59a8a20ca14d9ab15c4966f 100644 (file)
@@ -1290,6 +1290,10 @@ static gint ett_inap_InvokeId = -1;
 /*--- End of included file: packet-inap-ett.c ---*/
 #line 80 "../../asn1/inap/packet-inap-template.c"
 
+static expert_field ei_inap_unknown_invokeData = EI_INIT;
+static expert_field ei_inap_unknown_returnResultData = EI_INIT;
+static expert_field ei_inap_unknown_returnErrorData = EI_INIT;
+
 
 /*--- Included file: packet-inap-table.c ---*/
 #line 1 "../../asn1/inap/packet-inap-table.c"
@@ -1414,7 +1418,7 @@ static const value_string inap_err_code_string_vals[] = {
 
 
 /*--- End of included file: packet-inap-table.c ---*/
-#line 82 "../../asn1/inap/packet-inap-template.c"
+#line 86 "../../asn1/inap/packet-inap-template.c"
 
 const value_string inap_general_problem_strings[] = {
 {0,"General Problem Unrecognized Component"},
@@ -1451,7 +1455,7 @@ dissect_inap_CriticalityType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
 
 static int
 dissect_inap_T_local(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 165 "../../asn1/inap/inap.cnf"
+#line 162 "../../asn1/inap/inap.cnf"
     offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
                                                 &opcode);
 
@@ -1508,7 +1512,7 @@ dissect_inap_Code(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
 
 static int
 dissect_inap_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 223 "../../asn1/inap/inap.cnf"
+#line 220 "../../asn1/inap/inap.cnf"
   proto_tree_add_text(tree, tvb, offset, -1, "Extension Data");
   if (obj_id){
         offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, tree);
@@ -1534,7 +1538,7 @@ static const ber_sequence_t ExtensionField_sequence[] = {
 
 static int
 dissect_inap_ExtensionField(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 218 "../../asn1/inap/inap.cnf"
+#line 215 "../../asn1/inap/inap.cnf"
        obj_id = NULL;
        
 
@@ -2188,7 +2192,7 @@ dissect_inap_BCSMEvent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
 
 static int
 dissect_inap_T_bearerCap(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 255 "../../asn1/inap/inap.cnf"
+#line 252 "../../asn1/inap/inap.cnf"
 
  tvbuff_t      *parameter_tvb;
 
@@ -2343,7 +2347,7 @@ dissect_inap_CalledPartyBusinessGroupID(gboolean implicit_tag _U_, tvbuff_t *tvb
 
 static int
 dissect_inap_CalledPartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 234 "../../asn1/inap/inap.cnf"
+#line 231 "../../asn1/inap/inap.cnf"
   tvbuff_t *parameter_tvb;
 
   offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
@@ -2394,7 +2398,7 @@ dissect_inap_CallingPartyBusinessGroupID(gboolean implicit_tag _U_, tvbuff_t *tv
 
 static int
 dissect_inap_CallingPartyNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 244 "../../asn1/inap/inap.cnf"
+#line 241 "../../asn1/inap/inap.cnf"
   tvbuff_t *parameter_tvb;
 
   offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
@@ -4532,7 +4536,7 @@ dissect_inap_GlobalCallReference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
 
 int
 dissect_inap_HighLayerCompatibility(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 297 "../../asn1/inap/inap.cnf"
+#line 294 "../../asn1/inap/inap.cnf"
 /*
  * -- Indicates the teleservice. For encoding, DSS1 (Q.931) is used.
  */
@@ -4706,7 +4710,7 @@ dissect_inap_NumberingPlan(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
 
 static int
 dissect_inap_OriginalCalledPartyID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 277 "../../asn1/inap/inap.cnf"
+#line 274 "../../asn1/inap/inap.cnf"
 
  tvbuff_t      *parameter_tvb;
 
@@ -4769,7 +4773,7 @@ dissect_inap_Reason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_
 
 static int
 dissect_inap_RedirectingPartyID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 287 "../../asn1/inap/inap.cnf"
+#line 284 "../../asn1/inap/inap.cnf"
 
  tvbuff_t      *parameter_tvb;
 
@@ -4790,7 +4794,7 @@ dissect_inap_RedirectingPartyID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
 
 int
 dissect_inap_RedirectionInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 266 "../../asn1/inap/inap.cnf"
+#line 263 "../../asn1/inap/inap.cnf"
 
  tvbuff_t      *parameter_tvb;
 
@@ -5154,7 +5158,7 @@ dissect_inap_T_triggerId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse
 
 static int
 dissect_inap_T_triggerPar(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 204 "../../asn1/inap/inap.cnf"
+#line 201 "../../asn1/inap/inap.cnf"
 /* FIX ME */
 
 
@@ -7732,7 +7736,7 @@ dissect_inap_MessageReceivedArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
 
 static int
 dissect_inap_T_uIScriptSpecificInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 210 "../../asn1/inap/inap.cnf"
+#line 207 "../../asn1/inap/inap.cnf"
 /* FIX ME */
 
 
@@ -7761,7 +7765,7 @@ dissect_inap_ScriptCloseArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
 
 static int
 dissect_inap_T_uIScriptResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 207 "../../asn1/inap/inap.cnf"
+#line 204 "../../asn1/inap/inap.cnf"
 /* FIX ME */
 
 
@@ -7791,7 +7795,7 @@ dissect_inap_ScriptEventArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
 
 static int
 dissect_inap_T_uIScriptSpecificInfo_01(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 213 "../../asn1/inap/inap.cnf"
+#line 210 "../../asn1/inap/inap.cnf"
 /* FIX ME */
 
 
@@ -7819,7 +7823,7 @@ dissect_inap_ScriptInformationArg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
 
 static int
 dissect_inap_T_uIScriptSpecificInfo_02(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 215 "../../asn1/inap/inap.cnf"
+#line 212 "../../asn1/inap/inap.cnf"
 /* FIX ME */
 
 
@@ -8050,7 +8054,7 @@ dissect_inap_T_linkedId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
 
 static int
 dissect_inap_T_argument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 192 "../../asn1/inap/inap.cnf"
+#line 189 "../../asn1/inap/inap.cnf"
        offset = dissect_invokeData(tree, tvb, offset, actx);
 
 
@@ -8069,7 +8073,7 @@ static const ber_sequence_t Invoke_sequence[] = {
 
 static int
 dissect_inap_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 180 "../../asn1/inap/inap.cnf"
+#line 177 "../../asn1/inap/inap.cnf"
   inap_opcode_type=INAP_OPCODE_INVOKE;
 
 
@@ -8083,7 +8087,7 @@ dissect_inap_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_
 
 static int
 dissect_inap_ResultArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 195 "../../asn1/inap/inap.cnf"
+#line 192 "../../asn1/inap/inap.cnf"
        offset = dissect_returnResultData(tree, tvb, offset, actx);
 
 
@@ -8115,7 +8119,7 @@ static const ber_sequence_t ReturnResult_sequence[] = {
 
 static int
 dissect_inap_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 183 "../../asn1/inap/inap.cnf"
+#line 180 "../../asn1/inap/inap.cnf"
   inap_opcode_type=INAP_OPCODE_RETURN_RESULT;
 
 
@@ -8129,7 +8133,7 @@ dissect_inap_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs
 
 static int
 dissect_inap_T_parameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 198 "../../asn1/inap/inap.cnf"
+#line 195 "../../asn1/inap/inap.cnf"
        offset = dissect_returnErrorData(tree, tvb, offset, actx);
 
 
@@ -8149,7 +8153,7 @@ static const ber_sequence_t ReturnError_sequence[] = {
 
 static int
 dissect_inap_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 186 "../../asn1/inap/inap.cnf"
+#line 183 "../../asn1/inap/inap.cnf"
   inap_opcode_type=INAP_OPCODE_RETURN_ERROR;
 
 
@@ -8269,7 +8273,7 @@ static const ber_sequence_t Reject_sequence[] = {
 
 static int
 dissect_inap_Reject(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 189 "../../asn1/inap/inap.cnf"
+#line 186 "../../asn1/inap/inap.cnf"
   inap_opcode_type=INAP_OPCODE_REJECT;
 
 
@@ -8982,7 +8986,7 @@ static int dissect_PAR_taskRefused_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_
 
 
 /*--- End of included file: packet-inap-fn.c ---*/
-#line 96 "../../asn1/inap/packet-inap-template.c"
+#line 100 "../../asn1/inap/packet-inap-template.c"
 /*
 TC-Invokable OPERATION ::=
   {activateServiceFiltering | activityTest | analysedInformation |
@@ -9268,8 +9272,7 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
       break;
     default:
       cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
-      proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-      expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+      expert_add_info_format_text(actx->pinfo, cause, &ei_inap_unknown_invokeData, "Unknown invokeData %d",opcode);
       /* todo call the asn.1 dissector */
       break;
   }
@@ -9301,8 +9304,7 @@ static int dissect_returnResultData(proto_tree *tree, tvbuff_t *tvb, int offset,
       break;
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
-    proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnResultData %d",opcode);
+    expert_add_info_format_text(actx->pinfo, cause, &ei_inap_unknown_returnResultData, "Unknown returnResultData %d",opcode);
   }
   return offset;
 }
@@ -9332,15 +9334,14 @@ static int dissect_returnErrorData(proto_tree *tree, tvbuff_t *tvb, int offset,a
       break;
   default:
     cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
-    proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-    expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnErrorData %d",errorCode);
+    expert_add_info_format_text(actx->pinfo, cause, &ei_inap_unknown_returnErrorData, "Unknown returnErrorData %d",errorCode);
   }
   return offset;
 }
 
 
 /*--- End of included file: packet-inap-table2.c ---*/
-#line 117 "../../asn1/inap/packet-inap-template.c"
+#line 121 "../../asn1/inap/packet-inap-template.c"
 
 
 static guint8 inap_pdu_type = 0;
@@ -11666,7 +11667,7 @@ void proto_register_inap(void) {
         "InvokeId_present", HFILL }},
 
 /*--- End of included file: packet-inap-hfarr.c ---*/
-#line 198 "../../asn1/inap/packet-inap-template.c"
+#line 202 "../../asn1/inap/packet-inap-template.c"
   };
 
 
@@ -11920,15 +11921,25 @@ void proto_register_inap(void) {
     &ett_inap_InvokeId,
 
 /*--- End of included file: packet-inap-ettarr.c ---*/
-#line 211 "../../asn1/inap/packet-inap-template.c"
+#line 215 "../../asn1/inap/packet-inap-template.c"
   };
 
+  static ei_register_info ei[] = {
+     { &ei_inap_unknown_invokeData, { "inap.unknown.invokeData", PI_MALFORMED, PI_WARN, "Unknown invokeData", EXPFILL }},
+     { &ei_inap_unknown_returnResultData, { "inap.unknown.returnResultData", PI_MALFORMED, PI_WARN, "Unknown returnResultData", EXPFILL }},
+     { &ei_inap_unknown_returnErrorData, { "inap.unknown.returnErrorData", PI_MALFORMED, PI_WARN, "Unknown returnResultData", EXPFILL }},
+  };
+
+  expert_module_t* expert_inap;
+
   /* Register protocol */
   proto_inap = proto_register_protocol(PNAME, PSNAME, PFNAME);
   register_dissector("inap", dissect_inap, proto_inap);
   /* Register fields and subtrees */
   proto_register_field_array(proto_inap, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_inap = expert_register_protocol(proto_inap);
+  expert_register_field_array(expert_inap, ei, array_length(ei));
 
   /* Set default SSNs */
   range_convert_str(&global_ssn_range, "106,241", MAX_SSN);
index 503a969a1894c544b7b9b61b70699e26babd3e83..da8a235f0a6e6d9a5df626bb62a3a4a5ac87fd5c 100644 (file)
@@ -416,6 +416,9 @@ static gint ett_ldap_T_warning = -1;
 /*--- End of included file: packet-ldap-ett.c ---*/
 #line 199 "../../asn1/ldap/packet-ldap-template.c"
 
+static expert_field ei_ldap_exceeded_filter_length = EI_INIT;
+static expert_field ei_ldap_too_many_filter_elements = EI_INIT;
+
 static dissector_table_t ldap_name_dissector_table=NULL;
 static const char *object_identifier_id = NULL; /* LDAP OID */
 
@@ -2236,12 +2239,12 @@ dissect_ldap_Filter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_
        attributedesc_string=NULL;
 
        if (Filter_length++ > MAX_FILTER_LEN) {
-               expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_ERROR, "Filter length exceeds %u. Giving up.", MAX_FILTER_LEN);
+               expert_add_info_format_text(actx->pinfo, tree, &ei_ldap_exceeded_filter_length, "Filter length exceeds %u. Giving up.", MAX_FILTER_LEN);
                THROW(ReportedBoundsError);
        }
 
        if (Filter_elements++ > MAX_FILTER_ELEMENTS) {
-               expert_add_info_format(actx->pinfo, tree, PI_UNDECODED, PI_ERROR, "Found more than %u filter elements. Giving up.", MAX_FILTER_ELEMENTS);
+               expert_add_info_format_text(actx->pinfo, tree, &ei_ldap_too_many_filter_elements, "Found more than %u filter elements. Giving up.", MAX_FILTER_ELEMENTS);
                THROW(ReportedBoundsError);
        }
 
@@ -3836,7 +3839,7 @@ static void dissect_PasswordPolicyResponseValue_PDU(tvbuff_t *tvb _U_, packet_in
 
 
 /*--- End of included file: packet-ldap-fn.c ---*/
-#line 877 "../../asn1/ldap/packet-ldap-template.c"
+#line 880 "../../asn1/ldap/packet-ldap-template.c"
 
 static void
 dissect_ldap_payload(tvbuff_t *tvb, packet_info *pinfo,
@@ -5771,7 +5774,7 @@ void proto_register_ldap(void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-ldap-hfarr.c ---*/
-#line 2231 "../../asn1/ldap/packet-ldap-template.c"
+#line 2234 "../../asn1/ldap/packet-ldap-template.c"
   };
 
   /* List of subtrees */
@@ -5846,7 +5849,7 @@ void proto_register_ldap(void) {
     &ett_ldap_T_warning,
 
 /*--- End of included file: packet-ldap-ettarr.c ---*/
-#line 2244 "../../asn1/ldap/packet-ldap-template.c"
+#line 2247 "../../asn1/ldap/packet-ldap-template.c"
   };
   /* UAT for header fields */
   static uat_field_t custom_attribute_types_uat_fields[] = {
@@ -5855,6 +5858,12 @@ void proto_register_ldap(void) {
      UAT_END_FIELDS
   };
 
+  static ei_register_info ei[] = {
+     { &ei_ldap_exceeded_filter_length, { "ldap.exceeded_filter_length", PI_UNDECODED, PI_ERROR, "Filter length exceeds number. Giving up", EXPFILL }},
+     { &ei_ldap_too_many_filter_elements, { "ldap.too_many_filter_elements", PI_UNDECODED, PI_ERROR, "Found more than %%u filter elements. Giving up.", EXPFILL }},
+  };
+
+  expert_module_t* expert_ldap;
   module_t *ldap_module;
   uat_t *attributes_uat;
 
@@ -5863,7 +5872,8 @@ void proto_register_ldap(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_ldap, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
-
+  expert_ldap = expert_register_protocol(proto_ldap);
+  expert_register_field_array(expert_ldap, ei, array_length(ei));
 
   register_dissector("ldap", dissect_ldap_tcp, proto_ldap);
 
@@ -6005,7 +6015,7 @@ proto_reg_handoff_ldap(void)
 
 
 /*--- End of included file: packet-ldap-dis-tab.c ---*/
-#line 2386 "../../asn1/ldap/packet-ldap-template.c"
+#line 2396 "../../asn1/ldap/packet-ldap-template.c"
 
 
 }
index c631d6a80b7bdbd9698bd918aa65c8c30e022b06..3890e6d4d62a8e04e4ecaee1d850eb8a655f90ba 100644 (file)
@@ -3513,6 +3513,14 @@ static gint ett_lte_rrc_warningType = -1;
 static gint ett_lte_rrc_dataCodingScheme = -1;
 static gint ett_lte_rrc_warningMessageSegment = -1;
 
+static expert_field ei_lte_rrc_number_pages_le15 = EI_INIT;
+static expert_field ei_lte_rrc_si_info_value_changed = EI_INIT;
+static expert_field ei_lte_rrc_sibs_changing = EI_INIT;
+static expert_field ei_lte_rrc_earthquake_warning_sys = EI_INIT;
+static expert_field ei_lte_rrc_commercial_mobile_alert_sys = EI_INIT;
+static expert_field ei_lte_rrc_unexpected_type_value = EI_INIT;
+static expert_field ei_lte_rrc_unexpected_length_value = EI_INIT;
+
 /* Forward declarations */
 static int dissect_DL_DCCH_Message_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_);
 static int dissect_UECapabilityInformation_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_);
@@ -5113,7 +5121,7 @@ dissect_lte_rrc_warningMessageSegment(tvbuff_t *warning_msg_seg_tvb, proto_tree
   nb_of_pages = tvb_get_guint8(warning_msg_seg_tvb, 0);
   ti = proto_tree_add_uint(tree, hf_lte_rrc_warningMessageSegment_nb_pages, warning_msg_seg_tvb, 0, 1, nb_of_pages);
   if (nb_of_pages > 15) {
-    expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
+    expert_add_info_format_text(pinfo, ti, &ei_lte_rrc_number_pages_le15,
                            "Number of pages should be <=15 (found %u)", nb_of_pages);
     nb_of_pages = 15;
   }
@@ -10458,7 +10466,7 @@ dissect_lte_rrc_T_systemInfoValueTag(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx
     if (p_previous != NULL) {
       /* Subtract one from stored result to get previous value */
       guint32 previous = GPOINTER_TO_UINT(p_previous) - 1;
-      expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_WARN,
+      expert_add_info_format_text(actx->pinfo, actx->created_item, &ei_lte_rrc_si_info_value_changed,
                              "SI Info Value changed (now %u, was %u)", value, previous);
     }
   }
@@ -11311,7 +11319,7 @@ dissect_lte_rrc_T_systemInfoModification(tvbuff_t *tvb _U_, int offset _U_, asn1
                                      1, NULL, FALSE, 0, NULL);
 
   col_append_str(actx->pinfo->cinfo, COL_INFO, " (systemInfoModification)");
-  expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_WARN, "SIBs changing in next BCCH modification period - signalled in Paging message");
+  expert_add_info(actx->pinfo, actx->created_item, &ei_lte_rrc_sibs_changing);
 
 
   return offset;
@@ -11330,7 +11338,7 @@ dissect_lte_rrc_T_etws_Indication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t
                                      1, NULL, FALSE, 0, NULL);
 
   col_append_str(actx->pinfo->cinfo, COL_INFO, " (ETWS)");
-  expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_WARN, "Earthquake and Tsunami Warning System Indication!");
+  expert_add_info(actx->pinfo, actx->created_item, &ei_lte_rrc_earthquake_warning_sys);
 
 
   return offset;
@@ -11349,7 +11357,7 @@ dissect_lte_rrc_T_cmas_Indication_r9(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx
                                      1, NULL, FALSE, 0, NULL);
 
   col_append_str(actx->pinfo->cinfo, COL_INFO, " (CMAS)");
-  expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_WARN, "Commercial Mobile Alert System Indication!");
+  expert_add_info(actx->pinfo, actx->created_item, &ei_lte_rrc_commercial_mobile_alert_sys);
 
   return offset;
 }
@@ -27180,12 +27188,12 @@ if(ue_cap_tvb){
     subtree2 = proto_item_add_subtree(item, ett_lte_rrc_UE_CapabilityRAT_Container);
     byte = tvb_get_guint8(ue_cap_tvb, 0);
     if (byte != 0x33) {
-      expert_add_info_format(actx->pinfo, item, PI_MALFORMED, PI_ERROR,
+      expert_add_info_format_text(actx->pinfo, item, &ei_lte_rrc_unexpected_type_value,
                              "Unexpected type value (found 0x%02X)", byte);
     }
     byte = tvb_get_guint8(ue_cap_tvb, 1);
     if (byte != 0x03) {
-      expert_add_info_format(actx->pinfo, item, PI_MALFORMED, PI_ERROR,
+      expert_add_info_format_text(actx->pinfo, item, &ei_lte_rrc_unexpected_length_value,
                              "Unexpected length value (found %d)", byte);
     }
     de_ms_cm_2(ue_cap_tvb, subtree2, actx->pinfo, 2, 3, NULL, 0);
@@ -33962,7 +33970,7 @@ static int dissect_UEAssistanceInformation_r11_PDU(tvbuff_t *tvb _U_, packet_inf
 
 
 /*--- End of included file: packet-lte-rrc-fn.c ---*/
-#line 1935 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 1943 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
 
 static void
 dissect_lte_rrc_DL_CCCH(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -42610,7 +42618,7 @@ void proto_register_lte_rrc(void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-lte-rrc-hfarr.c ---*/
-#line 2086 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 2094 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
 
     { &hf_lte_rrc_eutra_cap_feat_group_ind_1,
       { "Indicator 1", "lte-rrc.eutra_cap_feat_group_ind_1",
@@ -44118,7 +44126,7 @@ void proto_register_lte_rrc(void) {
     &ett_lte_rrc_CandidateCellInfo_r10,
 
 /*--- End of included file: packet-lte-rrc-ettarr.c ---*/
-#line 2509 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 2517 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
 
     &ett_lte_rrc_featureGroupIndicators,
     &ett_lte_rrc_featureGroupIndRel9Add,
@@ -44135,6 +44143,17 @@ void proto_register_lte_rrc(void) {
     &ett_lte_rrc_warningMessageSegment
   };
 
+  static ei_register_info ei[] = {
+     { &ei_lte_rrc_number_pages_le15, { "lte_rrc.number_pages_le15", PI_MALFORMED, PI_ERROR, "Number of pages should be <=15", EXPFILL }},
+     { &ei_lte_rrc_si_info_value_changed, { "lte_rrc.si_info_value_changed", PI_SEQUENCE, PI_WARN, "SI Info Value changed", EXPFILL }},
+     { &ei_lte_rrc_sibs_changing, { "lte_rrc.sibs_changing", PI_SEQUENCE, PI_WARN, "SIBs changing in next BCCH modification period - signalled in Paging message", EXPFILL }},
+     { &ei_lte_rrc_earthquake_warning_sys, { "lte_rrc.earthquake_warning_sys", PI_SEQUENCE, PI_WARN, "Earthquake and Tsunami Warning System Indication!", EXPFILL }},
+     { &ei_lte_rrc_commercial_mobile_alert_sys, { "lte_rrc.commercial_mobile_alert_sys", PI_SEQUENCE, PI_WARN, "Commercial Mobile Alert System Indication!", EXPFILL }},
+     { &ei_lte_rrc_unexpected_type_value, { "lte_rrc.unexpected_type_value", PI_MALFORMED, PI_ERROR, "Unexpected type value", EXPFILL }},
+     { &ei_lte_rrc_unexpected_length_value, { "lte_rrc.unexpected_length_value", PI_MALFORMED, PI_ERROR, "Unexpected type length", EXPFILL }},
+  };
+
+  expert_module_t* expert_lte_rrc;
 
   /* Register protocol */
   proto_lte_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -44152,6 +44171,8 @@ void proto_register_lte_rrc(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_lte_rrc, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_lte_rrc = expert_register_protocol(proto_lte_rrc);
+  expert_register_field_array(expert_lte_rrc, ei, array_length(ei));
 
   /* Register the dissectors defined in lte-rrc.conf */
 
@@ -44170,7 +44191,7 @@ void proto_register_lte_rrc(void) {
 
 
 /*--- End of included file: packet-lte-rrc-dis-reg.c ---*/
-#line 2545 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
+#line 2566 "../../asn1/lte-rrc/packet-lte-rrc-template.c"
 
   register_init_routine(&lte_rrc_init_protocol);
 }
index 78e24c6b485996a6aadd99db465fcfa96c215e80..97e12b6332347bb35e3428084ea0e3ed1daf3e49 100644 (file)
@@ -942,6 +942,9 @@ static gint ett_mms_FileAttributes = -1;
 /*--- End of included file: packet-mms-ett.c ---*/
 #line 51 "../../asn1/mms/packet-mms-template.c"
 
+static expert_field ei_mms_mal_timeofday_encoding = EI_INIT;
+static expert_field ei_mms_mal_utctime_encoding = EI_INIT;
+
 
 /*--- Included file: packet-mms-fn.c ---*/
 #line 1 "../../asn1/mms/packet-mms-fn.c"
@@ -1875,8 +1878,7 @@ dissect_mms_TimeOfDay(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _
        cause = proto_tree_add_text(tree, tvb, offset, len,
                        "BER Error: malformed TimeOfDay encoding, "
                        "length must be 4 or 6 bytes");
-       proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-       expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "BER Error: malformed TimeOfDay encoding");
+       expert_add_info(actx->pinfo, cause, &ei_mms_mal_timeofday_encoding);
        if(hf_index >= 0)
        {
                proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
@@ -1913,7 +1915,7 @@ dissect_mms_MMSString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _
 
 static int
 dissect_mms_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 105 "../../asn1/mms/mms.cnf"
+#line 104 "../../asn1/mms/mms.cnf"
 
        guint32 len;
        proto_item *cause;
@@ -1930,8 +1932,7 @@ dissect_mms_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_
                cause = proto_tree_add_text(tree, tvb, offset, len,
                                "BER Error: malformed IEC61850 UTCTime encoding, "
                                "length must be 8 bytes");
-               proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-               expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "BER Error: malformed IEC61850 UTCTime encoding");
+               expert_add_info(actx->pinfo, cause, &ei_mms_mal_utctime_encoding);
                if(hf_index >= 0)
                {
                        proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
@@ -7052,7 +7053,7 @@ dissect_mms_MMSpdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
 
 
 /*--- End of included file: packet-mms-fn.c ---*/
-#line 53 "../../asn1/mms/packet-mms-template.c"
+#line 56 "../../asn1/mms/packet-mms-template.c"
 
 /*
 * Dissect MMS PDUs inside a PPDU.
@@ -9760,7 +9761,7 @@ void proto_register_mms(void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-mms-hfarr.c ---*/
-#line 92 "../../asn1/mms/packet-mms-template.c"
+#line 95 "../../asn1/mms/packet-mms-template.c"
   };
 
   /* List of subtrees */
@@ -9979,16 +9980,24 @@ void proto_register_mms(void) {
     &ett_mms_FileAttributes,
 
 /*--- End of included file: packet-mms-ettarr.c ---*/
-#line 98 "../../asn1/mms/packet-mms-template.c"
+#line 101 "../../asn1/mms/packet-mms-template.c"
+  };
+
+  static ei_register_info ei[] = {
+     { &ei_mms_mal_timeofday_encoding, { "mms.malformed.timeofday_encoding", PI_MALFORMED, PI_WARN, "BER Error: malformed TimeOfDay encoding", EXPFILL }},
+     { &ei_mms_mal_utctime_encoding, { "mms.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed IEC61850 UTCTime encoding", EXPFILL }},
   };
 
+  expert_module_t* expert_mms;
+
   /* Register protocol */
   proto_mms = proto_register_protocol(PNAME, PSNAME, PFNAME);
   register_dissector("mms", dissect_mms, proto_mms);
   /* Register fields and subtrees */
   proto_register_field_array(proto_mms, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
-
+  expert_mms = expert_register_protocol(proto_mms);
+  expert_register_field_array(expert_mms, ei, array_length(ei));
 
 }
 
index 2ca7bfabf9bb18e8c7b9214efc0f0a68d3de6460..1d44247d25ba22ef8c58a6ce130b760f1175bb15 100644 (file)
@@ -6490,6 +6490,10 @@ static gint ett_nbap_Outcome = -1;
 /*--- End of included file: packet-nbap-ett.c ---*/
 #line 99 "../../asn1/nbap/packet-nbap-template.c"
 
+static expert_field ei_nbap_no_find_comm_context_id = EI_INIT;
+static expert_field ei_nbap_no_find_port_info = EI_INIT;
+static expert_field ei_nbap_no_set_comm_context_id = EI_INIT;
+static expert_field ei_nbap_hsdsch_entity_not_specified = EI_INIT;
 
 extern int proto_fp;
 
@@ -18501,13 +18505,13 @@ num_items = 1;
         if((cur_val=(nbap_com_context_id_t *)g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){
             com_context_id= cur_val->crnc_context;
         }else{
-            expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not find Communication Context-ID, unable to reconfigure this E-DCH flow.");
+            expert_add_info(actx->pinfo, NULL, &ei_nbap_no_find_comm_context_id);
         }
     }
 
     /*This should not happen*/
     if(( old_info = (nbap_edch_port_info_t *)g_tree_lookup(edch_flow_port_map, GINT_TO_POINTER((gint)com_context_id))) == NULL ){
-        expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not find port information for reconfigured E-DCH flow, unable to reconfigure");
+        expert_add_info(actx->pinfo, NULL, &ei_nbap_no_find_port_info);
         return offset;
     }
     nbap_debug1("    Found com_context_id %u", com_context_id);
@@ -18687,7 +18691,7 @@ BindingID_port = 0;
                     if((cur_val=(nbap_com_context_id_t *)g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){
                         umts_fp_conversation_info->com_context_id = cur_val->crnc_context;
                     }else{
-                        expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not set Communication Context-ID, fragments over reconfigured channels might fail");
+                        expert_add_info(actx->pinfo, NULL, &ei_nbap_no_set_comm_context_id);
                     }
                 }
 
@@ -28837,7 +28841,7 @@ BindingID_port = 0;
                     if((cur_val=(nbap_com_context_id_t *)g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){
                         umts_fp_conversation_info->com_context_id = cur_val->crnc_context;
                     }else{
-                        expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not set Communication Context-ID, fragments over reconfigured channels might fail");
+                        expert_add_info(actx->pinfo, NULL, &ei_nbap_no_set_comm_context_id);
                     }
                 }
 
@@ -55155,7 +55159,7 @@ static int dissect_NULL_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tre
 
 
 /*--- End of included file: packet-nbap-fn.c ---*/
-#line 317 "../../asn1/nbap/packet-nbap-template.c"
+#line 321 "../../asn1/nbap/packet-nbap-template.c"
 
 static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
 {
@@ -55234,7 +55238,7 @@ static void add_hsdsch_bind(packet_info *pinfo, proto_tree * tree){
                                        /*XXX: Is this craziness, what is physical_layer? */
                                        if(nbap_hsdsch_channel_info[i].entity == entity_not_specified ){
                                                /*Error*/
-                                               expert_add_info_format(pinfo, tree, PI_MALFORMED,PI_ERROR, "HSDSCH Entity not specified!");
+                                               expert_add_info(pinfo, NULL, &ei_nbap_hsdsch_entity_not_specified);
                                        }else{
                                                umts_fp_conversation_info->hsdsch_entity = (enum fp_hsdsch_entity)nbap_hsdsch_channel_info[i].entity;
                                        }
@@ -68489,7 +68493,7 @@ void proto_register_nbap(void)
         NULL, HFILL }},
 
 /*--- End of included file: packet-nbap-hfarr.c ---*/
-#line 486 "../../asn1/nbap/packet-nbap-template.c"
+#line 490 "../../asn1/nbap/packet-nbap-template.c"
        };
 
        /* List of subtrees */
@@ -70129,14 +70133,25 @@ void proto_register_nbap(void)
     &ett_nbap_Outcome,
 
 /*--- End of included file: packet-nbap-ettarr.c ---*/
-#line 495 "../../asn1/nbap/packet-nbap-template.c"
+#line 499 "../../asn1/nbap/packet-nbap-template.c"
        };
 
+       static ei_register_info ei[] = {
+               { &ei_nbap_no_set_comm_context_id, { "nbap.no_set_comm_context_id", PI_MALFORMED, PI_WARN, "Couldn't not set Communication Context-ID, fragments over reconfigured channels might fail", EXPFILL }},
+               { &ei_nbap_no_find_comm_context_id, { "nbap.no_find_comm_context_id", PI_MALFORMED, PI_WARN, "Couldn't not find Communication Context-ID, unable to reconfigure this E-DCH flow.", EXPFILL }},
+               { &ei_nbap_no_find_port_info, { "nbap.no_find_port_info", PI_MALFORMED, PI_WARN, "Couldn't not find port information for reconfigured E-DCH flow, unable to reconfigure", EXPFILL }},
+               { &ei_nbap_hsdsch_entity_not_specified, { "nbap.hsdsch_entity_not_specified", PI_MALFORMED,PI_ERROR, "HSDSCH Entity not specified!", EXPFILL }},
+       };
+
+       expert_module_t* expert_nbap;
+
        /* Register protocol */
        proto_nbap = proto_register_protocol(PNAME, PSNAME, PFNAME);
        /* Register fields and subtrees */
        proto_register_field_array(proto_nbap, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
+       expert_nbap = expert_register_protocol(proto_nbap);
+       expert_register_field_array(expert_nbap, ei, array_length(ei));
 
        /* Register dissector */
        register_dissector("nbap", dissect_nbap, proto_nbap);
@@ -71272,7 +71287,7 @@ proto_reg_handoff_nbap(void)
 
 
 /*--- End of included file: packet-nbap-dis-tab.c ---*/
-#line 541 "../../asn1/nbap/packet-nbap-template.c"
+#line 556 "../../asn1/nbap/packet-nbap-template.c"
 }
 
 
index e3bb442188ea8da27735930c43ee875c92a01ed8..bf55130bb8ce08e6c0035396569b9a29de6f1428 100644 (file)
@@ -854,6 +854,11 @@ static gint ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeSubmissionF
 /*--- End of included file: packet-p1-ett.c ---*/
 #line 92 "../../asn1/p1/packet-p1-template.c"
 
+static expert_field ei_p1_unknown_extension_attribute_type = EI_INIT;
+static expert_field ei_p1_unknown_standard_extension = EI_INIT;
+static expert_field ei_p1_unknown_built_in_content_type = EI_INIT;
+static expert_field ei_p1_unknown_tokendata_type = EI_INIT;
+
 /* Dissector tables */
 static dissector_table_t p1_extension_dissector_table;
 static dissector_table_t p1_extension_attribute_dissector_table;
@@ -903,7 +908,7 @@ static const value_string p3_err_code_string_vals[] = {
 
 
 /*--- End of included file: packet-p1-table.c ---*/
-#line 99 "../../asn1/p1/packet-p1-template.c"
+#line 104 "../../asn1/p1/packet-p1-template.c"
 
 
 /*--- Included file: packet-p1-fn.c ---*/
@@ -2221,7 +2226,7 @@ dissect_p1_T_extension_attribute_value(gboolean implicit_tag _U_, tvbuff_t *tvb
                        "Dissector for extension-attribute-type %d not implemented.  Contact Wireshark developers if you want this supported", extension_id);
                next_tree = proto_item_add_subtree(item, ett_p1_unknown_extension_attribute_type);
                offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
-               expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown extension-attribute-type");
+               expert_add_info(actx->pinfo, item, &ei_p1_unknown_extension_attribute_type);
        }
 
 
@@ -3041,7 +3046,7 @@ dissect_p1_ExtensionValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs
                                "Dissector for standard-extension %d not implemented.  Contact Wireshark developers if you want this supported", extension_id);
                        next_tree = proto_item_add_subtree(item, ett_p1_unknown_standard_extension);
                        offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
-                       expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown standard-extension");
+                       expert_add_info(actx->pinfo, item, &ei_p1_unknown_standard_extension);
                }
        } else if (object_identifier_id) {
                offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
@@ -3224,7 +3229,7 @@ dissect_p1_Content(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
       proto_tree *next_tree = NULL;
 
       item = proto_tree_add_text(top_tree ? top_tree : tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "P1 Unknown Content (unknown built-in content-type)");
-      expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown built-in content-type");
+      expert_add_info(actx->pinfo, item, &ei_p1_unknown_built_in_content_type);
       if (item) {
         next_tree=proto_item_add_subtree(item, ett_p1_content_unknown);
       }
@@ -7224,7 +7229,7 @@ dissect_p1_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
                        "Dissector for tokendata-type %d not implemented.  Contact Wireshark developers if you want this supported", extension_id);
                next_tree = proto_item_add_subtree(item, ett_p1_unknown_tokendata_type);
                offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
-               expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown tokendata-type");
+               expert_add_info(actx->pinfo, item, &ei_p1_unknown_tokendata_type);
        }
 
 
@@ -8207,7 +8212,7 @@ static void dissect_SecurityClassification_PDU(tvbuff_t *tvb _U_, packet_info *p
 
 
 /*--- End of included file: packet-p1-fn.c ---*/
-#line 101 "../../asn1/p1/packet-p1-template.c"
+#line 106 "../../asn1/p1/packet-p1-template.c"
 
 
 /*--- Included file: packet-p1-table11.c ---*/
@@ -8239,7 +8244,7 @@ static const ros_opr_t p3_opr_tab[] = {
 
 
 /*--- End of included file: packet-p1-table11.c ---*/
-#line 103 "../../asn1/p1/packet-p1-template.c"
+#line 108 "../../asn1/p1/packet-p1-template.c"
 
 /*--- Included file: packet-p1-table21.c ---*/
 #line 1 "../../asn1/p1/packet-p1-table21.c"
@@ -8284,7 +8289,7 @@ static const ros_err_t p3_err_tab[] = {
 
 
 /*--- End of included file: packet-p1-table21.c ---*/
-#line 104 "../../asn1/p1/packet-p1-template.c"
+#line 109 "../../asn1/p1/packet-p1-template.c"
 
 static const ros_info_t p3_ros_info = {
   "P3",
@@ -10697,7 +10702,7 @@ void proto_register_p1(void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-p1-hfarr.c ---*/
-#line 256 "../../asn1/p1/packet-p1-template.c"
+#line 261 "../../asn1/p1/packet-p1-template.c"
   };
 
   /* List of subtrees */
@@ -10896,9 +10901,17 @@ void proto_register_p1(void) {
     &ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeSubmissionFields,
 
 /*--- End of included file: packet-p1-ettarr.c ---*/
-#line 269 "../../asn1/p1/packet-p1-template.c"
+#line 274 "../../asn1/p1/packet-p1-template.c"
+  };
+
+  static ei_register_info ei[] = {
+     { &ei_p1_unknown_extension_attribute_type, { "p1.unknown.extension_attribute_type", PI_UNDECODED, PI_WARN, "Unknown extension-attribute-type", EXPFILL }},
+     { &ei_p1_unknown_standard_extension, { "p1.unknown.standard_extension", PI_UNDECODED, PI_WARN, "Unknown standard-extension", EXPFILL }},
+     { &ei_p1_unknown_built_in_content_type, { "p1.unknown.built_in_content_type", PI_UNDECODED, PI_WARN, "Unknown built-in content-type", EXPFILL }},
+     { &ei_p1_unknown_tokendata_type, { "p1.unknown.tokendata_type", PI_UNDECODED, PI_WARN, "Unknown tokendata-type", EXPFILL }},
   };
 
+  expert_module_t* expert_p1;
   module_t *p1_module;
 
   /* Register protocol */
@@ -10910,6 +10923,8 @@ void proto_register_p1(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_p1, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_p1 = expert_register_protocol(proto_p1);
+  expert_register_field_array(expert_p1, ei, array_length(ei));
 
   p1_extension_dissector_table = register_dissector_table("p1.extension", "P1-EXTENSION", FT_UINT32, BASE_DEC);
   p1_extension_attribute_dissector_table = register_dissector_table("p1.extension-attribute", "P1-EXTENSION-ATTRIBUTE", FT_UINT32, BASE_DEC);
@@ -11089,7 +11104,7 @@ void proto_reg_handoff_p1(void) {
 
 
 /*--- End of included file: packet-p1-dis-tab.c ---*/
-#line 305 "../../asn1/p1/packet-p1-template.c"
+#line 320 "../../asn1/p1/packet-p1-template.c"
 
   /* APPLICATION CONTEXT */
 
index ec1cbbb5da3edfd581546b58c1655e6ad576782c..75f6ce611b60016e542bcb6069a968127cdc4db5 100644 (file)
@@ -230,6 +230,8 @@ static gint ett_pres_UD_type = -1;
 /*--- End of included file: packet-pres-ett.c ---*/
 #line 100 "../../asn1/pres/packet-pres-template.c"
 
+static expert_field ei_pres_dissector_not_available = EI_INIT;
+
 UAT_DEC_CB_DEF(pres_users, ctx_id, pres_user_t)
 UAT_CSTRING_CB_DEF(pres_users, oid, pres_user_t)
 
@@ -643,7 +645,7 @@ dissect_pres_T_single_ASN1_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
                call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree);
        } else {
                proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
-               expert_add_info_format(actx->pinfo, ti, PI_UNDECODED, PI_WARN, "Dissector is not available");
+               expert_add_info(actx->pinfo, ti, &ei_pres_dissector_not_available);
        }
 
 
@@ -666,7 +668,7 @@ dissect_pres_T_octet_aligned(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
                call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree);
        } else {
                proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
-               expert_add_info_format(actx->pinfo, ti, PI_UNDECODED, PI_WARN, "Dissector is not available");
+               expert_add_info(actx->pinfo, ti, &ei_pres_dissector_not_available);
                  offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
                                        NULL);
 
@@ -1357,7 +1359,7 @@ static void dissect_UD_type_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto
 
 
 /*--- End of included file: packet-pres-fn.c ---*/
-#line 225 "../../asn1/pres/packet-pres-template.c"
+#line 227 "../../asn1/pres/packet-pres-template.c"
 
 
 /*
@@ -1841,7 +1843,7 @@ void proto_register_pres(void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-pres-hfarr.c ---*/
-#line 396 "../../asn1/pres/packet-pres-template.c"
+#line 398 "../../asn1/pres/packet-pres-template.c"
   };
 
   /* List of subtrees */
@@ -1888,7 +1890,11 @@ void proto_register_pres(void) {
     &ett_pres_UD_type,
 
 /*--- End of included file: packet-pres-ettarr.c ---*/
-#line 402 "../../asn1/pres/packet-pres-template.c"
+#line 404 "../../asn1/pres/packet-pres-template.c"
+  };
+
+  static ei_register_info ei[] = {
+     { &ei_pres_dissector_not_available, { "pres.dissector_not_available", PI_UNDECODED, PI_WARN, "Dissector is not available", EXPFILL }},
   };
 
   static uat_field_t users_flds[] = {
@@ -1911,7 +1917,8 @@ void proto_register_pres(void) {
                              NULL,
                              users_flds);
 
-  static module_t *pres_module;
+  expert_module_t* expert_pres;
+  module_t *pres_module;
 
   /* Register protocol */
   proto_pres = proto_register_protocol(PNAME, PSNAME, PFNAME);
@@ -1923,6 +1930,8 @@ void proto_register_pres(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_pres, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_pres = expert_register_protocol(proto_pres);
+  expert_register_field_array(expert_pres, ei, array_length(ei));
   register_init_routine(pres_init);
 
   pres_module = prefs_register_protocol(proto_pres, NULL);
index e18dcbc6c1729a675b3d4734b42b3ae951815c81..99552dc7b46143a81ff049cca2d77d5040ca1138 100644 (file)
@@ -133,6 +133,9 @@ static gint ett_ros_Code = -1;
 /*--- End of included file: packet-ros-ett.c ---*/
 #line 81 "../../asn1/ros/packet-ros-template.c"
 
+static expert_field ei_ros_dissector_oid_not_implemented = EI_INIT;
+static expert_field ei_ros_unknown_ros_pdu = EI_INIT;
+
 static dissector_table_t ros_oid_dissector_table=NULL;
 
 static GHashTable *oid_table=NULL;
@@ -271,7 +274,7 @@ call_ros_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *p
                proto_item *item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "ROS: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid);
                proto_tree *next_tree=proto_item_add_subtree(item, ett_ros_unknown);
 
-               expert_add_info_format (pinfo, item, PI_UNDECODED, PI_WARN,
+               expert_add_info_format_text(pinfo, item, &ei_ros_dissector_oid_not_implemented,
                                         "ROS: Dissector for OID %s not implemented", oid);
                dissect_unknown_ber(pinfo, next_tvb, offset, next_tree);
        }
@@ -1013,7 +1016,7 @@ dissect_ros_Code(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, a
 
 
 /*--- End of included file: packet-ros-fn.c ---*/
-#line 372 "../../asn1/ros/packet-ros-template.c"
+#line 375 "../../asn1/ros/packet-ros-template.c"
 
 /*
 * Dissect ROS PDUs inside a PPDU.
@@ -1079,7 +1082,7 @@ dissect_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
                        item = proto_tree_add_text(tree, tvb, offset, -1,"Unknown ROS PDU");
 
                        if(item){
-                               expert_add_info_format (pinfo, item, PI_UNDECODED, PI_WARN, "Unknown ROS PDU");
+                               expert_add_info(pinfo, item, &ei_ros_unknown_ros_pdu);
                                next_tree=proto_item_add_subtree(item, ett_ros_unknown);
                                dissect_unknown_ber(pinfo, tvb, offset, next_tree);
                        }
@@ -1244,7 +1247,7 @@ void proto_register_ros(void) {
         "OBJECT_IDENTIFIER", HFILL }},
 
 /*--- End of included file: packet-ros-hfarr.c ---*/
-#line 490 "../../asn1/ros/packet-ros-template.c"
+#line 493 "../../asn1/ros/packet-ros-template.c"
   };
 
   /* List of subtrees */
@@ -1265,15 +1268,24 @@ void proto_register_ros(void) {
     &ett_ros_Code,
 
 /*--- End of included file: packet-ros-ettarr.c ---*/
-#line 497 "../../asn1/ros/packet-ros-template.c"
+#line 500 "../../asn1/ros/packet-ros-template.c"
+  };
+
+  static ei_register_info ei[] = {
+     { &ei_ros_dissector_oid_not_implemented, { "ros.dissector_oid_not_implemented", PI_UNDECODED, PI_WARN, "ROS: Dissector for OID not implemented", EXPFILL }},
+     { &ei_ros_unknown_ros_pdu, { "ros.unknown_ros_pdu", PI_UNDECODED, PI_WARN, "Unknown ROS PDU", EXPFILL }},
   };
 
+  expert_module_t* expert_ros;
+
   /* Register protocol */
   proto_ros = proto_register_protocol(PNAME, PSNAME, PFNAME);
   register_dissector("ros", dissect_ros, proto_ros);
   /* Register fields and subtrees */
   proto_register_field_array(proto_ros, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_ros = expert_register_protocol(proto_ros);
+  expert_register_field_array(expert_ros, ei, array_length(ei));
 
   ros_oid_dissector_table = register_dissector_table("ros.oid", "ROS OID Dissectors", FT_STRING, BASE_NONE);
   oid_table=g_hash_table_new(g_str_hash, g_str_equal);
index 2402c8650a93013f8ad2412299d440fef4ddb48f..5b66503d7bab86fc06a8dd0eadd4163462c90aa6 100644 (file)
@@ -16054,6 +16054,8 @@ static gint ett_rrc_UL_RFC3095_Context = -1;
 static gint ett_rrc_eutraFeatureGroupIndicators = -1;
 static gint ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo = -1;
 
+static expert_field ei_rrc_no_hrnti = EI_INIT;
+
 /* Global variables */
 static proto_tree *top_tree;
 
@@ -41381,7 +41383,7 @@ dissect_rrc_DL_TransportChannelType_r5(tvbuff_t *tvb _U_, int offset _U_, asn1_c
         if(num_chans_per_flow[flowd] > 1 ){
             rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0);
             if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
-                expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI");
+                expert_add_info(actx->pinfo, actx->created_item, &ei_rrc_no_hrnti);
             }
             else{
                 /*If it doesnt exists, insert it*/
@@ -44856,7 +44858,7 @@ dissect_rrc_DL_TransportChannelType_r7(tvbuff_t *tvb _U_, int offset _U_, asn1_c
         if(num_chans_per_flow[flowd] > 1 ){
             rrcinf = (rrc_info *)p_get_proto_data(actx->pinfo->fd, proto_rrc, 0);
             if((rrcinf == NULL) || (rrcinf->hrnti[actx->pinfo->fd->subnum] == 0)){
-                expert_add_info_format(actx->pinfo, actx->created_item, PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI");
+                expert_add_info(actx->pinfo, actx->created_item, &ei_rrc_no_hrnti);
             }
             else{
                 /*If it doesnt exists, insert it*/
@@ -143309,7 +143311,7 @@ static int dissect_MeasurementReport_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _
 
 
 /*--- End of included file: packet-rrc-fn.c ---*/
-#line 185 "../../asn1/rrc/packet-rrc-template.c"
+#line 187 "../../asn1/rrc/packet-rrc-template.c"
 
 #include "packet-rrc.h"
 
@@ -181922,7 +181924,7 @@ void proto_register_rrc(void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-rrc-hfarr.c ---*/
-#line 265 "../../asn1/rrc/packet-rrc-template.c"
+#line 267 "../../asn1/rrc/packet-rrc-template.c"
     { &hf_test,
       { "RAB Test", "rrc.RAB.test",
         FT_UINT8, BASE_DEC, NULL, 0,
@@ -188069,17 +188071,24 @@ void proto_register_rrc(void) {
     &ett_rrc_UL_RFC3095_Context,
 
 /*--- End of included file: packet-rrc-ettarr.c ---*/
-#line 291 "../../asn1/rrc/packet-rrc-template.c"
+#line 293 "../../asn1/rrc/packet-rrc-template.c"
     &ett_rrc_eutraFeatureGroupIndicators,
     &ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo,
   };
 
+  static ei_register_info ei[] = {
+     { &ei_rrc_no_hrnti, { "rrc.no_hrnti", PI_SEQUENCE, PI_NOTE, "Did not detect any H-RNTI", EXPFILL }},
+  };
+
+  expert_module_t* expert_rrc;
 
   /* Register protocol */
   proto_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME);
   /* Register fields and subtrees */
   proto_register_field_array(proto_rrc, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_rrc = expert_register_protocol(proto_rrc);
+  expert_register_field_array(expert_rrc, ei, array_length(ei));
 
   register_dissector("rrc", dissect_rrc, proto_rrc);
 
@@ -188151,7 +188160,7 @@ void proto_register_rrc(void) {
 
 
 /*--- End of included file: packet-rrc-dis-reg.c ---*/
-#line 305 "../../asn1/rrc/packet-rrc-template.c"
+#line 314 "../../asn1/rrc/packet-rrc-template.c"
 
 
 
index b16dd08406cb9a6c4c05aa44d83a66e1aa460bfc..5c45daff92e230e949643ee8965a101549089287 100644 (file)
@@ -112,6 +112,8 @@ static gint ett_rtse_CallingSSuserReference = -1;
 /*--- End of included file: packet-rtse-ett.c ---*/
 #line 64 "../../asn1/rtse/packet-rtse-template.c"
 
+static expert_field ei_rtse_dissector_oid_not_implemented = EI_INIT;
+static expert_field ei_rtse_unknown_rtse_pdu = EI_INIT;
 
 static dissector_table_t rtse_oid_dissector_table=NULL;
 static GHashTable *oid_table=NULL;
@@ -199,7 +201,7 @@ call_rtse_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *
                proto_item *item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "RTSE: Dissector for OID:%s not implemented. Contact Wireshark developers if you want this supported", oid);
                proto_tree *next_tree=proto_item_add_subtree(item, ett_rtse_unknown);
 
-               expert_add_info_format (pinfo, item, PI_UNDECODED, PI_WARN,
+               expert_add_info_format_text(pinfo, item, &ei_rtse_dissector_oid_not_implemented,
                                         "RTSE: Dissector for OID %s not implemented", oid);
                dissect_unknown_ber(pinfo, next_tvb, offset, next_tree);
        }
@@ -731,7 +733,7 @@ dissect_rtse_RTSE_apdus(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
 
 
 /*--- End of included file: packet-rtse-fn.c ---*/
-#line 184 "../../asn1/rtse/packet-rtse-template.c"
+#line 186 "../../asn1/rtse/packet-rtse-template.c"
 
 /*
 * Dissect RTSE PDUs inside a PPDU.
@@ -839,12 +841,9 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
                        if(offset == old_offset){
                                item = proto_tree_add_text(tree, tvb, offset, -1, "Unknown RTSE PDU");
 
-                               if(item){
-                                       expert_add_info_format (pinfo, item, PI_UNDECODED, PI_WARN, "Unknown RTSE PDU");
-                                       next_tree=proto_item_add_subtree(item, ett_rtse_unknown);
-                                       dissect_unknown_ber(pinfo, tvb, offset, next_tree);
-                               }
-
+                               expert_add_info (pinfo, item, &ei_rtse_unknown_rtse_pdu);
+                               next_tree=proto_item_add_subtree(item, ett_rtse_unknown);
+                               dissect_unknown_ber(pinfo, tvb, offset, next_tree);
                                break;
                        }
                }
@@ -1003,7 +1002,7 @@ void proto_register_rtse(void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-rtse-hfarr.c ---*/
-#line 355 "../../asn1/rtse/packet-rtse-template.c"
+#line 354 "../../asn1/rtse/packet-rtse-template.c"
   };
 
   /* List of subtrees */
@@ -1025,9 +1024,15 @@ void proto_register_rtse(void) {
     &ett_rtse_CallingSSuserReference,
 
 /*--- End of included file: packet-rtse-ettarr.c ---*/
-#line 364 "../../asn1/rtse/packet-rtse-template.c"
+#line 363 "../../asn1/rtse/packet-rtse-template.c"
+  };
+
+  static ei_register_info ei[] = {
+     { &ei_rtse_dissector_oid_not_implemented, { "rtse.dissector_oid_not_implemented", PI_UNDECODED, PI_WARN, "RTSE: Dissector for OID not implemented", EXPFILL }},
+     { &ei_rtse_unknown_rtse_pdu, { "rtse.unknown_rtse_pdu", PI_UNDECODED, PI_WARN, "Unknown RTSE PDU", EXPFILL }},
   };
 
+  expert_module_t* expert_rtse;
   module_t *rtse_module;
 
   /* Register protocol */
@@ -1036,6 +1041,8 @@ void proto_register_rtse(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_rtse, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_rtse = expert_register_protocol(proto_rtse);
+  expert_register_field_array(expert_rtse, ei, array_length(ei));
   register_init_routine (&rtse_reassemble_init);
   rtse_module = prefs_register_protocol_subtree("OSI", proto_rtse, NULL);
 
index 231f88b06bebca7cc84d659ce24acc2fcab61c60..31a6aefe6e704b4f882faf8cce41dd687e1a2e68 100644 (file)
@@ -356,6 +356,34 @@ static gint ett_snmp_RReqPDU_U = -1;
 /*--- End of included file: packet-snmp-ett.c ---*/
 #line 256 "../../asn1/snmp/packet-snmp-template.c"
 
+static expert_field ei_snmp_failed_decrypted_data_pdu = EI_INIT;
+static expert_field ei_snmp_decrypted_data_bad_formatted = EI_INIT;
+static expert_field ei_snmp_verify_authentication_error = EI_INIT;
+static expert_field ei_snmp_authentication_ok = EI_INIT;
+static expert_field ei_snmp_authentication_error = EI_INIT;
+static expert_field ei_snmp_varbind_not_uni_class_seq = EI_INIT;
+static expert_field ei_snmp_varbind_has_indicator = EI_INIT;
+static expert_field ei_snmp_objectname_not_oid = EI_INIT;
+static expert_field ei_snmp_objectname_has_indicator = EI_INIT;
+static expert_field ei_snmp_value_not_primitive_encoding = EI_INIT;
+static expert_field ei_snmp_invalid_oid = EI_INIT;
+static expert_field ei_snmp_varbind_wrong_tag = EI_INIT;
+static expert_field ei_snmp_varbind_response = EI_INIT;
+static expert_field ei_snmp_no_instance_subid = EI_INIT;
+static expert_field ei_snmp_wrong_num_of_subids = EI_INIT;
+static expert_field ei_snmp_index_suboid_too_short = EI_INIT;
+static expert_field ei_snmp_unimplemented_instance_index = EI_INIT;
+static expert_field ei_snmp_index_suboid_len0 = EI_INIT;
+static expert_field ei_snmp_index_suboid_too_long = EI_INIT;
+static expert_field ei_snmp_index_string_too_long = EI_INIT;
+static expert_field ei_snmp_column_parent_not_row = EI_INIT;
+static expert_field ei_snmp_uint_too_large = EI_INIT;
+static expert_field ei_snmp_int_too_large = EI_INIT;
+static expert_field ei_snmp_integral_value0 = EI_INIT;
+static expert_field ei_snmp_missing_mib = EI_INIT;
+static expert_field ei_snmp_varbind_wrong_length_value = EI_INIT;
+static expert_field ei_snmp_varbind_wrong_class_tag = EI_INIT;
+
 static const true_false_string auth_flags = {
        "OK",
        "Failed"
@@ -532,14 +560,14 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
        if (!pc && ber_class==BER_CLASS_UNI && tag==BER_UNI_TAG_SEQUENCE) {
                proto_item* pi = proto_tree_add_text(tree, tvb, seq_offset, seq_len,"VarBind must be an universal class sequence");
                pt = proto_item_add_subtree(pi,ett_decoding_error);
-               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "VarBind is not an universal class sequence");
+               expert_add_info(actx->pinfo, pi, &ei_snmp_varbind_not_uni_class_seq);
                return dissect_unknown_ber(actx->pinfo, tvb, seq_offset, pt);
        }
 
        if (ind) {
                proto_item* pi = proto_tree_add_text(tree, tvb, seq_offset, seq_len,"Indicator must be clear in VarBind");
                pt = proto_item_add_subtree(pi,ett_decoding_error);
-               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "VarBind has indicator set");
+               expert_add_info(actx->pinfo, pi, &ei_snmp_varbind_has_indicator);
                return dissect_unknown_ber(actx->pinfo, tvb, seq_offset, pt);
        }
 
@@ -551,14 +579,14 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
        if (! ( !pc && ber_class==BER_CLASS_UNI && tag==BER_UNI_TAG_OID) ) {
                proto_item* pi = proto_tree_add_text(tree, tvb, seq_offset, seq_len,"ObjectName must be an OID in primitive encoding");
                pt = proto_item_add_subtree(pi,ett_decoding_error);
-               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "ObjectName not an OID");
+               expert_add_info(actx->pinfo, pi, &ei_snmp_objectname_not_oid);
                return dissect_unknown_ber(actx->pinfo, tvb, seq_offset, pt);
        }
 
        if (ind) {
                proto_item* pi = proto_tree_add_text(tree, tvb, seq_offset, seq_len,"Indicator must be clear in ObjectName");
                pt = proto_item_add_subtree(pi,ett_decoding_error);
-               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "ObjectName has indicator set");
+               expert_add_info(actx->pinfo, pi, &ei_snmp_objectname_has_indicator);
                return dissect_unknown_ber(actx->pinfo, tvb, seq_offset, pt);
        }
 
@@ -572,7 +600,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
        if (! (!pc) ) {
                proto_item* pi = proto_tree_add_text(tree, tvb, seq_offset, seq_len,"the value must be in primitive encoding");
                pt = proto_item_add_subtree(pi,ett_decoding_error);
-               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "value not in primitive encoding");
+               expert_add_info(actx->pinfo, pi, &ei_snmp_value_not_primitive_encoding);
                return dissect_unknown_ber(actx->pinfo, tvb, seq_offset, pt);
        }
 
@@ -600,7 +628,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
                repr = oid_encoded2string(oid_bytes, name_len);
                pi = proto_tree_add_text(pt_name,tvb, 0, 0, "invalid oid: %s", repr);
                pt = proto_item_add_subtree(pi, ett_decoding_error);
-               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "invalid oid: %s", repr);
+               expert_add_info_format_text(actx->pinfo, pi, &ei_snmp_invalid_oid, "invalid oid: %s", repr);
                return dissect_unknown_ber(actx->pinfo, tvb, name_offset, pt);
        }
 
@@ -634,13 +662,13 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
                        default: {
                                pi = proto_tree_add_text(pt_varbind,tvb,0,0,"Wrong tag for Error Value: expected 0, 1, or 2 but got: %d",tag);
                                pt = proto_item_add_subtree(pi,ett_decoding_error);
-                               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "Wrong tag for SNMP VarBind error value");
+                               expert_add_info(actx->pinfo, pi, &ei_snmp_varbind_wrong_tag);
                                return dissect_unknown_ber(actx->pinfo, tvb, value_start, pt);
                        }
                }
 
                pi = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
-               expert_add_info_format(actx->pinfo, pi, PI_RESPONSE_CODE, PI_NOTE, "%s",note);
+               expert_add_info_format_text(actx->pinfo, pi, &ei_snmp_varbind_response, "%s",note);
                g_strlcpy (label, note, ITEM_LABEL_LENGTH);
                goto set_label;
        }
@@ -660,13 +688,13 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
                                        goto set_label;
                                } else {
                                        proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"A scalar should have one instance sub-id this one has none");
-                                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "No instance sub-id in scalar value");
+                                       expert_add_info(actx->pinfo, pi, &ei_snmp_no_instance_subid);
                                        oid_info_is_ok = FALSE;
                                        goto indexing_done;
                                }
                        } else {
                                proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"A scalar should have only one instance sub-id this has: %d",oid_left);
-                               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "Wrong number of instance sub-ids in scalar value");
+                               expert_add_info(actx->pinfo, pi, &ei_snmp_wrong_num_of_subids);
                                oid_info_is_ok = FALSE;
                                goto indexing_done;
                        }
@@ -690,7 +718,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
 
                                                if (key_start >= oid_matched+oid_left) {
                                                        proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"index sub-oid shorter than expected");
-                                                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "index sub-oid shorter than expected");
+                                                       expert_add_info(actx->pinfo, pi, &ei_snmp_index_suboid_too_short);
                                                        oid_info_is_ok = FALSE;
                                                        goto indexing_done;
                                                }
@@ -698,7 +726,7 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,
                                                switch(k->key_type) {
                                                        case OID_KEY_TYPE_WRONG: {
                                                                proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"OID instaces not handled, if you want this implemented please contact the wireshark developers");
-                                                               expert_add_info_format(actx->pinfo, pi, PI_UNDECODED, PI_WARN, "Unimplemented instance index");
+                                                               expert_add_info(actx->pinfo, pi, &ei_snmp_unimplemented_instance_index);
                                                                oid_info_is_ok = FALSE;
                                                                goto indexing_done;
                                                        }
@@ -730,14 +758,14 @@ show_oid_index:
 
                                                                if( suboid_len == 0 ) {
                                                                        proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"an index sub-oid OID cannot be 0 bytes long!");
-                                                                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "index sub-oid OID with len=0");
+                                                                       expert_add_info(actx->pinfo, pi, &ei_snmp_index_suboid_len0);
                                                                        oid_info_is_ok = FALSE;
                                                                        goto indexing_done;
                                                                }
 
                                                                if( key_len < suboid_len ) {
                                                                        proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"index sub-oid should not be longer than remaining oid size");
-                                                                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "index sub-oid longer than remaining oid size");
+                                                                       expert_add_info(actx->pinfo, pi, &ei_snmp_index_suboid_too_long);
                                                                        oid_info_is_ok = FALSE;
                                                                        goto indexing_done;
                                                                }
@@ -784,7 +812,7 @@ show_oid_index:
 
                                                                if( key_len < buf_len ) {
                                                                        proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"index string should not be longer than remaining oid size");
-                                                                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "index string longer than remaining oid size");
+                                                                       expert_add_info(actx->pinfo, pi, &ei_snmp_index_string_too_long);
                                                                        oid_info_is_ok = FALSE;
                                                                        goto indexing_done;
                                                                }
@@ -826,13 +854,13 @@ show_oid_index:
                                        goto indexing_done;
                                } else {
                                        proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"We do not know how to handle this OID, if you want this implemented please contact the wireshark developers");
-                                       expert_add_info_format(actx->pinfo, pi, PI_UNDECODED, PI_WARN, "Unimplemented instance index");
+                                       expert_add_info(actx->pinfo, pi, &ei_snmp_unimplemented_instance_index);
                                        oid_info_is_ok = FALSE;
                                        goto indexing_done;
                                }
                        } else {
                                proto_item* pi = proto_tree_add_text(pt_name,tvb,0,0,"The COLUMS's parent is not a ROW. This is a BUG! please contact the wireshark developers.");
-                               expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_ERROR, "COLUMS's parent is not a ROW");
+                               expert_add_info(actx->pinfo, pi, &ei_snmp_column_parent_not_row);
                                oid_info_is_ok = FALSE;
                                goto indexing_done;
                        }
@@ -956,7 +984,7 @@ indexing_done:
                                if (value_len > 9 || tvb_get_guint8(tvb, value_offset) != 0) {
                                        /* It is.  Fail. */
                                        pi_value = proto_tree_add_text(pt_varbind,tvb,value_offset,value_len,"Integral value too large");
-                                       expert_add_info_format(actx->pinfo, pi_value, PI_UNDECODED, PI_NOTE, "Unsigned integer value > 2^64 - 1");
+                                       expert_add_info(actx->pinfo, pi_value, &ei_snmp_uint_too_large);
                                        goto already_added;
                                }
                                /* Cheat and skip the leading 0 byte */
@@ -967,7 +995,7 @@ indexing_done:
                                 * For now, just reject these.
                                 */
                                pi_value = proto_tree_add_text(pt_varbind,tvb,value_offset,value_len,"Integral value too large or too small");
-                               expert_add_info_format(actx->pinfo, pi_value, PI_UNDECODED, PI_NOTE, "Signed integer value > 2^63 - 1 or <= -2^63");
+                               expert_add_info(actx->pinfo, pi_value, &ei_snmp_int_too_large);
                                goto already_added;
                        }
                } else if (value_len == 0) {
@@ -982,13 +1010,13 @@ indexing_done:
                        header_field_info *hfinfo = proto_registrar_get_nth(hfid);
                        if (hfinfo->type == FT_UINT64 || hfinfo->type == FT_INT64) {
                                pi_value = proto_tree_add_text(pt_varbind,tvb,value_offset,value_len,"Integral value is zero-length");
-                               expert_add_info_format(actx->pinfo, pi_value, PI_UNDECODED, PI_NOTE, "Integral value is zero-length");
+                               expert_add_info(actx->pinfo, pi_value, &ei_snmp_integral_value0);
                                goto already_added;
                        }
                }
                pi_value = proto_tree_add_item(pt_varbind,hfid,tvb,value_offset,value_len,ENC_BIG_ENDIAN);
                if (format_error != BER_NO_ERROR) {
-                       expert_add_info_format(actx->pinfo, pi_value, PI_UNDECODED, PI_NOTE, "Unresolved value, Missing MIB");
+                       expert_add_info(actx->pinfo, pi_value, &ei_snmp_missing_mib);
                }
 
 already_added:
@@ -1041,7 +1069,7 @@ set_label:
                        proto_item* pi = proto_tree_add_text(p_tree,tvb,0,0,"Wrong value length: %u  expecting: %u <= len <= %u",
                                                             value_len, min_len, max_len == -1 ? 0xFFFFFF : max_len);
                        pt = proto_item_add_subtree(pi,ett_decoding_error);
-                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "Wrong length for SNMP VarBind/value");
+                       expert_add_info(actx->pinfo, pi, &ei_snmp_varbind_wrong_length_value);
                        return dissect_unknown_ber(actx->pinfo, tvb, value_start, pt);
                }
                case BER_WRONG_TAG: {
@@ -1050,7 +1078,7 @@ set_label:
                                                             oid_info->value_type->ber_class, oid_info->value_type->ber_tag,
                                                             ber_class, tag);
                        pt = proto_item_add_subtree(pi,ett_decoding_error);
-                       expert_add_info_format(actx->pinfo, pi, PI_MALFORMED, PI_WARN, "Wrong class/tag for SNMP VarBind/value");
+                       expert_add_info(actx->pinfo, pi, &ei_snmp_varbind_wrong_class_tag);
                        return dissect_unknown_ber(actx->pinfo, tvb, value_start, pt);
                }
                default:
@@ -2352,7 +2380,7 @@ dissect_snmp_INTEGER_484_2147483647(gboolean implicit_tag _U_, tvbuff_t *tvb _U_
 
 static int
 dissect_snmp_T_msgFlags(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 227 "../../asn1/snmp/snmp.cnf"
+#line 223 "../../asn1/snmp/snmp.cnf"
        tvbuff_t *parameter_tvb = NULL;
 
    offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
@@ -2407,7 +2435,7 @@ dissect_snmp_HeaderData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
 
 static int
 dissect_snmp_T_msgSecurityParameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
-#line 170 "../../asn1/snmp/snmp.cnf"
+#line 169 "../../asn1/snmp/snmp.cnf"
 
        switch(MsgSecurityModel){
                case SNMP_SEC_USM:      /* 3 */         
@@ -2465,7 +2493,7 @@ dissect_snmp_T_encryptedPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
                        proto_item* cause = proto_tree_add_text(encryptedpdu_tree, crypt_tvb, 0, -1,
                                "Failed to decrypt encryptedPDU: %s", error);
                        
-                       expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN,
+                       expert_add_info_format_text(actx->pinfo, cause, &ei_snmp_failed_decrypted_data_pdu,
                                "Failed to decrypt encryptedPDU: %s", error);
 
                        col_set_str(actx->pinfo->cinfo, COL_INFO, "encryptedPDU: Failed to decrypt");
@@ -2479,8 +2507,7 @@ dissect_snmp_T_encryptedPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
                                proto_item* cause = proto_tree_add_text(encryptedpdu_tree, cleartext_tvb, 0, -1,
                                                                                        "Decrypted data not formatted as expected, wrong key?");
                                
-                               expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN,
-                                                                          "Decrypted data not formatted as expected");
+                               expert_add_info(actx->pinfo, cause, &ei_snmp_decrypted_data_bad_formatted);
 
                                col_set_str(actx->pinfo->cinfo, COL_INFO, "encryptedPDU: Decrypted data not formatted as expected");
                                
@@ -2539,7 +2566,7 @@ dissect_snmp_SNMPv3Message(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
                                    SNMPv3Message_sequence, hf_index, ett_snmp_SNMPv3Message);
 
-#line 185 "../../asn1/snmp/snmp.cnf"
+#line 184 "../../asn1/snmp/snmp.cnf"
 
        if( usm_p.authenticated
                && usm_p.user_assoc
@@ -2555,25 +2582,22 @@ dissect_snmp_SNMPv3Message(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
                if (error) {
                        authen_item = proto_tree_add_text(authen_tree,tvb,0,0,"Error while verifying Message authenticity: %s", error);
                        PROTO_ITEM_SET_GENERATED(authen_item);
-                       expert_add_info_format( actx->pinfo, authen_item, PI_MALFORMED, PI_ERROR, "Error while verifying Message authenticity: %s", error );
+                       expert_add_info_format_text( actx->pinfo, authen_item, &ei_snmp_verify_authentication_error, "Error while verifying Message authenticity: %s", error );
                } else {
-                       int severity;
-                       const gchar* msg;                       
+                       expert_field* expert;
 
                        authen_item = proto_tree_add_boolean(authen_tree, hf_snmp_msgAuthentication, tvb, 0, 0, usm_p.authOK);
                        PROTO_ITEM_SET_GENERATED(authen_item);
                        
                        if (usm_p.authOK) {
-                               msg = "SNMP Authentication OK";
-                               severity = PI_CHAT;
+                               expert = &ei_snmp_authentication_ok;
                        } else {
                                const gchar* calc_auth_str = bytestring_to_str(calc_auth,calc_auth_len,' ');
                                proto_item_append_text(authen_item, " calculated = %s", calc_auth_str);
-                               msg = "SNMP Authentication Error";
-                               severity = PI_WARN;
+                               expert = &ei_snmp_authentication_error;
                        }
 
-                       expert_add_info_format( actx->pinfo, authen_item, PI_CHECKSUM, severity, "%s", msg );
+                       expert_add_info( actx->pinfo, authen_item, expert);
                }
        }
 
@@ -2856,7 +2880,7 @@ static void dissect_SMUX_PDUs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pro
 
 
 /*--- End of included file: packet-snmp-fn.c ---*/
-#line 1636 "../../asn1/snmp/packet-snmp-template.c"
+#line 1664 "../../asn1/snmp/packet-snmp-template.c"
 
 
 guint
@@ -3779,7 +3803,7 @@ void proto_register_snmp(void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-snmp-hfarr.c ---*/
-#line 2294 "../../asn1/snmp/packet-snmp-template.c"
+#line 2322 "../../asn1/snmp/packet-snmp-template.c"
   };
 
   /* List of subtrees */
@@ -3819,8 +3843,40 @@ void proto_register_snmp(void) {
     &ett_snmp_RReqPDU_U,
 
 /*--- End of included file: packet-snmp-ettarr.c ---*/
-#line 2310 "../../asn1/snmp/packet-snmp-template.c"
+#line 2338 "../../asn1/snmp/packet-snmp-template.c"
+  };
+  static ei_register_info ei[] = {
+     { &ei_snmp_failed_decrypted_data_pdu, { "snmp.failed_decrypted_data_pdu", PI_MALFORMED, PI_WARN, "Failed to decrypt encryptedPDU", EXPFILL }},
+     { &ei_snmp_decrypted_data_bad_formatted, { "snmp.decrypted_data_bad_formatted", PI_MALFORMED, PI_WARN, "Decrypted data not formatted as expected", EXPFILL }},
+     { &ei_snmp_verify_authentication_error, { "snmp.verify_authentication_error", PI_MALFORMED, PI_ERROR, "Error while verifying Message authenticity", EXPFILL }},
+     { &ei_snmp_authentication_ok, { "snmp.authentication_ok", PI_CHECKSUM, PI_CHAT, "SNMP Authentication OK", EXPFILL }},
+     { &ei_snmp_authentication_error, { "snmp.authentication_error", PI_CHECKSUM, PI_WARN, "SNMP Authentication Error", EXPFILL }},
+     { &ei_snmp_varbind_not_uni_class_seq, { "snmp.varbind.not_uni_class_seq", PI_MALFORMED, PI_WARN, "VarBind is not an universal class sequence", EXPFILL }},
+     { &ei_snmp_varbind_has_indicator, { "snmp.varbind.has_indicator", PI_MALFORMED, PI_WARN, "VarBind has indicator set", EXPFILL }},
+     { &ei_snmp_objectname_not_oid, { "snmp.objectname_not_oid", PI_MALFORMED, PI_WARN, "ObjectName not an OID", EXPFILL }},
+     { &ei_snmp_objectname_has_indicator, { "snmp.objectname_has_indicator", PI_MALFORMED, PI_WARN, "ObjectName has indicator set", EXPFILL }},
+     { &ei_snmp_value_not_primitive_encoding, { "snmp.value_not_primitive_encoding", PI_MALFORMED, PI_WARN, "value not in primitive encoding", EXPFILL }},
+     { &ei_snmp_invalid_oid, { "snmp.invalid_oid", PI_MALFORMED, PI_WARN, "invalid oid", EXPFILL }},
+     { &ei_snmp_varbind_wrong_tag, { "snmp.varbind.wrong_tag", PI_MALFORMED, PI_WARN, "Wrong tag for SNMP VarBind error value", EXPFILL }},
+     { &ei_snmp_varbind_response, { "snmp.varbind.response", PI_RESPONSE_CODE, PI_NOTE, "Response", EXPFILL }},
+     { &ei_snmp_no_instance_subid, { "snmp.no_instance_subid", PI_MALFORMED, PI_WARN, "No instance sub-id in scalar value", EXPFILL }},
+     { &ei_snmp_wrong_num_of_subids, { "snmp.wrong_num_of_subids", PI_MALFORMED, PI_WARN, "Wrong number of instance sub-ids in scalar value", EXPFILL }},
+     { &ei_snmp_index_suboid_too_short, { "snmp.index_suboid_too_short", PI_MALFORMED, PI_WARN, "index sub-oid shorter than expected", EXPFILL }},
+     { &ei_snmp_unimplemented_instance_index, { "snmp.unimplemented_instance_index", PI_UNDECODED, PI_WARN, "Unimplemented instance index", EXPFILL }},
+     { &ei_snmp_index_suboid_len0, { "snmp.ndex_suboid_len0", PI_MALFORMED, PI_WARN, "index sub-oid OID with len=0", EXPFILL }},
+     { &ei_snmp_index_suboid_too_long, { "snmp.index_suboid_too_long", PI_MALFORMED, PI_WARN, "index sub-oid longer than remaining oid size", EXPFILL }},
+     { &ei_snmp_index_string_too_long, { "snmp.index_string_too_long", PI_MALFORMED, PI_WARN, "index string longer than remaining oid size", EXPFILL }},
+     { &ei_snmp_column_parent_not_row, { "snmp.column_parent_not_row", PI_MALFORMED, PI_ERROR, "COLUMS's parent is not a ROW", EXPFILL }},
+     { &ei_snmp_uint_too_large, { "snmp.uint_too_large", PI_UNDECODED, PI_NOTE, "Unsigned integer value > 2^64 - 1", EXPFILL }},
+     { &ei_snmp_int_too_large, { "snmp.int_too_large", PI_UNDECODED, PI_NOTE, "Signed integer value > 2^63 - 1 or <= -2^63", EXPFILL }},
+     { &ei_snmp_integral_value0, { "snmp.integral_value0", PI_UNDECODED, PI_NOTE, "Integral value is zero-length", EXPFILL }},
+     { &ei_snmp_missing_mib, { "snmp.missing_mib", PI_UNDECODED, PI_NOTE, "Unresolved value, Missing MIB", EXPFILL }},
+     { &ei_snmp_varbind_wrong_length_value, { "snmp.varbind.wrong_length_value", PI_MALFORMED, PI_WARN, "Wrong length for SNMP VarBind/value", EXPFILL }},
+     { &ei_snmp_varbind_wrong_class_tag, { "snmp.varbind.wrong_class_tag", PI_MALFORMED, PI_WARN, "Wrong class/tag for SNMP VarBind/value", EXPFILL }},
+
   };
+
+  expert_module_t* expert_snmp;
   module_t *snmp_module;
 
   static uat_field_t users_fields[] = {
@@ -3875,6 +3931,8 @@ void proto_register_snmp(void) {
   /* Register fields and subtrees */
   proto_register_field_array(proto_snmp, hf, array_length(hf));
   proto_register_subtree_array(ett, array_length(ett));
+  expert_snmp = expert_register_protocol(proto_snmp);
+  expert_register_field_array(expert_snmp, ei, array_length(ei));
 
 
   /* Register configuration preferences */
index a10f73cb03276f0a48a4da7b0f92fcf27d06a050..d25e4d00b9c246999bc07a0a9654c4700d09e5d3 100644 (file)
@@ -145,6 +145,8 @@ static gint ett_sv_ASDU = -1;
 /*--- End of included file: packet-sv-ett.c ---*/
 #line 112 "../../asn1/sv/packet-sv-template.c"
 
+static expert_field ei_sv_mal_utctime = EI_INIT;
+
 #if 0
 static const value_string sv_q_validity_vals[] = {
   {   0, "good" },
@@ -294,7 +296,7 @@ dissect_sv_UtcTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_,
                                "BER Error: malformed UTCTime encoding, "
                                "length must be 8 bytes");
                proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
-               expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "BER Error: malformed UTCTime encoding");
+               expert_add_info(actx->pinfo, cause, &ei_sv_mal_utctime);
                if(hf_index >= 0)
                {
                        proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
@@ -448,7 +450,7 @@ dissect_sv_SampledValues(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse
 
 
 /*--- End of included file: packet-sv-fn.c ---*/
-#line 193 "../../asn1/sv/packet-sv-template.c"
+#line 195 "../../asn1/sv/packet-sv-template.c"
 
 /*
 * Dissect SV PDUs inside a PPDU.
@@ -622,7 +624,7 @@ void proto_register_sv(void) {
         NULL, HFILL }},
 
 /*--- End of included file: packet-sv-hfarr.c ---*/
-#line 310 "../../asn1/sv/packet-sv-template.c"
+#line 312 "../../asn1/sv/packet-sv-template.c"
        };
 
        /* List of subtrees */
@@ -639,9 +641,15 @@ void proto_register_sv(void) {
     &ett_sv_ASDU,
 
 /*--- End of included file: packet-sv-ettarr.c ---*/
-#line 318 "../../asn1/sv/packet-sv-template.c"
+#line 320 "../../asn1/sv/packet-sv-template.c"
+       };
+
+       static ei_register_info ei[] = {
+               { &ei_sv_mal_utctime, { "sv.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed UTCTime encoding", EXPFILL }},
        };
 
+       expert_module_t* expert_sv;
+
        /* Register protocol */
        proto_sv = proto_register_protocol(PNAME, PSNAME, PFNAME);
        register_dissector("sv", dissect_sv, proto_sv);
@@ -649,6 +657,8 @@ void proto_register_sv(void) {
        /* Register fields and subtrees */
        proto_register_field_array(proto_sv, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));
+       expert_sv = expert_register_protocol(proto_sv);
+       expert_register_field_array(expert_sv, ei, array_length(ei));
 
        /* Register tap */
        sv_tap = register_tap("sv");