anchor.diff:  		    [ClientFamily, AddressToConnectTo]),
       ?line S2 = ok(gen_sctp:open(0, [ClientFamily])),
       %% Verify client can connect
  -    ?line #sctp_assoc_change{state=comm_up} =
  +    ?line #sctp_assoc_change{state=comm_up} = S2Assoc =
   	ok(gen_sctp:connect(S2, AddressToConnectTo, P1, [])),
       %% verify server side also receives comm_up from client
  -    ?line recv_comm_up_eventually(S1),
  +    ?line S1Assoc = recv_comm_up_eventually(S1),
  +    ?line Result = Fun(S1, ServerFamily, S1Assoc, S2, ClientFamily, S2Assoc),
       ?line ok = gen_sctp:close(S2),
  -    ?line ok = gen_sctp:close(S1).
  +    ?line ok = gen_sctp:close(S1),
  +    Result.
   
   %% If at least one of the addresses is an ipv6 address, return inet6, else inet.
   get_family_by_addrs(Addresses) ->
  
positive.code:     open_multihoming_ipv6_socket/1,
      open_multihoming_ipv4_and_ipv6_socket/1,
      basic_stream/1, xfer_stream_min/1, peeloff_active_once/1,
      peeloff_active_true/1, buffers/1]).
  
  suite() -> [{ct_hooks,[ts_install_cth]}].
  
  
negative.code: 		  {skip, Reason}
  	  end.
  
  names_unihoming_ipv4(doc) ->
      "Test inet:socknames/peernames on unihoming IPv4 sockets";
  names_unihoming_ipv4(suite) ->
      [];
  names_unihoming_ipv4(Config) when is_list(Config) ->
      ?line do_names(Config, inet, 1).
  
  names_unihoming_ipv6(doc) ->
      "Test inet:socknames/peernames on unihoming IPv6 sockets";
  names_unihoming_ipv6(suite) ->
      [];
  names_unihoming_ipv6(Config) when is_list(Config) ->
      ?line do_names(Config, inet6, 1).
  
  names_multihoming_ipv4(doc) ->
      "Test inet:socknames/peernames on multihoming IPv4 sockets";
  names_multihoming_ipv4(suite) ->
      [];
  names_multihoming_ipv4(Config) when is_list(Config) ->
      ?line do_names(Config, inet, 2).
  
  names_multihoming_ipv6(doc) ->
      "Test inet:socknames/peernames on multihoming IPv6 sockets";
  names_multihoming_ipv6(suite) ->
      [];
  names_multihoming_ipv6(Config) when is_list(Config) ->
      ?line do_names(Config, inet6, 2).
  
  
  
  do_names(_, FamilySpec, AddressCount) ->
      Fun =
  	fun (ServerSocket, _, ServerAssoc, ClientSocket, _, ClientAssoc) ->
  		?line ServerSocknames =
  		    lists:sort(ok(inet:socknames(ServerSocket))),
  		?line ServerSocknames =
  		    lists:sort(ok(inet:socknames(ServerSocket, ServerAssoc))),
  		?line ?LOGVAR(ServerSocknames),
  		?line ClientSocknames =
  		    lists:sort(ok(inet:socknames(ClientSocket))),
  		?line ClientSocknames =
  		    lists:sort(ok(inet:socknames(ClientSocket, ClientAssoc))),
  		?line ?LOGVAR(ClientSocknames),
  		?line {error,einval} = inet:peernames(ServerSocket),
  		?line ServerPeernames =
  		    lists:sort(ok(inet:peernames(ServerSocket, ServerAssoc))),
  		?line ?LOGVAR(ServerPeernames),
  		?line {error,einval} = inet:peernames(ClientSocket),
  		?line ClientPeernames =
  		    lists:sort(ok(inet:peernames(ClientSocket, ClientAssoc))),
  		?line ?LOGVAR(ClientPeernames),
  		?line ServerSocknames = ClientPeernames,
  		?line ClientSocknames = ServerPeernames,
  		?line {ok,Socket} = gen_sctp:peeloff(ServerSocket, ServerAssoc),
  		?line Socknames =
  		    lists:sort(ok(inet:socknames(Socket))),
  		?line Socknames =
  		    lists:sort(ok(inet:socknames(Socket, ServerAssoc))),
  		?line ?LOGVAR(Socknames),
  		?line Peernames =
  		    lists:sort(ok(inet:peernames(Socket, ServerAssoc))),
  		?line ?LOGVAR(Peernames),
  		?line ok = gen_sctp:close(Socket),
  		?line Socknames = ClientPeernames,
  		?line ClientSocknames = Peernames,
  		ok
  	end,
      ?line case get_addrs_by_family(FamilySpec, AddressCount) of
  	      {ok, Addresses} when length(Addresses) =:= AddressCount ->
  		  ?line do_open_and_connect(Addresses, hd(Addresses), Fun);
  	      {error, Reason} ->
  		  {skip, Reason}
  	  end.
  
  
  
  get_addrs_by_family(Family, NumAddrs) ->
      case os:type() of
  