anchor.diff:  init(Args) ->
       process_flag(trap_exit, true),
       Interface = proplists:get_value(interface, Args),
  -    {ok, S} = procket:open(0, [{protocol, 16#112}, {type, raw}, {family, packet},
  -                               {interface, Interface}]),
  -    Port = erlang:open_port({fd, S, S}, [binary, stream]),
  +
  +    %% This is a bit ugly! We use a NIF to create the sockets and then
  +    %% we trick gen_udp into giving us the data, including the source
  +    %% address (i.e. recvfrom()).
  +    {R, _W} = vrrp_socket:create_socket(ipv4, Interface),
  +    {ok, Socket} = gen_udp:open(0, [{fd, R}, binary]),
  +    ok = gen_udp:controlling_process(Socket, self()),
  +
  +    %%% Rinse and repeat for the v6 and writer sockets...
  +
  +    %% Done
       {ok, #state{
               interface = Interface,
  -            port = Port,
  +            v4_rsocket = Socket,
               mapping = dict:new()}}.
   
   %%--------------------------------------------------------------------
  
positive.code: 
  -record(state, {
            interface,   %% Physical interface we are running on
            port,
            mapping      %% Dict of Id -> FSM Pid
           }).
  
  
negative.code:     %% One of our FSM's has shutdown normally...
      ND = dict:filter(fun(_K, {VP, _VR}) -> VP =/= Pid end, D),
      {noreply, State#state{mapping = ND}};
  handle_info({udp, _Socket, Source, _Zero, Pkt}, State) ->
      {noreply, handle_packet(verify_packet(Source, Pkt, State))};
  handle_info(Info, State) ->
      io:format("vrrp_interface received: ~p~n", [Info]),
      {noreply, State}.
  