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:     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
  
negative.code: 	_ -> A = B
      end.
  
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  timestamp() ->
      erlang:monotonic_time().
  
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  log_ok(X) ->
      log(ok(X)).
  
  ok({ok, X}) ->
      X;
  ok({error, X}) ->
      ?P("ERROR: ~p", [X]),
      ?line ct:fail({unexpected_error, X});
  ok(X) ->
      ?P("UNEXPECTED: ~p", [X]),
      ?line ct:fail({unexpected, X}).
      
  
  log(X) ->
      ?P("LOG: ~p", [X]),
      X.
  
  err([], Result) ->
      erlang:error(Result);
  err([Reason|_], {error,Reason}) ->
      ok;
  err([_|Reasons], Result) ->
      err(Reasons, Result).
  
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  open_failed_str(Reason) ->
      ?F("Open failed: ~w", [Reason]).
  
  