anchor.diff:      {ok, NewState};
   handle_messages([Message|Rest], NewState) ->
       ?DEBUG("Receive from ~p: ~p~n", [NewState#?STATE.address, Message]),
  +    ls_metrics:handle_packet_in(NewState#?STATE.datapath_mac, Message),
       case handle_message(Message, NewState) of
           {stop, Reason, State} ->
               {stop, Reason, State};
  
positive.code: 
  do_send(Msg, #?STATE{protocol = Protocol,
                       socket = Socket,
                       address = IpAddr} = _State) ->
      case of_protocol:encode(Msg) of
          {ok, EncodedMessage} ->
              ?DEBUG("Send to ~p: ~p~n", [IpAddr, Msg]),
  
negative.code:     connection_close_callback(SwitchHandler, HandlerState, AuxID),
      {stop, normal, State#?STATE{socket = undefined}}.
  
  connection_close_callback(Module, undefined, _) ->
      ?WARNING("Switch handler state for ~p undefined while closing connection ",
               [Module]);
  connection_close_callback(Module, HandlerState, 0) ->
      Module:terminate(driver_closed_connection, HandlerState);
  connection_close_callback(Module, HandlerState, _AuxID) ->
  