/* This function parses all dissectors associated with a table to find the one whose protocol has the specified filter name. It is called as a reference function in a call to dissector_table_foreach_handle. The name we are looking for, as well as the results, are stored in the  */
static void find_protocol_name_func(const gchar *table, gpointer handle, gpointer user_data)
/* This function parses all dissectors associated with a table to find the one whose protocol has the specified filter name. It is called as a reference function in a call to dissector_table_foreach_handle. The name we are looking for, as well as the results, are stored in the  */
static void find_protocol_name_func(const gchar *table, gpointer handle, gpointer user_data)
{
  int                         proto_id;
  const gchar                *protocol_filter_name;
  protocol_name_search_t      search_info;
  g_assert(handle);
  search_info = (protocol_name_search_t)user_data;
  proto_id = dissector_handle_get_protocol_index((dissector_handle_t)handle);
  if (proto_id != -1) {
    protocol_filter_name = proto_get_protocol_filter_name(proto_id);
    g_assert(protocol_filter_name != NULL);
    if (strcmp(protocol_filter_name, search_info->searched_name) == 0) {
      if (search_info->nb_match == 0) {
        search_info->matched_handle = (dissector_handle_t)handle;
      }
      search_info->nb_match++;
    }
  }
}