anchor.diff:  %% @see //stdlib/gen_fsm:terminate/3
   %% @private
   %%
  -terminate(_Reason, _StateName,  #statedata{transport_ref = TranstRef}	=
  -		_StateData) ->
  -	diameter:remove_transport(?BASE_SERVICE, TranstRef),
  +terminate(_Reason, _StateName,  #statedata{transport_ref_base = TransBase,
  +		transport_ref_nas = TransNas}	= _StateData) ->
  +	diameter:remove_transport(?BASE_SERVICE, TransBase),
  +	diameter:remove_transport(?NAS_SERVICE, TransNas),
   	diameter:stop_service(?BASE_SERVICE),
  +	diameter:stop_service(?NAS_SERVICE),
   	ok.
   
   -spec code_change(OldVsn, StateName, StateData, Extra) -> Result
  
positive.code: 							{port, Port}]}],
  	{listen, Opts}.
  
  -spec change_state(EventInfo, StateData) -> Result
  	when
  		EventInfo :: term(),
  		StateData :: #statedata{},
  		Result :: {next_state, NextStateName, NewStateData}
  			| {next_state, NextStateName, NewStateData, Timeout}
  
negative.code: %% @see //stdlib/gen_fsm:handle_info/3
  %% @private
  %%
  handle_info(#diameter_event{service = ?BASE_SERVICE, info = start},
  		_StateName, #statedata{address = Address, port = Port} = StateData) ->
  	case initiate_service(?NAS_SERVICE, Address, Port, 1, ?NAS_SERVICE,
  			 diameter_gen_nas_application_rfc7155) of
  		{ok, TransRefNas} ->
  			NewStateData = StateData#statedata{transport_ref_nas = TransRefNas},
  			{next_state, wait_for_start, NewStateData, 0};
  		{error, Reason} ->
  			{stop, Reason, StateData}
  	end;
  handle_info(#diameter_event{service = ?NAS_SERVICE, info = start},
  		_StateName, StateData) ->
  	{next_state, started, StateData, 0};
  handle_info(#diameter_event{service = SvcName, info = Event},
  		StateName, StateData) ->
  	change_state(StateName, Event, StateData).
  
  -spec terminate(Reason, StateName, StateData) -> any()
  	when
  