FreeBSD/contrib/bsnmp/snmp_mibII/mibII.c
/* set an interface name to dynamic mode */
set an interface name to dynamic mode
set an interface name to dynamic mode
void
mib_if_set_dyn(const char *name)
{
	struct mibdynif *d;
	SLIST_FOREACH(d, &mibdynif_list, link)
		if (strcmp(name, d->name) == 0)
			return;
	if ((d = malloc(sizeof(*d))) == NULL)
		err(1, NULL);
	strcpy(d->name, name);
	SLIST_INSERT_HEAD(&mibdynif_list, d, link);
}
void mib_if_set_dyn ( const char * name ) { struct mibdynif * d ; SLIST_FOREACH ( d , & mibdynif_list , link ) if ( strcmp ( name , d -> name ) == 0 ) return ; if ( ( d = malloc ( sizeof ( * d ) ) ) == NULL ) err ( 1 , NULL ) ; strcpy ( d -> name , name ) ; SLIST_INSERT_HEAD ( & mibdynif_list , d , link ) ; }
set an interface name to dynamic mode
set an interface name to dynamic mode