anchor.diff:  	    end
       end.
   
  -%% Interface must be up and not loopback to be usable.
  +%%--------------------------------------------------------------------
  +%% Function: usable_if(Flags)
  +%%           Flags = list() of atom()
  +%% Descrip.: Interface must be up and not loopback to be considered
  +%%           usable.
  +%% Returns : true | false
  +%%--------------------------------------------------------------------
   usable_if(Flags) ->
       not lists:member(loopback, Flags)
   	and lists:member(up, Flags).
  -
  -get_iplist() ->
  -    {ok, If} = inet:getiflist(),
  -    get_if(If).
  
positive.code: -module(siphost).
  -export([myip/0, myip_list/0, makeip/1]).
  
  makeip({A1, A2, A3, A4}) ->
      integer_to_list(A1) ++ "." ++
  	integer_to_list(A2) ++ "." ++
  
negative.code:     A = inet_parse:ntoa({A1, A2, A3, A4, A5, A6, A7, A8}),
      "[" ++ httpd_util:to_lower(A) ++ "]".
  
  
  %%====================================================================
  %% Internal functions
  %%====================================================================
  
  %%--------------------------------------------------------------------
  %% Function: get_iplist()
  %% Descrip.: Get the addresses of all interfaces that are not loopback
  %%           interfaces, and which are 'up'.
  %% Returns : Addresses = list() of string()
  %%--------------------------------------------------------------------
  get_iplist() ->
      {ok, If} = inet:getiflist(),
      get_if(If).
  
  %%--------------------------------------------------------------------
  %% Function: get_if(IfList)
  %%           IfList = list() of string(), list of interface names
  %% Descrip.: Get the addresses of all interfaces named in IfList that
  %%           are not loopback interfaces, and which are 'up'.
  %% Returns : Addresses = list() of string()
  %%--------------------------------------------------------------------
  get_if(L) ->
      get_if(L, []).
  
  