anchor.diff:  %% Ignore an unsolicited DPA in particular. Note that dpa_timeout
   %% deals with the case in which the peer sends the wrong identifiers
   %% in DPA.
  -rcv('DPA' = N, #diameter_packet{header = H}, _) ->
  +handle('DPA' = N, #diameter_packet{header = H}, _) ->
       ?LOG(ignored, N),
       %% Note that these aren't counted in the normal recv counter.
       diameter_stats:incr({diameter_codec:msg_id(H), recv, ignored}),
       ok;
   
  -rcv(_, _, _) ->
  +handle(_, _, _) ->
       ok.
   
   %% incr/3
  
positive.code: 
  %% incoming/2
  
  incoming({recv = T, Name, Pkt}, #state{parent = Pid, ack = Ack} = S) ->
      Pid ! {T, self(), get_route(Ack, Pkt), Name, Pkt},
      rcv(Name, Pkt, S);
  
  incoming(#diameter_header{is_request = R}, #state{transport = TPid,
                                                    ack = Ack}) ->
      R andalso Ack andalso send(TPid, false),
  
negative.code:     ?LOG(Reason, T),
      ok.
  
  %% handle/3
  
  %% Incoming CEA.
  handle('CEA' = N,
         #diameter_packet{header = #diameter_header{end_to_end_id = Eid,
                                                    hop_by_hop_id = Hid}}
         = Pkt,
         #state{state = {'Wait-CEA', Hid, Eid}}
         = S) ->
      ?LOG(recv, N),
      handle_CEA(Pkt, S);
  
  %% Incoming CER
  handle('CER' = N, Pkt, #state{state = recv_CER} = S) ->
      handle_request(N, Pkt, S);
  
  %% Anything but CER/CEA in a non-Open state is an error, as is
  %% CER/CEA in anything but recv_CER/Wait-CEA.
  handle(Name, _, #state{state = PS})
    when PS /= 'Open';
         Name == 'CER';
         Name == 'CEA' ->
      {stop, {Name, PS}};
  
  handle('DPR' = N, Pkt, S) ->
      handle_request(N, Pkt, S);
  
  %% DPA in response to DPR, with the expected identifiers.
  handle('DPA' = N,
         #diameter_packet{header = #diameter_header{end_to_end_id = Eid,
                                                    hop_by_hop_id = Hid}
                                 = H}
         = Pkt,
      #state{dictionary = Dict0,
             transport = TPid,
             dpr = {X, Hid, Eid},
  