FreeBSD/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c
/**
 * Find out the type of device. CPU only currently.
 */
Find out the type of device. CPU only currently.
Find out the type of device . CPU only currently .
static void
device_get_type(struct devinfo_dev *dev_p, const struct asn_oid **out_type_p)
{
	assert(dev_p != NULL);
	assert(out_type_p != NULL);
	if (dev_p == NULL)
		return;
	if (strncmp(dev_p->dd_name, "cpu", strlen("cpu")) == 0 &&
	    strstr(dev_p->dd_location, ".CPU") != NULL) {
		*out_type_p = &OIDX_hrDeviceProcessor_c;
		return;
	}
}
static void device_get_type ( struct devinfo_dev * dev_p , const struct asn_oid * * out_type_p ) { assert ( dev_p != NULL ) ; assert ( out_type_p != NULL ) ; if ( dev_p == NULL ) return ; if ( strncmp ( dev_p -> dd_name , " " , strlen ( " " ) ) == 0 && strstr ( dev_p -> dd_location , " " ) != NULL ) { * out_type_p = & OIDX_hrDeviceProcessor_c ; return ; } }
Find out the type of device.
Find out the type of device .