FreeBSD/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c
/*
 * Get the bridge name from an OID index.
 */
Get the bridge name from an OID index.
Get the bridge name from an OID index .
static char *
bridge_name_index_get(const struct asn_oid *oid, uint sub, char *b_name)
{
	uint i;
	if (oid->len - sub != oid->subs[sub] + 1 || oid->subs[sub] >= IFNAMSIZ)
		return (NULL);
	for (i = 0; i < oid->subs[sub]; i++)
		b_name[i] = oid->subs[sub + i + 1];
	b_name[i] = '\0';
	return (b_name);
}
static char * bridge_name_index_get ( const struct asn_oid * oid , uint sub , char * b_name ) { uint i ; if ( oid -> len - sub != oid -> subs [ sub ] + 1 || oid -> subs [ sub ] >= IFNAMSIZ ) return ( NULL ) ; for ( i = 0 ; i < oid -> subs [ sub ] ; i ++ ) b_name [ i ] = oid -> subs [ sub + i + 1 ] ; b_name [ i ] = ' \0 ' ; return ( b_name ) ; }
Get the bridge name from an OID index.
Get the bridge name from an OID index .