anchor.diff:  %% Internal Function Definitions
   %% ------------------------------------------------------------------
   
  -poll_stats(Version, DatapathId) ->
  -    ofs_handler:sync_send_list(DatapathId, stats_msgs(Version)).
  -
  -stats_msgs(Version) ->
  -    [].
  +update_folsom({flows, Stats}) ->
  +    ok.
  +
  +poll_stats(Version, Stats, DatapathId) ->
  +    Requests = stats_msgs(Stats, Version),
  +    ok = ofs_handler:send_list(DatapathId, Requests).
  +
  +stats_msgs(Version, Stats) ->
  +    [stats_msg(Version, Stat) || Stat <- Stats].
   
   stats_msg(Version, flow) ->
       of_msg_lib:get_flow_statistics(Version, all, [], []);
   stats_msg(Version, table) ->
       of_msg_lib:get_table_stats(Version);
  +stats_msg(Version, aggregate) ->
  +    of_msg_lib:get_aggregate_statistics(Version, all, [], []);
   stats_msg(Version, port) ->
       of_msg_lib:get_port_statistics(Version, all);
   stats_msg(Version, queue) ->
  
positive.code: -include_lib("loom/include/loom_logger.hrl").
  
  -define(DEFAULT_STATS_INTERVAL, 10).
  -define(STATS, [flow, table, port, queue, group, meter]).
  
  -record(?STATE, {
      stats_interval, 
      interval_timer,
      of_version,
      datapath_id
  }).
  
  %% ------------------------------------------------------------------
  %% API Function Exports
  %% ------------------------------------------------------------------
  
  -export([start_link/2]).
  
  %% ------------------------------------------------------------------
  %% gen_server Function Exports
  
negative.code: start_link(Version, DatapathId) ->
      gen_server:start_link({local, ?SERVER}, ?MODULE, [Version, DatapathId], []).
  
  handle_message(Msg, State) ->
      % datapath id from State
      DatapathId = '1234',
      gen_server:cast(?SERVER, {handle_message, DatapathId, Msg}),
      ok.
  
  %% ------------------------------------------------------------------
  %% gen_server Function Definitions
  %% ------------------------------------------------------------------
  
  init([Version, DatapathId]) ->
      Stats = application:get_env(loom, stats, ?DEFAULT_STATS),
      StatsInterval = application:get_env(loom, stats_interval_sec, ?DEFAULT_STATS_INTERVAL),
      IntervalTimer = timer:send_interval(StatsInterval * 1000, poll_stats),
      State = #?STATE{stats = Stats,
                      stats_interval = StatsInterval,
                      interval_timer = IntervalTimer,
                      of_version = Version,
                      datapath_id = DatapathId},
  