/* Returns the default airpcap interface of a list, NULL if list is empty  */
airpcap_if_info_t* airpcap_get_default_if(GList *airpcap_if_list_p)
/* Returns the default airpcap interface of a list, NULL if list is empty  */
airpcap_if_info_t* airpcap_get_default_if(GList *airpcap_if_list_p)
{
    airpcap_if_info_t* if_info = NULL;
    if ((prefs.capture_device != NULL) && (*prefs.capture_device != '\0'))
    {
        if_info = get_airpcap_if_from_name(airpcap_if_list_p,
                                           get_if_name(prefs.capture_device));
    }
    return if_info;
}