Remove expert_add_undecoded_item in favor of proto_tree_add_expert.
svn path=/trunk/; revision=51632
This commit is contained in:
parent
2bda15544c
commit
1f4f0d535a
|
@ -254,6 +254,8 @@ static gint ett_lisp_loc = -1;
|
|||
static gint ett_lisp_loc_flags = -1;
|
||||
static gint ett_lisp_elp = -1;
|
||||
|
||||
static expert_field ei_lisp_undecoded = EI_INIT;
|
||||
|
||||
static dissector_handle_t lisp_handle;
|
||||
|
||||
static dissector_handle_t ipv4_handle;
|
||||
|
@ -719,8 +721,7 @@ dissect_lcaf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset)
|
|||
break;
|
||||
default:
|
||||
if (lcaf_type < 13)
|
||||
expert_add_undecoded_item(tvb, pinfo, tree, offset,
|
||||
len, PI_WARN);
|
||||
proto_tree_add_expert(tree, pinfo, &ei_lisp_undecoded, tvb, offset, len);
|
||||
else
|
||||
expert_add_info_format(pinfo, tree, PI_PROTOCOL, PI_ERROR,
|
||||
"LCAF type %d is not defined in draft-farinacci-lisp-lcaf-%d",
|
||||
|
@ -2114,6 +2115,12 @@ proto_register_lisp(void)
|
|||
&ett_lisp_elp
|
||||
};
|
||||
|
||||
static ei_register_info ei[] = {
|
||||
{ &ei_lisp_undecoded, { "lisp.undecoded", PI_UNDECODED, PI_WARN, "Not dissected yet (report to wireshark.org)", EXPFILL }},
|
||||
};
|
||||
|
||||
expert_module_t* expert_lisp;
|
||||
|
||||
/* Register the protocol name and description */
|
||||
proto_lisp = proto_register_protocol("Locator/ID Separation Protocol",
|
||||
"LISP Control", "lisp");
|
||||
|
@ -2121,6 +2128,8 @@ proto_register_lisp(void)
|
|||
/* Required function calls to register the header fields and subtrees used */
|
||||
proto_register_field_array(proto_lisp, hf, array_length(hf));
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
expert_lisp = expert_register_protocol(proto_lisp);
|
||||
expert_register_field_array(expert_lisp, ei, array_length(ei));
|
||||
|
||||
/* Register dissector so that other dissectors can call it */
|
||||
lisp_handle = new_register_dissector("lisp", dissect_lisp, proto_lisp);
|
||||
|
|
|
@ -99,6 +99,7 @@ static gint ett_sysex = -1;
|
|||
static expert_field ei_sysex_message_start_byte = EI_INIT;
|
||||
static expert_field ei_digitech_checksum_bad = EI_INIT;
|
||||
static expert_field ei_sysex_message_end_byte = EI_INIT;
|
||||
static expert_field ei_sysex_undecoded = EI_INIT;
|
||||
|
||||
#define SYSEX_MANUFACTURER_DOD 0x000010
|
||||
|
||||
|
@ -1088,9 +1089,8 @@ dissect_digitech_procedure(guint8 procedure, const gint offset,
|
|||
|
||||
if (data_offset < data_len)
|
||||
{
|
||||
expert_add_undecoded_item(data_tvb, pinfo, tree,
|
||||
data_offset, data_len - data_offset,
|
||||
PI_WARN);
|
||||
proto_tree_add_expert(tree, pinfo, &ei_sysex_undecoded,
|
||||
data_tvb, data_offset, data_len - data_offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1199,9 +1199,8 @@ dissect_sysex_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree
|
|||
|
||||
if (offset < data_len - 1)
|
||||
{
|
||||
expert_add_undecoded_item(tvb, pinfo, tree,
|
||||
offset, data_len - offset - 1,
|
||||
PI_WARN);
|
||||
proto_tree_add_expert(tree, pinfo, &ei_sysex_undecoded,
|
||||
tvb, offset, data_len - offset - 1);
|
||||
}
|
||||
|
||||
/* Check end byte (EOX - 0xF7) */
|
||||
|
@ -1395,6 +1394,7 @@ proto_register_sysex(void)
|
|||
{ &ei_sysex_message_start_byte, { "sysex.message_start_byte", PI_PROTOCOL, PI_WARN, "SYSEX Error: Wrong start byte", EXPFILL }},
|
||||
{ &ei_digitech_checksum_bad, { "sysex.digitech.checksum_bad", PI_CHECKSUM, PI_WARN, "ARP packet storm detected", EXPFILL }},
|
||||
{ &ei_sysex_message_end_byte, { "sysex.message_end_byte", PI_PROTOCOL, PI_WARN, "SYSEX Error: Wrong end byte", EXPFILL }},
|
||||
{ &ei_sysex_undecoded, { "sysex.undecoded", PI_UNDECODED, PI_WARN, "Not dissected yet (report to wireshark.org)", EXPFILL }},
|
||||
};
|
||||
|
||||
expert_module_t* expert_sysex;
|
||||
|
|
|
@ -89,6 +89,8 @@ static int hf_sysex_msg_reassembled_data = -1;
|
|||
static gint ett_sysex_msg_fragment = -1;
|
||||
static gint ett_sysex_msg_fragments = -1;
|
||||
|
||||
static expert_field ei_usb_audio_undecoded = EI_INIT;
|
||||
|
||||
static const fragment_items sysex_msg_frag_items = {
|
||||
/* Fragment subtrees */
|
||||
&ett_sysex_msg_fragment,
|
||||
|
@ -258,7 +260,7 @@ dissect_usb_audio_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tre
|
|||
break;
|
||||
default:
|
||||
offset = 0;
|
||||
expert_add_undecoded_item(tvb, pinfo, tree, offset, length - offset, PI_WARN);
|
||||
proto_tree_add_expert(tree, pinfo, &ei_usb_audio_undecoded, tvb, offset, length - offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -326,9 +328,17 @@ proto_register_usb_audio(void)
|
|||
&ett_sysex_msg_fragments
|
||||
};
|
||||
|
||||
static ei_register_info ei[] = {
|
||||
{ &ei_usb_audio_undecoded, { "usbaudio.undecoded", PI_UNDECODED, PI_WARN, "Not dissected yet (report to wireshark.org)", EXPFILL }},
|
||||
};
|
||||
|
||||
expert_module_t* expert_usb_audio;
|
||||
|
||||
proto_usb_audio = proto_register_protocol("USB Audio", "USBAUDIO", "usbaudio");
|
||||
proto_register_field_array(proto_usb_audio, hf, array_length(hf));
|
||||
proto_register_subtree_array(usb_audio_subtrees, array_length(usb_audio_subtrees));
|
||||
expert_usb_audio = expert_register_protocol(proto_usb_audio);
|
||||
expert_register_field_array(expert_usb_audio, ei, array_length(ei));
|
||||
register_init_routine(&midi_data_reassemble_init);
|
||||
|
||||
register_dissector("usbaudio", dissect_usb_audio_bulk, proto_usb_audio);
|
||||
|
|
|
@ -427,16 +427,3 @@ proto_tree_add_expert_format(proto_tree *tree, packet_info *pinfo, expert_field*
|
|||
|
||||
return ti;
|
||||
}
|
||||
|
||||
void
|
||||
expert_add_undecoded_item(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int length, const int severity)
|
||||
{
|
||||
|
||||
proto_item *expert_item;
|
||||
|
||||
expert_item = proto_tree_add_text(tree, tvb, offset, length, "Not dissected yet");
|
||||
|
||||
expert_add_info_format(pinfo, expert_item, PI_UNDECODED, severity, "Not dissected yet(report to wireshark.org)");
|
||||
PROTO_ITEM_SET_GENERATED(expert_item);
|
||||
|
||||
}
|
||||
|
|
|
@ -214,20 +214,6 @@ WS_DLL_PUBLIC expert_module_t *expert_register_protocol(int id);
|
|||
WS_DLL_PUBLIC void
|
||||
expert_register_field_array(expert_module_t* module, ei_register_info *ei, const int num_records);
|
||||
|
||||
|
||||
/** Add an expert info about not dissected "item"
|
||||
Add an expert info tree to a not dissected protocol item.
|
||||
@param tvb The tvb associated with the item.
|
||||
@param pinfo Packet info of the currently processed packet. May be NULL.
|
||||
@param tree Tree to add the item to
|
||||
@param offset Offset in tvb
|
||||
@param length The length of the item.
|
||||
@param severity The expert severity (like PI_WARN - see: proto.h)
|
||||
*/
|
||||
|
||||
WS_DLL_PUBLIC void
|
||||
expert_add_undecoded_item(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int length, const int severity);
|
||||
|
||||
#define EXPERT_CHECKSUM_DISABLED -2
|
||||
#define EXPERT_CHECKSUM_UNKNOWN -1
|
||||
#define EXPERT_CHECKSUM_GOOD 0
|
||||
|
|
Loading…
Reference in New Issue