anchor.diff:  handle_call(_Request, _From, State) ->
       {reply, ok, State}.
   
  +handle_cast({handle_message, DatapathId, Msg}, State) ->
  +    % TODO - list of old stats
  +    update_folsom(process_reply(DatapathId, Msg)),
  +    {noreply, State};
   handle_cast(_Msg, State) ->
       {noreply, State}.
   
   handle_info(poll_stats, State = #?STATE{of_version = Version,
  -                                        datapath_id = DatapathId}) ->
  -    ok = poll_stats(Version, DatapathId),
  +                                        datapath_id = DatapathId,
  +                                        stats = Stats}) ->
  +    ok = poll_stats(Version, Stats, DatapathId),
       {noreply, State};
   handle_info(_Info, State) ->
       {noreply, State}.
  
positive.code: stats_msg(Version, meter) ->
      of_msg_lib:get_meter_stats(Version, all).
  
  
negative.code: -include_lib("loom/include/loom_logger.hrl").
  
  -define(DEFAULT_STATS_INTERVAL, 10).
  -define(DEFAULT_STATS, [flow, table, aggregate, port, queue, group, meter]).
  
  -record(?STATE, {
      stats,
      stats_interval, 
      interval_timer,
      of_version,
      datapath_id
  }).
  
  -record(flow_stat, {
      table_id :: integer(),
      priority :: binary(),
      cookie :: binary(),
      duration_sec :: integer(),
      duration_nsec :: integer(),
      byte_count :: integer(),
      packet_count :: integer()
  }).
  
  -record(table_stat, {
      table_id :: integer(),
      active_count :: integer(),
      lookup_count :: integer(),
      matched_count :: integer()
  }).
  
  -record(aggregate_stat, {
      packet_count :: integer(),
      byte_count :: integer(),
      flow_count :: integer()
  }).
  
  -record(port_stat, {
      port_no :: integer(),
      rx_packets :: integer(),
      tx_packets :: integer(),
      rx_bytes :: integer(),
      tx_bytes :: integer(),
      rx_dropped :: integer(),
      tx_dropped :: integer(),
      rx_errors :: integer(),
      tx_errors :: integer(),
      rx_frame_err :: integer(),
      rx_over_err :: integer(),
      rx_crc_err :: integer(),
      collisions :: integer(),
      duration_sec :: integer(),
      duration_nsec :: integer()
  }).
  
  -record(queue_stat, {
      port_no :: integer(),
      queue_id :: integer(),
      tx_bytes :: integer(),
      tx_packets :: integer(),
      tx_errors :: integer(),
      duration_sec :: integer(),
      duration_nsec :: integer()
  }).
  
  -record(group_stat, {
      group_id :: integer(),
      ref_count :: integer(),
      packet_count :: integer(),
      byte_count :: integer(),
      duration_sec :: integer(),
      duration_nsec :: integer(),
      bucket_stats :: [bucket_stat()]
  }).
  
  -record(bucket_stat, {
      bucket_id :: integer(),
      packet_count :: integer(),
      byte_count :: integer()
  }).
  -type bucket_stat() :: #bucket_stat{}.
  
  -record(meter_stat, {
      meter_id :: integer(),
      flow_count :: integer(),
      packet_in_count :: integer(),
      byte_in_count :: integer(),
      duration_sec :: integer(),
      duration_nsec :: integer(),
      band_stats :: [band_stat()]
  }).
  
  -record(band_stat, {
      band_id :: integer(),
      packet_band_count :: integer(),
      byte_band_count :: integer()
  }).
  -type band_stat() :: #band_stat{}.
  
  % XXX subscribe to all replies
  
  %% ------------------------------------------------------------------
  %% API Function Exports
  %% ------------------------------------------------------------------
  
  -export([start_link/2,
           handle_message/2]).
  
  %% ------------------------------------------------------------------
  %% gen_server Function Exports
  