FreeBSD/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_snmp.c
/*
 * The bridge module configuration via SNMP.
 */
The bridge module configuration via SNMP.
The bridge module configuration via SNMP .
static int
bridge_default_name_save(struct snmp_context *ctx, const char *bridge_default)
{
	if ((ctx->scratch->int1 = strlen(bridge_default)) >= IFNAMSIZ)
		return (-1);
	if ((ctx->scratch->ptr1 = malloc(IFNAMSIZ)) == NULL)
		return (-1);
	strncpy(ctx->scratch->ptr1, bridge_default, ctx->scratch->int1);
	return (0);
}
static int bridge_default_name_save ( struct snmp_context * ctx , const char * bridge_default ) { if ( ( ctx -> scratch -> int1 = strlen ( bridge_default ) ) >= IFNAMSIZ ) return ( -1 ) ; if ( ( ctx -> scratch -> ptr1 = malloc ( IFNAMSIZ ) ) == NULL ) return ( -1 ) ; strncpy ( ctx -> scratch -> ptr1 , bridge_default , ctx -> scratch -> int1 ) ; return ( 0 ) ; }
The bridge module configuration via SNMP.
The bridge module configuration via SNMP .