anchor.diff:  %%    code, the missing vendor id, and a zero filled payload of the minimum
   %%    required length for the omitted AVP will be added.
   
  -%% incr_rc/5
  +%% incr_result/5
   %%
   %% Increment a stats counter for result codes in incoming and outgoing
   %% answers.
   
   %% Outgoing message as binary: don't count. (Sending binaries is only
   %% partially supported.)
  -incr_rc(_, #diameter_packet{msg = undefined = No}, _, _, _) ->
  +incr_result(_, #diameter_packet{msg = undefined = No}, _, _) ->
       No;
   
   %% Incoming or outgoing. Outgoing with encode errors never gets here
   %% since encode fails.
  -incr_rc(Dir, Pkt, Dict, TPid, Dict0) ->
  +incr_result(Dir, Pkt, TPid, {Dict, AppDict, Dict0}) ->
       #diameter_packet{header = #diameter_header{is_error = E}
                               = Hdr,
                        msg = Msg,
                        errors = Es}
           = Pkt,
   
  -    Id = msg_id(Hdr, Dict),
  +    Id = msg_id(Hdr, AppDict),
   
       %% Count incoming decode errors.
  -    recv /= Dir orelse [] == Es orelse incr_error(Dir, Id, TPid, Dict),
  +    recv /= Dir orelse [] == Es orelse incr_error(Dir, Id, TPid, AppDict),
   
       %% Exit on a missing result code.
       T = rc_counter(Dict, Msg),
  
positive.code: send_A({Caps, Pkt, App, {T, EvalPktFs, EvalFs}}, TPid, Dict0, RecvData) ->
      send_A(answer(T, Caps, Pkt, App, Dict0, RecvData),
             TPid,
             Dict0,
             Pkt,
             EvalPktFs,
             EvalFs);
  
negative.code: %% an encoded binary. This isn't the usual case and doesn't properly
  %% support retransmission but is useful for test.
  
  encode(Dict, TPid, Pkt)
    when is_atom(Dict) ->
      encode({Dict, Dict}, TPid, Pkt);
  
  %% A message to be encoded.
  encode(DictT, TPid, #diameter_packet{bin = undefined} = Pkt) ->
      {Dict, AppDict} = DictT,
      try
          diameter_codec:encode(Dict, Pkt)
      catch
          exit: {diameter_codec, encode, T} = Reason ->
              incr_error(send, T, TPid, AppDict),
              exit(Reason)
      end;
  
  