anchor.diff:                       data = [] :: [{RSN::non_neg_integer(),
                                       TS::non_neg_integer(),
                                       Data::binary()}],
  -                     state = closed :: 'closed' | 'established' | 'error'
  +                     state = closed :: 'closed' | 'established' |
  +                                       'error' | 'finished'
                       }).
   
   -spec init(TS::non_neg_integer(), #tcp{}) -> #tcp_stream{}.
   init(TS, #tcp{syn=true, seq_no=ISN, data= D}) ->
       #tcp_stream{isn=ISN, start_time=TS,
                   data = [{0, TS, D}],
  -                state = established}.
  +                state = established};
  +init(_TS, #tcp{}) ->
  +    #tcp_stream{state = error}.
   
  -update(TS, Pkt = #tcp{seq_no = S, data = Data},
  +
  +update(TS, Pkt = #tcp{seq_no = S, data = Data, ack = true},
          S0 = #tcp_stream{isn=ISN,
                           data=Acc, state=established}) ->
       RelativeSN = S - ISN,
  
positive.code:                 {<<>>, []},
                  Data).
  
  reassemble({0, TS, Data}, {<<>>, []}) ->
      {Data, [{TS, syn, 0, 0}]};
  reassemble({RSN, RTS, Data}, {Stream, Offsets})
  
negative.code:             I =< Idx,
              Idx =< J ].
  
  oddballs(Offsets) ->
      [ {TS, Type} || {TS, Type, _, _} <- Offsets,
                      Type =/= normal, Type =/= syn ].
  %%====================================================================
  %% Internal functions
  %%====================================================================
  