FreeBSD/contrib/bsnmp/snmp_mibII/mibII.c
/*
 * Check whether an interface is dynamic. The argument may include the
 * unit number. This assumes, that the name part does NOT contain digits.
 */
Check whether an interface is dynamic. The argument may include the
unit number. This assumes, that the name part does NOT contain digits.
Check whether an interface is dynamic . The argument may include the unit number . This assumes that the name part does NOT contain digits .
int
mib_if_is_dyn(const char *name)
{
	size_t len;
	struct mibdynif *d;
	for (len = 0; name[len] != '\0' && isalpha(name[len]) ; len++)
		;
	SLIST_FOREACH(d, &mibdynif_list, link)
		if (strlen(d->name) == len && strncmp(d->name, name, len) == 0)
			return (1);
	return (0);
}
int mib_if_is_dyn ( const char * name ) { size_t len ; struct mibdynif * d ; for ( len = 0 ; name [ len ] != ' \0 ' && isalpha ( name [ len ] ) ; len ++ ) ; SLIST_FOREACH ( d , & mibdynif_list , link ) if ( strlen ( d -> name ) == len && strncmp ( d -> name , name , len ) == 0 ) return ( 1 ) ; return ( 0 ) ; }
Check whether an interface is dynamic.
Check whether an interface is dynamic .