anchor.diff:      Port = enet_tap:open(Device),
       {ok, S#state{port=Port
                    ,osifconfig=IfConfig
  -                 ,pubsub=pubsub:publish()}}.
  +                 ,pubsub=pubsub:new()}}.
   
   %%--------------------------------------------------------------------
   %% @private
  
positive.code: %% @end
  %%--------------------------------------------------------------------
  start_link(Device, IfConfig) when is_list(Device), is_list(IfConfig) ->
      gen_server:start_link(?MODULE, [#state{dev=Device}, IfConfig], []).
  
  start(Device, IfConfig) when is_list(Device), is_list(IfConfig) ->
      gen_server:start(?MODULE, [#state{dev=Device}, IfConfig], []).
  
negative.code:     ?WARN("Unexpected info ~p", [Info]),
      {noreply, State}.
  
  handle_frame(Frame, S) ->
      case enet_codec:decode(eth, Frame, [eth]) of
          E = #eth{dst=D} when D =:= S#state.mac; D =:= broadcast ->
              %% Frames destined for me.
              publish_rx(Frame, E, S);
          E = #eth{} when S#state.promisc =:= true ->
              %% Frames destined for something else but we're in promiscuous mode.
              publish_rx(Frame, E, S);
          Frame when S#state.promisc =:= true ->
              publish_rx(Frame, unknown, S);
          _ ->
              drop_frame
      end,
      {noreply, S}.
  
  %%--------------------------------------------------------------------
  