/* For a dissector handle, print on the stream described by output, the filter name (which is what's used in the "-d" option) and the full name for the protocol that corresponds to this handle.  */
static void display_dissector_names(const gchar *table _U_, gpointer handle, gpointer output)
/* For a dissector handle, print on the stream described by output, the filter name (which is what's used in the "-d" option) and the full name for the protocol that corresponds to this handle.  */
static void display_dissector_names(const gchar *table _U_, gpointer handle, gpointer output)
{
    int          proto_id;
    const gchar *proto_filter_name;
    const gchar *proto_ui_name;
    proto_id = dissector_handle_get_protocol_index((dissector_handle_t)handle);
    if (proto_id != -1) {
        proto_filter_name = proto_get_protocol_filter_name(proto_id);
        proto_ui_name = proto_get_protocol_name(proto_id);
        g_assert(proto_filter_name != NULL);
        g_assert(proto_ui_name != NULL);
        if ((prev_display_dissector_name == NULL) ||
            (strcmp(prev_display_dissector_name, proto_filter_name) != 0)) {
            fprintf((FILE *)output, "\t%s (%s)\n",
                proto_filter_name,
                proto_ui_name);
            prev_display_dissector_name = proto_filter_name;
        }
    }
}