diff options
author | Michael Mann <mmann78@netscape.net> | 2013-05-25 17:06:40 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-05-25 17:06:40 +0000 |
commit | 7e8e5b347e43359fcb36e32f9ce998c49b8d9fae (patch) | |
tree | 625973d8be777bdfa2d992ee473a77004180a742 /epan/dissectors/packet-bitcoin.c | |
parent | 66c859e765a8e881cedc8f93af706683775e8b7e (diff) |
Batch of filterable expert_infos.
svn path=/trunk/; revision=49581
Diffstat (limited to 'epan/dissectors/packet-bitcoin.c')
-rw-r--r-- | epan/dissectors/packet-bitcoin.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/epan/dissectors/packet-bitcoin.c b/epan/dissectors/packet-bitcoin.c index 5dd9dae03c..930b3ce3e3 100644 --- a/epan/dissectors/packet-bitcoin.c +++ b/epan/dissectors/packet-bitcoin.c @@ -179,6 +179,9 @@ static gint ett_tx_in_list = -1; static gint ett_tx_in_outp = -1; static gint ett_tx_out_list = -1; +static expert_field ei_bitcoin_command_unknown = EI_INIT; + + static dissector_handle_t bitcoin_handle; static gboolean bitcoin_desegment = TRUE; @@ -874,7 +877,7 @@ static void dissect_bitcoin_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tre /* no handler found */ col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", "[unknown command]"); - expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR, "Unknown command"); + expert_add_info(pinfo, ti, &ei_bitcoin_command_unknown); } static int @@ -1233,7 +1236,12 @@ proto_register_bitcoin(void) &ett_tx_out_list, }; + static ei_register_info ei[] = { + { &ei_bitcoin_command_unknown, { "bitcoin.command.unknown", PI_PROTOCOL, PI_WARN, "Unknown command", EXPFILL }}, + }; + module_t *bitcoin_module; + expert_module_t* expert_bitcoin; proto_bitcoin = proto_register_protocol( "Bitcoin protocol", "Bitcoin", "bitcoin"); @@ -1241,6 +1249,9 @@ proto_register_bitcoin(void) proto_register_subtree_array(ett, array_length(ett)); proto_register_field_array(proto_bitcoin, hf, array_length(hf)); + expert_bitcoin = expert_register_protocol(proto_bitcoin); + expert_register_field_array(expert_bitcoin, ei, array_length(ei)); + new_register_dissector("bitcoin", dissect_bitcoin, proto_bitcoin); bitcoin_module = prefs_register_protocol(proto_bitcoin, NULL); |