diff options
author | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-10-31 14:43:05 +0000 |
---|---|---|
committer | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-10-31 14:43:05 +0000 |
commit | 9d6be66a86f5a61df2acee89f297b1aa4a767c1a (patch) | |
tree | 03db6c58773c809526fbb074a1d0ce59de4f7306 /epan/dissectors/packet-usb-hub.c | |
parent | eff84e954ea5b30edd0de9d917a22d294080ec8e (diff) |
Register dissectors in proto_reg_handoff (not proto_register) in the standard manner;
Use col_add_fstr instead of col_clear/col_append-fstr.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30782 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-usb-hub.c')
-rw-r--r-- | epan/dissectors/packet-usb-hub.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/epan/dissectors/packet-usb-hub.c b/epan/dissectors/packet-usb-hub.c index 53b5c8b0f6..ec7915332e 100644 --- a/epan/dissectors/packet-usb-hub.c +++ b/epan/dissectors/packet-usb-hub.c @@ -567,8 +567,7 @@ dissect_usb_hub_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "USBHUB"); if (check_col(pinfo->cinfo, COL_INFO)) { - col_clear(pinfo->cinfo, COL_INFO); - col_append_fstr(pinfo->cinfo, COL_INFO, "%s %s", + col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s", val_to_str(usb_trans_info->request, setup_request_names_vals, "Unknown type %x"), is_request ? "Request" : "Response"); } @@ -664,14 +663,17 @@ proto_register_usb_hub(void) &ett_usb_hub_wIndex, &ett_usb_hub_wLength }; - dissector_handle_t usb_hub_control_handle; proto_usb_hub = proto_register_protocol("USB HUB", "USBHUB", "usbhub"); proto_register_field_array(proto_usb_hub, hf, array_length(hf)); proto_register_subtree_array(usb_hub_subtrees, array_length(usb_hub_subtrees)); +} + +void +proto_reg_handoff_usb_hub(void) { + dissector_handle_t usb_hub_control_handle; usb_hub_control_handle = new_create_dissector_handle(dissect_usb_hub_control, proto_usb_hub); dissector_add("usb.control", IF_CLASS_HUB, usb_hub_control_handle); dissector_add("usb.control", IF_CLASS_UNKNOWN, usb_hub_control_handle); - } |