anchor.diff:  		secret :: binary(),
   		session_id:: {NAS :: inet:ip_address() | string(),
   				Port :: string(), Peer :: string()},
  -		socket :: term()}).
  +		socket :: term(),
  +		subscriber :: binary()}).
   
   -define(TIMEOUT, 30000).
   
  
positive.code: %% @@see //stdlib/gen_fsm:StateName/2
  %% @private
  %%
  idle(timeout, StateData)->
  	{stop, shutdown, StateData};
  idle(_Event, StateData) ->
  	{stop, not_implemented_yet, StateData}.
  
  -spec handle_event(Event :: term(), StateName :: atom(),
  		StateData :: #statedata{}) ->
  
negative.code: %%  internal functions
  %%----------------------------------------------------------------------
  
  -spec send_response( RadiusCode :: integer(), RadiusID :: byte(),
  		RadiusAttributes :: radius_attributes:attributes(),
  		RequestAuthenticator :: binary() | [byte()], Secret :: binary(),
  		RadiusFsm :: pid()) -> ok.
  %% @doc Sends an RADIUS-Access/Challenge or Reject or Accept  packet to peer
  %% @hidden
  send_response(RadiusCode, RadiusID, RadiusAttributes,
  		RequestAuthenticator, Secret, RadiusFsm) ->
  erlang:display({radiuscode, RadiusCode}),
  	AttributeList1 = radius_attributes:store(?MessageAuthenticator,
  		<<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>, RadiusAttributes),
  	Attributes1 = radius_attributes:codec(AttributeList1),
  	Length = size(Attributes1) + 20,
  	MessageAuthenticator = crypto:hmac(md5, Secret, [<<RadiusCode, RadiusID,
  			Length:16>>, RequestAuthenticator, Attributes1]),
  	AttrbuteList2 = radius_attributes:store(?MessageAuthenticator,
  			MessageAuthenticator, AttributeList1),
  	Attributes2 = radius_attributes:codec(AttrbuteList2),
  	ResponseAuthenticator = crypto:hash(md5, [<<RadiusCode, RadiusID,
  			Length:16>>, RequestAuthenticator, Attributes2, Secret]),
  	Response = #radius{code = RadiusCode, id = RadiusID,
  			authenticator = ResponseAuthenticator, attributes = Attributes2},
  	ResponsePacket = radius:codec(Response),
  	radius:response(RadiusFsm, {response, ResponsePacket}),
  	ok.
  