/* Used to retrieve the interface given the name (the name is used in AirpcapOpen)  */
airpcap_if_info_t* get_airpcap_if_from_name(GList *if_list, const gchar *name)
/* Used to retrieve the interface given the name (the name is used in AirpcapOpen)  */
airpcap_if_info_t* get_airpcap_if_from_name(GList *if_list, const gchar *name)
{
    GList* curr;
    airpcap_if_info_t* if_info;
    for (curr = g_list_first(if_list); curr; curr = g_list_next(curr)) {
        if_info = (airpcap_if_info_t *)curr->data;
        if (if_info && (g_ascii_strcasecmp(if_info->name, name) == 0)) {
            return (if_info);
        }
        if (strlen(if_info->name) > 4 && (g_ascii_strcasecmp(if_info->name + 4, name) == 0)) {
            return (if_info);
        }
    }
    return (NULL);
}