anchor.diff:  							{port, Port}]}],
   	{listen, Opts}.
   
  --spec change_state(EventInfo, StateData) -> Result
  -	when
  -		EventInfo :: term(),
  +-spec change_state(StateName, Event, StateData) -> Result
  +	when
  +		StateName :: atom(),
  +		Event :: term(),
   		StateData :: #statedata{},
   		Result :: {next_state, NextStateName, NewStateData}
   			| {next_state, NextStateName, NewStateData, Timeout}
  
positive.code: %% @doc Chnage the state of the fsm based on the event sent
  %% by the diameter service.
  %% @hidden
  change_state(start, StateData) ->
  	{next_state, started, StateData, 0};
  change_state({up, _, _, _, _}, StateData) ->
  	{next_state, started, StateData, 0};
  change_state({up, _, _, __}, StateData) ->
  	{next_state, started, StateData, 0};
  change_state({down, _, _,  _}, StateData) ->
  	{next_state, wait_for_stop, StateData, 0};
  change_state({reconnect, _, _}, StateData) ->
  	{next_state, started, StateData, 0};
  change_state({closed, _, _, _}, StateData) ->
  	{next_state, wait_for_stop, StateData, 0};
  change_state({watchdog, _, _, {_, down}, _}, StateData) ->
  	{next_state, wait_for_stop, StateData, 0};
  change_state({watchdog, _, _, _, _}, StateData) ->
  	{next_state, started, StateData, 0};
  change_state(stop, StateData) ->
  	{next_state, wait_for_stop, StateData, 0}.
  
  
negative.code: %%
  init([Address, Port] = _Args) ->
  	process_flag(trap_exit, true),
  	case initiate_service(?BASE_SERVICE, Address, Port, 0, ?BASE_SERVICE,
  			diameter_gen_base_rfc6733) of
  		{ok, TransRefBase} ->
  			StateData = #statedata{address = Address, port = Port,
  					transport_ref_base = TransRefBase},
  			{ok, wait_for_start, StateData, 0};
  		{error, Reason} ->
  			{stop, Reason}
  	end.
  
  
  -spec wait_for_start(Event, StateData) -> Result
  	when
  