anchor.diff:  
   idle({join_request, Seq, Elements, #capwap_header{
   			   radio_id = RadioId, wb_id = WBID, flags = Flags}},
  -     State = #state{peer = {Address, _}}) ->
  +     State0 = #state{peer = {Address, _}}) ->
       ?DEBUG(?GREEN "Join-Request: ~p~n", [Elements]),
  +
       SessionId = proplists:get_value(session_id, Elements),
       capwap_wtp_reg:register_sessionid(Address, SessionId),
  +
  +    MacTypes = ie(wtp_mac_type, Elements),
  +    TunnelModes = ie(wtp_frame_tunnel_mode, Elements),
  +    State1 = State0#state{mac_types = MacTypes, tunnel_modes = TunnelModes},
  +
       RespElements = ac_info() ++ [#result_code{result_code = 0}],
       Header = #capwap_header{radio_id = RadioId, wb_id = WBID, flags = Flags},
  -    State1 = send_response(Header, join_response, Seq, RespElements, State),
  -    next_state(join, State1);
  +    State = send_response(Header, join_response, Seq, RespElements, State1),
  +    next_state(join, State);
   
   idle({Msg, Seq, Elements, Header}, State) ->
       ?DEBUG(?RED "in IDLE got unexpexted: ~p~n", [{Msg, Seq, Elements, Header}]),
  
positive.code: 
  handle_capwap_data(_Sw, Address, Port,
  		   Header = #capwap_header{
  		     radio_id = RadioId, wb_id = WBID},
  		   false, Frame) ->
      ?DEBUG(?BLUE "CAPWAP Data PayLoad:~n~p~n~p~n", [Header, Frame]),
  
negative.code: -behaviour(gen_fsm).
  
  %% API
  -export([start_link/1, accept/3, get_peer_data/1, get_peer_mode/1]).
  
  %% gen_fsm callbacks
  -export([init/1, listen/2, idle/2, join/2, configure/2, data_check/2, run/2,
  