anchor.diff:  
   -define(MASK(N,I), ((I) band (1 bsl (N)))).
   
  +-type u32() :: 0..16#FFFFFFFF.
  +-type u24() :: 0..16#FFFFFF.
  +-type u1()  :: 0..1.
  +
   %%     0                   1                   2                   3
   %%     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   %%    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  
positive.code: %% Note that the returned list of AVP's is reversed relative to their
  %% order in the binary. Note also that grouped avp's aren't unraveled,
  %% only those at the top level.
  
  collect_avps(#diameter_packet{bin = Bin}) ->
      <<_:20/binary, Avps/bitstring>> = Bin,
  
negative.code: %%% # msg_id/1
  %%% ---------------------------------------------------------------------------
  
  -spec msg_id(#diameter_packet{} | #diameter_header{})
     -> {ApplicationId :: u32(), CommandCode :: u24(), Rbit :: u1()}.
  
  msg_id(#diameter_packet{msg = [#diameter_header{} = Hdr | _]}) ->
      msg_id(Hdr);
  
  