anchor.diff:           terminate/2,
            code_change/3]).
   
  +-record(iface, {name,
  +                status = down,
  +                opts = []}).
  +
  +-record(sub, {name, field, pid, ref}).
  +
   -record(st, {connected = false,
  -             subscribers = []}).
  +             ifs = [],
  +             subscribers = [],
  +             poll_ref}).
   
   -define(BADARG, {?MODULE, '__BADARG__'}).
   
  
positive.code:     call(is_network_up).
  
  subscribe() ->
      call(subscribe).
  
  start_link() ->
      gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
  
  init(_) ->
      {ok, #st{}}.
  
  handle_call(is_network_up, _From, #st{connected = Conn} = St) ->
      {reply, Conn, St};
  handle_call(subscribe, {Pid, _}, #st{subscribers = Subs} = St) ->
      Ref = erlang:monitor(process, Pid),
      {reply, ok, St#st{subscribers = [{Pid, Ref}|Subs]}};
  handle_call(_, _From, St) ->
      {reply, ?BADARG, St}.
  
  handle_cast(_, St) ->
      {noreply, St}.
  
  handle_info(_, St) ->
      {noreply, St}.
  
  
negative.code: -behaviour(gen_server).
  
  -export([is_network_up/0,
           subscribe/0, subscribe/1, subscribe/2]).
  
  -export([start_link/0]).
  
  