/* Look for a given device in the specified list of devices, and return the entry for it if we find it or NULL if we don't.  */
pcap_if_t* find_dev(pcap_if_list_t *devlistp, const char *name)
/* Look for a given device in the specified list of devices, and return the entry for it if we find it or NULL if we don't.  */
pcap_if_t* find_dev(pcap_if_list_t *devlistp, const char *name)
{
	pcap_if_t *curdev;
	for (curdev = devlistp->beginning; curdev != NULL;
	    curdev = curdev->next) {
		if (strcmp(name, curdev->name) == 0) {
			return (curdev);
		}
	}
	return (NULL);
}