anchor.diff:           conn = false :: match(boolean() | pid())}).
                         %% true at accepted, pid() at connection_up or reopen
   
  -%% Record representing a peer_fsm process.
  +%% Record representing a peer process as implemented by
  +%% diameter_peer_fsm. The term "conn" is historical. Despite the name
  +%% here, comments refer to watchdog and peer processes, that are keys
  +%% in #peer{} and #conn{} records respectively. To add to the
  +%% confusion, a #request.transport is a peer process = key in a
  +%% #conn{} record. The actual transport process (that the peer process
  +%% knows about and that has a transport connection) isn't seen here.
   -record(conn,
           {pid   :: pid(),
            apps  :: [{0..16#FFFFFFFF, diameter:app_alias()}], %% {Id, Alias}
  
positive.code:          handler    :: match(pid()), %% request process
           transport  :: match(pid()), %% peer process
           caps       :: match(#diameter_caps{}),
           app        :: match(diameter:app_alias()),  %% #diameter_app.alias
           dictionary :: match(module()),     %% #diameter_app.dictionary
           module     :: match([module() | list()]),
                      %% #diameter_app.module
           filter     :: match(diameter:peer_filter()),
           packet     :: match(#diameter_packet{})}).
  
  
negative.code:     insert(PeerT, P#peer{op_state = {OS, To}}),
      send_event(SvcName, {watchdog, Ref, TPid, {From, To}, {T, Opts}}),
      ok;
  %% Death of a watchdog process (#peer.pid) results in the removal of
  %% it's peer and any associated conn record when 'DOWN' is received
  %% (after this) but the states will be {?STATE_UP, ?WD_DOWN} for a
  %% short time. (No real problem since ?WD_* is only used in
  %% service_info.) We set ?WD_OKAY as a consequence of connection_up
  %% since we know a watchdog is coming. We can't set anything at
  %% connection_down since we don't know if the subsequent watchdog
  %% message will be ?WD_DOWN or ?WD_SUSPECT. We don't (yet) set
  %% ?STATE_* as a consequence of a watchdog message since this requires
  %% changing some of the matching on ?STATE_*.
  %%
  %% Death of a peer process process (#conn.pid, #peer.conn) results in
  %% connection_down followed by watchdog ?WD_DOWN. The latter doesn't
  %% result in the conn record being deleted since 'DOWN' from death of
  %% its watchdog doesn't (yet) deal with the record having been
  %% removed.
  
  %% Monitor process has died. Just die with a reason that tells
  %% diameter_config about the happening. If a cleaner shutdown is
  