anchor.diff:  setopt(S, Opt, Val) ->
       inet:setopts(S, [{Opt,Val}]).
   
  -log_ok(X) -> log(ok(X)).
  -
  -ok({ok,X}) -> X.
  -
  -err([], Result) ->
  -    erlang:error(Result);
  -err([Reason|_], {error,Reason}) ->
  -    ok;
  -err([_|Reasons], Result) ->
  -    err(Reasons, Result).
  -
  -log(X) ->
  -    ?P("LOG: ~p", [X]),
  -    X.
   
   flush() ->
       receive
  
positive.code: 
  %% What is this *actually* supposed to test?
  implicit_inet6(Config) when is_list(Config) ->
      ?P("begin"),
      Hostname = log_ok(inet:gethostname()),
      ?P("try create socket"),
      case gen_sctp:open(0, [inet6]) of
  	{ok, S1} ->
  	    case inet:getaddr(Hostname, inet6) of
  		{ok, Host} ->
  		    Loopback = {0,0,0,0,0,0,0,1},
  		    ?P("*** ~s: ~p ***", ["Loopback", Loopback]),
  		    implicit_inet6(S1, Loopback),
  		    ok = gen_sctp:close(S1),
  		    %%
  		    Localhost = log_ok(inet:getaddr("localhost", inet6)),
  		    ?P("*** ~s: ~p ***", ["localhost", Localhost]),
  		    S2 = log_ok(gen_sctp:open(0, [{ip,Localhost}])),
  		    implicit_inet6(S2, Localhost),
  		    ok = gen_sctp:close(S2),
  		    %%
  		    ?P("*** ~s: ~p ***", [Hostname, Host]),
  		    S3 = log_ok(gen_sctp:open(0, [{ifaddr, Host}])),
  		    implicit_inet6(S3, Host),
  		    ok = gen_sctp:close(S1),
  		    ?P("done"),
                      ok;
  		{error, eafnosupport} ->
  		    ok = gen_sctp:close(S1),
  		    {skip, "Can not look up IPv6 address"}
  	    end;
  	_ ->
  	    {skip, "IPv6 not supported"}
      end.
  
  implicit_inet6(S1, Addr) ->
      ?P("make (server) listen socket"),
      ok = gen_sctp:listen(S1, true),
      ServerPortNo = log_ok(inet:port(S1)),
      ?P("try create (client) socket"),
      S2 = log_ok(gen_sctp:open(0, [inet6, {ifaddr, Addr}])),
      {ClientAddr, ClientPortNo} = log_ok(inet:sockname(S2)),
      ?P("try connect"
         "~n   from (connector): ~p, ~p (~p)"
  
negative.code:     case log_ok(gen_sctp:recv(Sb, infinity)) of
  	{Loopback,
  	 Pa,
  	 [#sctp_sndrcvinfo{stream   = Stream,
  			   assoc_id = SbAssocId}],
  	 Data} -> ok;
  	Event1 ->
  	    case recv_event(Event1) of
  