diff options
author | Michael Mann <mmann78@netscape.net> | 2013-08-23 03:17:34 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-08-23 03:17:34 +0000 |
commit | 6880359a5f42c208f7ba2fe7af9703214c9cd1e9 (patch) | |
tree | d4cda8619bfcdc6ec930e5b28b7584588bfa4d72 /epan/dissectors/packet-sml.c | |
parent | 186babc6ba30e635d29f235d95e388dbe434fa26 (diff) |
Batch of filterable expert infos.
svn path=/trunk/; revision=51486
Diffstat (limited to 'epan/dissectors/packet-sml.c')
-rw-r--r-- | epan/dissectors/packet-sml.c | 117 |
1 files changed, 73 insertions, 44 deletions
diff --git a/epan/dissectors/packet-sml.c b/epan/dissectors/packet-sml.c index fbfd87af97..3322aa7409 100644 --- a/epan/dissectors/packet-sml.c +++ b/epan/dissectors/packet-sml.c @@ -343,6 +343,18 @@ static gint ett_sml_tree_Entry = -1; static gint ett_sml_dasDetails = -1; static gint ett_sml_attentionDetails = -1; +static expert_field ei_sml_messagetype_unknown = EI_INIT; +static expert_field ei_sml_procParValue_errror = EI_INIT; +static expert_field ei_sml_procParValue_invalid = EI_INIT; +static expert_field ei_sml_segment_needed = EI_INIT; +static expert_field ei_sml_endOfSmlMsg = EI_INIT; +static expert_field ei_sml_crc_error = EI_INIT; +static expert_field ei_sml_tupel_error = EI_INIT; +static expert_field ei_sml_crc_error_length = EI_INIT; +static expert_field ei_sml_invalid_count = EI_INIT; +static expert_field ei_sml_MessageBody = EI_INIT; +static expert_field ei_sml_esc_error = EI_INIT; + /*options*/ static gboolean sml_reassemble = TRUE; static gboolean sml_crc_enabled = FALSE; @@ -1126,7 +1138,7 @@ static void child_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *insert_tre TupelEntryTree(tvb, procParValue_tree, offset); } else { - expert_add_info_format(pinfo, NULL, PI_PROTOCOL, PI_ERROR, "error in Tupel"); + expert_add_info(pinfo, NULL, &ei_sml_tupel_error); return; } break; @@ -1151,13 +1163,13 @@ static void child_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *insert_tre break; default: - expert_add_info_format(pinfo, procParValue, PI_PROTOCOL, PI_WARN, "invalid procParValue"); + expert_add_info(pinfo, procParValue, &ei_sml_procParValue_invalid); break; } proto_item_set_end(procParValue, tvb, *offset); } else { - expert_add_info_format(pinfo, NULL, PI_PROTOCOL, PI_ERROR, "error in procParValue"); + expert_add_info(pinfo, NULL, &ei_sml_procParValue_errror); return; } @@ -1190,7 +1202,7 @@ static void child_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *insert_tre child = proto_tree_add_text(insert_tree, tvb, *offset, -1, "Child List with %d %s", *length + *data, plurality(*length + *data, "element", "elements")); child_list = proto_item_add_subtree(child, ett_sml_child); if (repeat <= 0){ - expert_add_info_format(pinfo, child, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, child, &ei_sml_invalid_count, "invalid loop count"); return; } *offset+=*length; @@ -1200,7 +1212,7 @@ static void child_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *insert_tre tree_Entry_list = proto_item_add_subtree(tree_Entry, ett_sml_tree_Entry); if (tvb_get_guint8(tvb, *offset) != 0x73){ - expert_add_info_format(pinfo, tree_Entry, PI_PROTOCOL, PI_ERROR, "invalid count of elements in tree_Entry"); + expert_add_info_format_text(pinfo, tree_Entry, &ei_sml_invalid_count, "invalid count of elements in tree_Entry"); return; } *offset+=1; @@ -1212,7 +1224,7 @@ static void child_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *insert_tre } } else { - expert_add_info_format(pinfo, NULL, PI_PROTOCOL, PI_ERROR, "invalid count of elements in child List"); + expert_add_info_format_text(pinfo, NULL, &ei_sml_invalid_count, "invalid count of elements in child List"); } } @@ -1399,11 +1411,11 @@ static gboolean decode_GetProfile_List_Pack_Req (tvbuff_t *tvb, packet_info *pin treepath_list = proto_item_add_subtree(treepath, ett_sml_treepath); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid count of elements in Treepath"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in Treepath"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } *offset+=length; @@ -1425,11 +1437,11 @@ static gboolean decode_GetProfile_List_Pack_Req (tvbuff_t *tvb, packet_info *pin object_list_list = proto_item_add_subtree(object_list, ett_sml_object_list); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, object_list, PI_PROTOCOL, PI_ERROR, "invalid count of elements in object_List"); + expert_add_info_format_text(pinfo, object_list, &ei_sml_invalid_count, "invalid count of elements in object_List"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1458,7 +1470,7 @@ static gboolean decode_GetProfile_List_Pack_Req (tvbuff_t *tvb, packet_info *pin proto_item_set_end(dasDetails, tvb, *offset); } else { - expert_add_info_format(pinfo, NULL, PI_PROTOCOL, PI_ERROR, "invalid count of elements in dasDetails"); + expert_add_info_format_text(pinfo, NULL, &ei_sml_invalid_count, "invalid count of elements in dasDetails"); return TRUE; } return FALSE; @@ -1514,11 +1526,11 @@ static gboolean decode_GetProfilePackRes(tvbuff_t *tvb, packet_info *pinfo, prot treepath_list = proto_item_add_subtree(treepath, ett_sml_treepath); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid count of elements in Treepath"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in Treepath"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1536,11 +1548,11 @@ static gboolean decode_GetProfilePackRes(tvbuff_t *tvb, packet_info *pinfo, prot headerList_subtree = proto_item_add_subtree(headerList, ett_sml_headerList); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, headerList, PI_PROTOCOL, PI_ERROR, "invalid count of elements in headerlist"); + expert_add_info_format_text(pinfo, headerList, &ei_sml_invalid_count, "invalid count of elements in headerlist"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format(pinfo, headerList, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, headerList, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1572,11 +1584,11 @@ static gboolean decode_GetProfilePackRes(tvbuff_t *tvb, packet_info *pinfo, prot periodList_list = proto_item_add_subtree(periodList, ett_sml_periodList); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, periodList, PI_PROTOCOL, PI_ERROR, "invalid count of elements in periodList"); + expert_add_info_format_text(pinfo, periodList, &ei_sml_invalid_count, "invalid count of elements in periodList"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format(pinfo, periodList, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, periodList, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1607,11 +1619,11 @@ static gboolean decode_GetProfilePackRes(tvbuff_t *tvb, packet_info *pinfo, prot valuelist_list = proto_item_add_subtree(valuelist, ett_sml_valuelist); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, valuelist, PI_PROTOCOL, PI_ERROR, "invalid count of elements in valueList"); + expert_add_info_format_text(pinfo, valuelist, &ei_sml_invalid_count, "invalid count of elements in valueList"); return TRUE; } else if (repeat2 <= 0){ - expert_add_info_format(pinfo, valuelist, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, valuelist, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1698,11 +1710,11 @@ static gboolean decode_GetProfileListRes(tvbuff_t *tvb, packet_info *pinfo, prot treepath_list = proto_item_add_subtree(treepath, ett_sml_treepath); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid count of elements in parameterTreePath"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in parameterTreePath"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1741,11 +1753,11 @@ static gboolean decode_GetProfileListRes(tvbuff_t *tvb, packet_info *pinfo, prot periodList_list = proto_item_add_subtree(periodList, ett_sml_periodList); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, periodList, PI_PROTOCOL, PI_ERROR, "invalid count of elements in periodList"); + expert_add_info_format_text(pinfo, periodList, &ei_sml_invalid_count, "invalid count of elements in periodList"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format(pinfo, periodList, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, periodList, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1867,11 +1879,11 @@ static gboolean decode_GetListRes (tvbuff_t *tvb, packet_info *pinfo, proto_tree valtree_list = proto_item_add_subtree (valtree, ett_sml_valtree); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, valtree, PI_PROTOCOL, PI_ERROR, "invalid count of elements in valList"); + expert_add_info_format_text(pinfo, valtree, &ei_sml_invalid_count, "invalid count of elements in valList"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format(pinfo, valtree, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, valtree, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -1992,11 +2004,11 @@ static gboolean decode_GetProcParameterReq(tvbuff_t *tvb, packet_info *pinfo, pr treepath_list = proto_item_add_subtree(treepath, ett_sml_treepath); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid count of elements in ParameterTreePath"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in ParameterTreePath"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -2046,11 +2058,11 @@ static gboolean decode_GetProcParameterRes(tvbuff_t *tvb, packet_info *pinfo, pr treepath_list = proto_item_add_subtree(treepath, ett_sml_treepath); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid count of elements in ParameterTreePath"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in ParameterTreePath"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -2067,7 +2079,7 @@ static gboolean decode_GetProcParameterRes(tvbuff_t *tvb, packet_info *pinfo, pr parameterTree_list = proto_item_add_subtree(parameterTree, ett_sml_parameterTree); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, parameterTree, PI_PROTOCOL, PI_ERROR, "invalid count of elements in parameterTree"); + expert_add_info_format_text(pinfo, parameterTree, &ei_sml_invalid_count, "invalid count of elements in parameterTree"); return TRUE; } @@ -2107,11 +2119,11 @@ static gboolean decode_SetProcParameterReq(tvbuff_t *tvb, packet_info *pinfo,pro treepath_list = proto_item_add_subtree(treepath, ett_sml_treepath); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid count of elements in ParameterTreePath"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid count of elements in ParameterTreePath"); return TRUE; } else if (repeat <= 0){ - expert_add_info_format(pinfo, treepath, PI_PROTOCOL, PI_ERROR, "invalid loop count"); + expert_add_info_format_text(pinfo, treepath, &ei_sml_invalid_count, "invalid loop count"); return TRUE; } @@ -2128,7 +2140,7 @@ static gboolean decode_SetProcParameterReq(tvbuff_t *tvb, packet_info *pinfo,pro parameterTree_list = proto_item_add_subtree(parameterTree, ett_sml_parameterTree); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, parameterTree, PI_PROTOCOL, PI_ERROR, "invalid count of elements in parameterTree"); + expert_add_info_format_text(pinfo, parameterTree, &ei_sml_invalid_count, "invalid count of elements in parameterTree"); return TRUE; } @@ -2197,7 +2209,7 @@ static gboolean decode_AttentionRes(tvbuff_t *tvb, packet_info *pinfo, proto_tre attentionDetails_list = proto_item_add_subtree(attentionDetails, ett_sml_attentionDetails); if ((tvb_get_guint8(tvb,*offset) & 0xF0) != LONG_LIST && (tvb_get_guint8(tvb,*offset) & 0xF0) != SHORT_LIST){ - expert_add_info_format(pinfo, attentionDetails, PI_PROTOCOL, PI_ERROR, "invalid count of elements in attentionDetails"); + expert_add_info_format_text(pinfo, attentionDetails, &ei_sml_invalid_count, "invalid count of elements in attentionDetails"); return TRUE; } @@ -2270,7 +2282,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr } } else if (!pinfo->can_desegment){ - expert_add_info_format(pinfo, NULL, PI_REASSEMBLE, PI_NOTE, "probably segment needed"); + expert_add_info(pinfo, NULL, &ei_sml_segment_needed); } while(!close1 && !close2){ @@ -2305,7 +2317,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr mainlist_list = proto_item_add_subtree (mainlist, ett_sml_mainlist); if (tvb_get_guint8(tvb, *offset) != LIST_6_ELEMENTS) { - expert_add_info_format(pinfo, mainlist, PI_PROTOCOL, PI_ERROR, "invalid count of elements"); + expert_add_info_format_text(pinfo, mainlist, &ei_sml_invalid_count, "invalid count of elements"); return; } *offset+=1; @@ -2351,7 +2363,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr *offset+=2; } else if (data !=2){ - expert_add_info_format(pinfo, messagebody, PI_PROTOCOL, PI_ERROR, "unknown Messagetype"); + expert_add_info(pinfo, messagebody, &ei_sml_messagetype_unknown); return; } @@ -2437,12 +2449,12 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr msg_error = decode_AttentionRes(tvb, pinfo,messagebodytree_list, offset); break; default : - expert_add_info_format(pinfo, messagebodytree, PI_PROTOCOL, PI_ERROR, "unknown messagetype"); + expert_add_info(pinfo, messagebodytree, &ei_sml_messagetype_unknown); return; } if (msg_error){ - expert_add_info_format(pinfo, messagebodytree, PI_PROTOCOL, PI_ERROR, "Error in MessageBody"); + expert_add_info(pinfo, messagebodytree, &ei_sml_MessageBody); return; } @@ -2455,7 +2467,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr crc16_tree = proto_item_add_subtree (crc16, ett_sml_crc16); if(tvb_get_guint8(tvb, *offset) != UNSIGNED8 && tvb_get_guint8(tvb, *offset) != UNSIGNED16){ - expert_add_info_format(pinfo, crc16, PI_PROTOCOL, PI_ERROR, "CRC length error"); + expert_add_info(pinfo, crc16, &ei_sml_crc_error_length); return; } @@ -2481,7 +2493,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr /*(little to big endian convert) to display in correct order*/ crc_check = ((crc_check >> 8) & 0xFF) + ((crc_check << 8 & 0xFF00)); proto_tree_add_text (crc16_tree, tvb, *offset, 0, "[CRC Bad 0x%X]", crc_check); - expert_add_info_format(pinfo, crc16, PI_CHECKSUM, PI_WARN, "CRC error"); + expert_add_info(pinfo, crc16, &ei_sml_crc_error); } } else { @@ -2494,7 +2506,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr *offset+=1; } else { - expert_add_info_format(pinfo, NULL, PI_PROTOCOL, PI_ERROR, "MsgEnd not 0x00"); + expert_add_info(pinfo, NULL, &ei_sml_endOfSmlMsg); return; } @@ -2536,7 +2548,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr /*Escape End*/ if(tvb_get_ntoh40(tvb, *offset) != ESC_SEQ_END){ - expert_add_info_format(pinfo, NULL, PI_PROTOCOL, PI_ERROR, "escapesequence error"); + expert_add_info(pinfo, NULL, &ei_sml_esc_error); return; } proto_tree_add_item (sml_tree, hf_sml_esc, tvb, *offset, 4, ENC_BIG_ENDIAN); @@ -2563,7 +2575,7 @@ static void dissect_sml_file(tvbuff_t *tvb, packet_info *pinfo, gint *offset, pr /*(little to big endian convert) to display in correct order*/ crc_check = ((crc_check >> 8) & 0xFF) + ((crc_check << 8) & 0xFF00); proto_tree_add_text (msgend_tree, tvb, *offset, 0, "[CRC Bad 0x%X]", crc_check); - expert_add_info_format(pinfo, msgend, PI_CHECKSUM, PI_WARN, "CRC error (messages not reassembled ?)"); + expert_add_info_format_text(pinfo, msgend, &ei_sml_crc_error, "CRC error (messages not reassembled ?)"); } } else { @@ -2609,6 +2621,7 @@ static void dissect_sml (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { void proto_register_sml (void) { module_t *sml_module; + expert_module_t* expert_sml; static hf_register_info hf[] = { { &hf_sml_esc, @@ -2846,6 +2859,20 @@ void proto_register_sml (void) { &ett_sml_attentionDetails }; + static ei_register_info ei[] = { + { &ei_sml_tupel_error, { "sml.tupel_error_", PI_PROTOCOL, PI_ERROR, "error in Tupel", EXPFILL }}, + { &ei_sml_procParValue_invalid, { "sml.procparvalue.invalid", PI_PROTOCOL, PI_WARN, "invalid procParValue", EXPFILL }}, + { &ei_sml_procParValue_errror, { "sml.procparvalue.error", PI_PROTOCOL, PI_ERROR, "error in procParValue", EXPFILL }}, + { &ei_sml_invalid_count, { "sml.invalid_count", PI_PROTOCOL, PI_ERROR, "invalid loop count", EXPFILL }}, + { &ei_sml_segment_needed, { "sml.segment_needed", PI_REASSEMBLE, PI_NOTE, "probably segment needed", EXPFILL }}, + { &ei_sml_messagetype_unknown, { "sml.messagetype.unknown", PI_PROTOCOL, PI_ERROR, "unknown Messagetype", EXPFILL }}, + { &ei_sml_MessageBody, { "sml.messagebody.error", PI_PROTOCOL, PI_ERROR, "Error in MessageBody", EXPFILL }}, + { &ei_sml_crc_error_length, { "sml.crc.length_error", PI_PROTOCOL, PI_ERROR, "CRC length error", EXPFILL }}, + { &ei_sml_crc_error, { "sml.crc.error", PI_CHECKSUM, PI_WARN, "CRC error", EXPFILL }}, + { &ei_sml_endOfSmlMsg, { "sml.end.not_zero", PI_PROTOCOL, PI_ERROR, "MsgEnd not 0x00", EXPFILL }}, + { &ei_sml_esc_error, { "sml.esc.error", PI_PROTOCOL, PI_ERROR, "escapesequence error", EXPFILL }}, + }; + proto_sml = proto_register_protocol("Smart Message Language","SML", "sml"); sml_module = prefs_register_protocol(proto_sml, proto_reg_handoff_sml); @@ -2856,6 +2883,8 @@ void proto_register_sml (void) { proto_register_field_array(proto_sml, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); + expert_sml = expert_register_protocol(proto_sml); + expert_register_field_array(expert_sml, ei, array_length(ei)); } void proto_reg_handoff_sml(void) { |