anchor.diff:       {dictionary, Dict},
        {module, ModX},
        {id, Id}].
  +
  +%% info_pending/1
  +%%
  +%% One entry for each outgoing request whose answer is outstanding.
   
   info_pending(#state{} = S) ->
       MatchSpec = [{{'$1',
  
positive.code: info_conn([] = No) ->
      No.
  
  info_caps(#diameter_caps{} = C) ->
      lists:zip(record_info(fields, diameter_caps), tl(tuple_to_list(C))).
  
  
negative.code:     diameter_stats:read(lists:append(Peers)).
  %% TODO: include peer identities in return value
  
  %% info_transport/1
  %%
  %% One entry per configured transport. Statistics for each entry are
  %% the accumulated values for the ref and associated peer pids.
  
  info_transport(S) ->
      PeerD = peer_dict(S),
      RefsD = dict:map(fun(_, Ls) -> [P || L <- Ls, {peer, {P,_}} <- L] end,
                       PeerD),
      Refs = lists:append(dict:fold(fun(R, Ps, A) -> [[R|Ps] | A] end,
                                    [],
                                    RefsD)),
      Stats = diameter_stats:read(Refs),
      dict:fold(fun(R, Ls, A) ->
                        Ps = dict:fetch(R, RefsD),
                        [[{ref, R} | transport(Ls)] ++ [stats([R|Ps], Stats)]
                         | A]
                end,
                [],
                PeerD).
  
  transport([[{type, connect} | _] = L]) ->
      L;
  
  transport([[{type, accept}, {options, Opts} | _] | _] = Ls) ->
      [{type, listen},
       {options, Opts},
       {accept, [lists:nthtail(2,L) || L <- Ls]}].
  %% Note that all peer records for a listening transport (ie. same Ref)
  %% have the same options. (TODO)
  
  peer_dict(#state{peerT = PeerT, connT = ConnT}) ->
      ets:foldl(fun(T,A) -> peer_acc(ConnT, A, T) end, dict:new(), PeerT).
  
  peer_acc(ConnT, Acc, #peer{pid = Pid,
                             type = Type,
                             ref = Ref,
                             options = Opts,
                             op_state = OS,
                             started = T,
                             conn = TPid}) ->
      WS = wd_state(OS),
      dict:append(Ref,
                  [{type, Type},
  