anchor.diff:  get_localaddr([Localhost|Ls]) ->
       case inet:getaddr(Localhost, inet6) of
          {ok, LocalAddr} ->
  -           io:format("~s ~p~n", [Localhost, LocalAddr]),
  +           p("found local address: ~s ~p", [Localhost, LocalAddr]),
              {ok, LocalAddr};
          _ ->
              get_localaddr(Ls)
       end.
  +
  +
  +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  +
  +try_tc(F) when is_function(F, 0) ->
  +    OldFlag = process_flag(trap_exit, true),
  +    Res = try F()
  +          catch
  +              throw:{skip, _} = SKIP ->
  +                  SKIP;
  +              exit:{skip, _} = SKIP ->
  +                  SKIP
  +          end,
  +    process_flag(trap_exit, OldFlag),
  +    Res.
  +                   
  +f(F, A) ->
  +    lists:flatten(io_lib:format(F, A)).
  +
  +skip(S) when is_list(S) ->
  +    throw({skip, S}).
  +
  +%% skip(F, A) when is_list(F) andalso is_list(A) ->
  +%%     skip(f(F, A)).
  +
  +open_failed_str(Reason) ->
  +    f("Open failed: ~w", [Reason]).
  +
  +
  +formated_timestamp() ->
  +    format_timestamp(os:timestamp()).
  +
  +format_timestamp({_N1, _N2, N3} = TS) ->
  +    {_Date, Time}   = calendar:now_to_local_time(TS),
  +    {Hour, Min, Sec} = Time,
  +    FormatTS = io_lib:format("~.2.0w:~.2.0w:~.2.0w.~.3.0w",
  +                             [Hour, Min, Sec, N3 div 1000]),  
  +    lists:flatten(FormatTS).
  +
  +p(F) ->
  +    p(F, []).
  +
  +p(F, A) ->
  +    io:format("~s ~p " ++ F ++ "~n", [formated_timestamp(), self() | A]).
  +
  
positive.code: implicit_inet6(Host, Addr) ->
      Active = {active,false},
      Loopback = {0,0,0,0,0,0,0,1},
      case gen_udp:open(0, [inet6,Active,{ip, Loopback}]) of
  	{ok,S1} ->
  	    io:format("~s ~p~n", ["::1",Loopback]),
  	    implicit_inet6(S1, Active, Loopback),
  	    ok = gen_udp:close(S1),
  	    %%
  	    Localaddr = ok(get_localaddr()),
  	    S2 = ok(gen_udp:open(0, [{ip,Localaddr},Active])),
  	    implicit_inet6(S2, Active, Localaddr),
  	    ok = gen_udp:close(S2),
  	    %%
  	    io:format("~s ~p~n", [Host,Addr]),
  	    S3 = ok(gen_udp:open(0, [{ifaddr,Addr},Active])),
  	    implicit_inet6(S3, Active, Addr),
  	    ok = gen_udp:close(S3);
  	_ ->
  	    {skip,"IPv6 not supported"}
      end.
  
  implicit_inet6(S1, Active, Addr) ->
      P1 = ok(inet:port(S1)),
      S2 = ok(gen_udp:open(0, [inet6,Active])),
      P2 = ok(inet:port(S2)),
      ok = gen_udp:connect(S2, Addr, P1),
      ok = gen_udp:connect(S1, Addr, P2),
      {Addr,P2} = ok(inet:peername(S1)),
      {Addr,P1} = ok(inet:peername(S2)),
      {Addr,P1} = ok(inet:sockname(S1)),
      {Addr,P2} = ok(inet:sockname(S2)),
      ok = gen_udp:send(S1, Addr, P2, "ping"),
      {Addr,P1,"ping"} = ok(gen_udp:recv(S2, 1024, 1000)),
      ok = gen_udp:send(S2, Addr, P1, "pong"),
      {Addr,P2,"pong"} = ok(gen_udp:recv(S1, 1024)),
      ok = gen_udp:close(S2).
  
  ok({ok,V}) -> V;
  ok(NotOk) ->
  
negative.code: 	 local_fdopen/1, local_fdopen_unbound/1, local_abstract/1,
           recv_close/1]).
  
  
  -define(TRY_TC(F), try_tc(F)).
                 
  suite() ->
      [{ct_hooks,[ts_install_cth]},
       {timetrap,{minutes,1}}].
  