FreeBSD/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c
/**
 * Find an device entry given its name.
 */
Find an device entry given its name.
Find an device entry given its name .
struct device_entry *
device_find_by_name(const char *dev_name)
{
	struct device_map_entry *map;
	assert(dev_name != NULL);
	STAILQ_FOREACH(map, &device_map, link)
		if (strcmp(map->name_key, dev_name) == 0)
			return (map->entry_p);
	return (NULL);
}
struct device_entry * device_find_by_name ( const char * dev_name ) { struct device_map_entry * map ; assert ( dev_name != NULL ) ; STAILQ_FOREACH ( map , & device_map , link ) if ( strcmp ( map -> name_key , dev_name ) == 0 ) return ( map -> entry_p ) ; return ( NULL ) ; }
Find an device entry given its name.
Find an device entry given its name .