anchor.diff:  start_binary_tree(_, _, _, _, _, _, _, _, {error, Reason}) ->
   	{error, Reason}.
   
  +-spec ipdr_codec({TimeStamp, Node, Server, Client, stop, Attributes}) -> IPDR
  +	when
  +		TimeStamp :: pos_integer(),
  +		Node :: node(),
  +		Server :: {Address, Port},
  +		Client :: {Address, Port},
  +		Address :: inet:ip_address(),
  +		Port :: pos_integer(),
  +		Attributes :: radius_attributes:attributes(),
  +		IPDR :: #ipdr{}.
  +%% @doc Convert `radius_acct' log entry to IPDR log entry. 
  +ipdr_codec({TimeStamp, _Node, _Server, _Client, stop, Attributes}) ->
  +	IPDR = #ipdr{ipdrCreationTime = iso8601(TimeStamp)},
  +	ipdr_codec1(TimeStamp, Attributes, IPDR).
  +%% @hidden
  +ipdr_codec1(TimeStamp, Attributes, Acc) ->
  +	case radius_attributes:find(?AcctDelayTime, Attributes) of
  +		{ok, DelayTime} ->
  +			EndTime = TimeStamp - (DelayTime * 1000),
  +			ipdr_codec2(EndTime, Attributes,
  +					Acc#ipdr{gmtSessionEndDateTime = iso8601(EndTime)});
  +		{error, not_found} ->
  +			ipdr_codec2(TimeStamp, Attributes,
  +					Acc#ipdr{gmtSessionEndDateTime = iso8601(TimeStamp)})
  +	end.
  +%% @hidden
  +ipdr_codec2(EndTime, Attributes, Acc) ->
  +	case radius_attributes:find(?AcctSessionTime, Attributes) of
  +		{ok, Duration} ->
  +			StartTime = EndTime - (Duration * 1000),
  +			ipdr_codec3(Attributes,
  +					Acc#ipdr{gmtSessionStartDateTime = iso8601(StartTime)});
  +		{error, not_found} ->
  +			ipdr_codec3(Attributes, Acc)
  +	end.
  +%% @hidden
  +ipdr_codec3(Attributes, Acc) ->
  +	case radius_attributes:find(?UserName, Attributes) of
  +		{ok, UserName} ->
  +			ipdr_codec4(Attributes, Acc#ipdr{username = UserName});
  +		{error, not_found} ->
  +			ipdr_codec4(Attributes, Acc)
  +	end.
  +%% @hidden
  +ipdr_codec4(Attributes, Acc) ->
  +	SessionID = radius_attributes:fetch(?AcctSessionId, Attributes),
  +	ipdr_codec5(Attributes, Acc#ipdr{acctSessionId = SessionID}).
  +%% @hidden
  +ipdr_codec5(Attributes, Acc) ->
  +	case radius_attributes:find(?FramedIpAddress, Attributes) of
  +		{ok, Address} ->
  +			ipdr_codec6(Attributes, Acc#ipdr{userIpAddress = inet:ntoa(Address)});
  +		{error, not_found} ->
  +			ipdr_codec6(Attributes, Acc)
  +	end.
  +%% @hidden
  +ipdr_codec6(Attributes, Acc) ->
  +	case radius_attributes:find(?CallingStationId, Attributes) of
  +		{ok, StationID} ->
  +			ipdr_codec7(Attributes, Acc#ipdr{callingStationId = StationID});
  +		{error, not_found} ->
  +			ipdr_codec7(Attributes, Acc)
  +	end.
  +%% @hidden
  +ipdr_codec7(Attributes, Acc) ->
  +	case radius_attributes:find(?CalledStationId, Attributes) of
  +		{ok, StationID} ->
  +			ipdr_codec8(Attributes, Acc#ipdr{calledStationId = StationID});
  +		{error, not_found} ->
  +			ipdr_codec8(Attributes, Acc)
  +	end.
  +%% @hidden
  +ipdr_codec8(Attributes, Acc) ->
  +	case radius_attributes:find(?NasIpAddress, Attributes) of
  +		{ok, Address} ->
  +			ipdr_codec9(Attributes, Acc#ipdr{nasIpAddress = inet:ntoa(Address)});
  +		{error, not_found} ->
  +			ipdr_codec9(Attributes, Acc)
  +	end.
  +%% @hidden
  +ipdr_codec9(Attributes, Acc) ->
  +	case radius_attributes:find(?NasIdentifier, Attributes) of
  +		{ok, Identifier} ->
  +			ipdr_codec10(Attributes, Acc#ipdr{nasId = Identifier});
  +		{error, not_found} ->
  +			ipdr_codec10(Attributes, Acc)
  +	end.
  +%% @hidden
  +ipdr_codec10(Attributes, Acc) ->
  +	case radius_attributes:find(?AcctSessionTime, Attributes) of
  +		{ok, SessionTime} ->
  +			ipdr_codec11(Attributes, Acc#ipdr{sessionDuration = SessionTime});
  +		{error, not_found} ->
  +			ipdr_codec11(Attributes, Acc)
  +	end.
  +%% @hidden
  +ipdr_codec11(Attributes, Acc) ->
  +	Octets = radius_attributes:fetch(?AcctInputOctets, Attributes),
  +	case radius_attributes:find(?AcctInputGigawords, Attributes) of
  +		{ok, GigaWords} ->
  +			GigaOctets = (GigaWords * (16#ffffffff + 1)) + Octets,
  +			ipdr_codec12(Attributes, Acc#ipdr{inputOctets = GigaOctets});
  +		{error, not_found} ->
  +			ipdr_codec12(Attributes, Acc#ipdr{inputOctets = Octets})
  +	end.
  +%% @hidden
  +ipdr_codec12(Attributes, Acc) ->
  +	Octets = radius_attributes:fetch(?AcctOutputOctets, Attributes),
  +	case radius_attributes:find(?AcctOutputGigawords, Attributes) of
  +		{ok, GigaWords} ->
  +			GigaOctets = (GigaWords * (16#ffffffff + 1)) + Octets,
  +			ipdr_codec13(Attributes, Acc#ipdr{outputOctets = GigaOctets});
  +		{error, not_found} ->
  +			ipdr_codec13(Attributes, Acc#ipdr{outputOctets = Octets})
  +	end.
  +%% @hidden
  +ipdr_codec13(Attributes, Acc) ->
  +	case radius_attributes:find(?Class, Attributes) of
  +		{ok, Class} ->
  +			ipdr_codec14(Attributes, Acc#ipdr{class = Class});
  +		{error, not_found} ->
  +			ipdr_codec14(Attributes, Acc)
  +	end.
  +%% @hidden
  +ipdr_codec14(Attributes, Acc) ->
  +	case radius_attributes:find(?AcctTerminateCause, Attributes) of
  +		{ok, Cause} ->
  +			Acc#ipdr{sessionTerminateCause = Cause};
  +		{error, not_found} ->
  +			Acc
  +	end.
  +
  
positive.code: 			{error, Reason}
  	end.
  %% @hidden
  ipdr_log1(IpdrLog, _Start, _End, eof) ->
  	ipdr_log5(IpdrLog, disk_log:close(IpdrLog));
  ipdr_log1(IpdrLog, Start, End, Cont) ->
  	ipdr_log2(IpdrLog, Start, End, disk_log:chunk(?RADACCT, Cont)).
  %% @hidden
  ipdr_log2(IpdrLog, _Start, _End, eof) ->
  	ipdr_log5(IpdrLog, disk_log:close(IpdrLog));
  ipdr_log2(IpdrLog, _Start, _End, {error, Reason}) ->
  	error_logger:error_report([disk_log:format_error(Reason),
  			{module, ?MODULE}, {log, ?RADACCT}, {error, Reason}]),
  	ipdr_log5(IpdrLog, disk_log:close(IpdrLog));
  ipdr_log2(IpdrLog, Start, End, {Cont, Accts}) ->
  	Fstart = fun(R) when element(1, R) < Start ->
  				true;
  			(_) ->
  				false
  	end,
  	case lists:dropwhile(Fstart, Accts) of
  		[] ->
  			ipdr_log2(IpdrLog, Start, End, disk_log:chunk(?RADACCT, Cont));
  		Accts1 ->
  			ipdr_log3(IpdrLog, Start, End, {Cont, Accts1})
  	end.
  %% @hidden
  ipdr_log3(IpdrLog, _Start, _End, eof) ->
  	ipdr_log5(IpdrLog, disk_log:close(IpdrLog));
  ipdr_log3(IpdrLog, _Start, _End, {error, Reason}) ->
  	error_logger:error_report([disk_log:format_error(Reason),
  			{module, ?MODULE}, {log, ?RADACCT}, {error, Reason}]),
  	ipdr_log5(IpdrLog, disk_log:close(IpdrLog));
  ipdr_log3(IpdrLog, Start, End, {Cont, Accts}) ->
  	Fend = fun(R) when element(1, R) < End ->
  				true;
  			(_) ->
  				false
  	end,
  	ipdr_log4(IpdrLog, Start, End, {Cont, Accts}, lists:takewhile(Fend, Accts)).
  %% @hidden
  ipdr_log4(IpdrLog, _Start, _End, {_Cont, _Accts}, []) ->
  	ipdr_log5(IpdrLog, disk_log:close(IpdrLog));
  ipdr_log4(IpdrLog, Start, End, {Cont, Accts}, Filtered) ->
  	case disk_log:log_terms(IpdrLog, Filtered) of
  		ok ->
  			case Filtered of
  				Accts ->
  					ipdr_log3(IpdrLog, Start, End, disk_log:chunk(?RADACCT, Cont));
  				_ ->
  					ipdr_log5(IpdrLog, disk_log:close(IpdrLog))
  			end;
  		{error, Reason} ->
  			error_logger:error_report([disk_log:format_error(Reason),
  					{module, ?MODULE}, {log, IpdrLog}, {error, Reason}]),
  			ipdr_log5(IpdrLog, disk_log:close(IpdrLog))
  	end.
  %% @hidden
  ipdr_log5(_IpdrLog, ok) ->
  	ok;
  
negative.code: 		Log :: disk_log:log(),
  		Start :: pos_integer(),
  		End :: pos_integer(),
  		Result :: eof | disk_log:continuation() | {error, Reason},
  		Reason :: term().
  %% @doc Binary tree search of multi file wrap disk_log.
  %% @private
  start_binary_tree(Log, Start, _End) ->
  