FreeBSD/contrib/ofed/libsdp/src/match.c
/* return tcp or sdp if the port and role are dont cares */
return tcp or sdp if the port and role are dont cares
return tcp or sdp if the port and role are dont cares
use_family_t
__sdp_match_by_program(
	 )
{
	use_family_t server_target_family;
	use_family_t client_target_family;
	use_family_t target_family = USE_BOTH;
	if ( __sdp_config_empty(  ) ) {
		target_family = USE_SDP;
	} else {
		server_target_family =
			match_by_all_rules_program( __sdp_servers_family_rules_head );
		client_target_family =
			match_by_all_rules_program( __sdp_clients_family_rules_head );
		if ( server_target_family == client_target_family )
			target_family = server_target_family;
	}
	__sdp_log( 4, "MATCH PROGRAM: => %s\n",
				  __sdp_get_family_str( target_family ) );
	return ( target_family );
}
use_family_t __sdp_match_by_program ( ) { use_family_t server_target_family ; use_family_t client_target_family ; use_family_t target_family = USE_BOTH ; if ( __sdp_config_empty ( ) ) { target_family = USE_SDP ; } else { server_target_family = match_by_all_rules_program ( __sdp_servers_family_rules_head ) ; client_target_family = match_by_all_rules_program ( __sdp_clients_family_rules_head ) ; if ( server_target_family == client_target_family ) target_family = server_target_family ; } __sdp_log ( 4 , " \n " , __sdp_get_family_str ( target_family ) ) ; return ( target_family ) ; }
return tcp or sdp if the port and role are dont cares
return tcp or sdp if the port and role are dont cares
/* need to try both server and client rules */ /* only if both agree */