FreeBSD/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmpmap.c
/* provided an asn_oid find the corresponding string for it */
provided an asn_oid find the corresponding string for it
provided an asn_oid find the corresponding string for it
static int32_t
snmp_lookup_leaf(struct snmp_mapping *headp, struct snmp_object *s)
{
	struct snmp_oid2str *temp;
	if (headp == NULL)
		return (-1);
	SLIST_FOREACH(temp,headp,link) {
		if ((asn_compare_oid(&(temp->var), &(s->val.var)) == 0) ||
		    (asn_is_suboid(&(temp->var), &(s->val.var)))) {
			s->info = temp;
			return (1);
		}
	}
	return (-1);
}
static int32_t snmp_lookup_leaf ( struct snmp_mapping * headp , struct snmp_object * s ) { struct snmp_oid2str * temp ; if ( headp == NULL ) return ( -1 ) ; SLIST_FOREACH ( temp , headp , link ) { if ( ( asn_compare_oid ( & ( temp -> var ) , & ( s -> val . var ) ) == 0 ) || ( asn_is_suboid ( & ( temp -> var ) , & ( s -> val . var ) ) ) ) { s -> info = temp ; return ( 1 ) ; } } return ( -1 ) ; }
provided an asn_oid find the corresponding string for it
provided an asn_oid find the corresponding string for it