anchor.diff:  		[Service |  _] ->
   			case catch diameter:service_info(Service, transport) of
   				{value, PacketsIn} when Item == in ->
  -					search(PacketsIn);
  +					total_packets(PacketsIn);
   				{value, PacketsOut} when Item == out ->
  -					search(PacketsOut);
  +					total_packets(PacketsOut);
   				{error, Reason} ->
   					genErr2
   			end;
  
positive.code: %%----------------------------------------------------------------------
  %% internal functions
  %----------------------------------------------------------------------
  -spec search(Info) -> Result
  	when
  		Info :: [tuple()],
  		Result :: {ok, {PacketsIn, PacketsOut}} | {error, Reason},
  
negative.code: 		Reason :: term().
  %% @doc Get packet counts from service info.
  
  total_packets(Info) ->
  	total_packets(Info, {0, 0}).
  %% @hidden
  total_packets([H | T], Acc) ->
  	case lists:keyfind(accept, 1, H) of
  		{_, L} ->
  			case total_packets1(L, Acc) of
  				{ok, Acc1} ->
  					total_packets(T, Acc1);
  				{error, Reason} ->
  					total_packets(T, Acc)
  			end;
  		false ->
  			{error, not_found}
  	end;
  total_packets([], Acc) ->
  	{ok, Acc}.
  %% @hidden
  total_packets1([H | T], Acc) ->
  	case lists:keyfind(port, 1, H) of
  		{_, L} ->
  			case total_packets2(L, Acc) of
  				{ok, Acc1} ->
  					total_packets1(T, Acc1);
  				{error, Reason} ->
  					{error, Reason}
  			end;
  		false ->
  			total_packets1(T, Acc)
  	end;
  total_packets1([], Acc) ->
  	{ok, Acc}.
  %% @hidden
  total_packets2(L1, Acc) ->
  	case lists:keyfind(statistics, 1, L1) of
  		{_, L2} ->
  			total_packets3(L2, Acc);
  		false ->
  			{error, not_found}
  	end.
  %% @hidden
  total_packets3(L, {PacketsIn, PacketsOut}) ->
  	case lists:keyfind(recv_cnt, 1, L) of
  		{_, N} ->
  			total_packets4(L, {PacketsIn + N, PacketsOut});
  		false ->
  			{error, not_found}
  	end.
  %% @hidden
  total_packets4(L, {PacketsIn, PacketsOut}) ->
  	case lists:keyfind(send_cnt, 1, L) of
  		{_, N} ->
  			{ok, {PacketsIn, PacketsOut + N}};
  		false ->
  			{error, not_found}
  	end.
  
  