anchor.diff:                loss_start = When})
     when N > 0 ->
       [{loss_indication, N, When} |
  -     queue:to_list(Q)];
  -to_list(Buf = ?OLDBUF) ->
  -    to_list(convert(Buf)).
  +     queue:to_list(Q)].
   
   -spec from_list([msg()]) -> #lpdb{}.
   from_list(Msgs) ->
       #lpdb{messages = queue:from_list(Msgs), size = length(Msgs)}.
   
   insert(Msg, Buf = #lpdb{messages = Q, size = Len}) ->
  -    Buf#lpdb{messages = queue:in(Msg, Q), size = Len+1};
  -insert(Msg, Buf = ?OLDBUF) ->
  -    insert(Msg, convert(Buf)).
  +    Buf#lpdb{messages = queue:in(Msg, Q), size = Len+1}.
   
   displace(Msg, Buf = #lpdb{}) ->
  -    insert(Msg, lose(1, drop(1, Buf)));
  -displace(Msg, Buf = ?OLDBUF) ->
  -    displace(Msg, convert(Buf)).
  +    insert(Msg, lose(1, drop(1, Buf))).
   
   -ifdef(TEST).
   
  
positive.code:   when N > 0 ->
      {{loss_indication, N, When},
       Buf#lpdb{loss_count = 0,
                loss_start = undefined}};
  pop(Buf = ?OLDBUF) ->
      pop(convert(Buf)).
  
  full(#lpdb{max_size = Max, size = N}) when N >= Max -> full;
  full(#lpdb{}) -> have_space;
  full(Buf = ?OLDBUF) -> full(convert(Buf)).
  
  empty(#lpdb{size = 0}) -> empty;
  empty(#lpdb{}) -> not_empty;
  empty(Buf = ?OLDBUF) -> empty(convert(Buf)).
  
  len(#lpdb{size=Len}) -> Len;
  len(Buf = ?OLDBUF) -> len(convert(Buf)).
  
  -spec to_list(buf()) -> [msg()].
  to_list(#lpdb{messages = Q,
  
negative.code: to_pkts(Buf = #lpdb{},
          Bytes, Fun) when is_integer(Bytes),
                           is_function(Fun, 1) ->
      to_pkts(Buf, Bytes, Bytes, Fun).
  
  to_pkts(Buf, BytesTotal, BytesRemaining, Fun)
    when BytesRemaining > 0 ->
  