anchor.diff:  %% ------------------------------------------------------------------
   
   init([DatapathId]) ->
  -    gen_server:cast(self(), init),
       {ok, #?STATE{datapath_id = DatapathId}}.
   
   % handle API
  
positive.code: handle_call({get_async_subscribe, _Module}, _From, State) ->
      {reply, ok, State};
  handle_call(terminate, _From, State) ->
      {reply, ok, State};
  
  % handle callbacks from of_driver
  handle_call({init, IpAddr, DatapathId, Features, Version, Connection, Opt}, _From, State = #?STATE{datapath_id = DatapathId}) ->
      % switch connected to of_driver.
      % this is the main connection.
      State1 = State#?STATE{
          ipaddr = IpAddr,
          features = Features,
          of_version = Version,
          main_connection = Connection,
          aux_connections = [],
          callback_mod = get_opt(callback_mod, Opt),
          opt = Opt
      },
      {reply, {ok, self()}, State1};
  handle_call({connect, _IpAddr, _DatapathId, _Features, _Version, Connection, AuxId, _Opt}, _From, State = #?STATE{aux_connections = AuxConnections}) ->
      State1 = State#?STATE{aux_connections = [{AuxId, Connection} | AuxConnections]},
      % switch connected to of_driver.
  
negative.code: %% ------------------------------------------------------------------
  
  do_callback(Module, Function, Args) ->
      erlang:apply(Module, Function, Args).
  
  get_opt(Key, Options) ->
      Default = case application:get_env(ofs_handler, Key) of
  