anchor.diff:  -define(CANCEL, 8:8).
   -define(PORT, 9:8).
   
  +%% FAST EXTENSION Packet types
  +-define(SUGGEST, 13:8).
  +-define(HAVE_ALL, 14:8).
  +-define(HAVE_NONE, 15:8).
  +-define(REJECT_REQUEST, 16:8).
  +-define(ALLOWED_FAST, 17:8).
  +
   %%====================================================================
   %% API
   %%====================================================================
  
positive.code: 	    {cancel, Index, Begin, Len} ->
  		<<?CANCEL, Index:32/big, Begin:32/big, Len:32/big>>;
  	    {port, PortNum} ->
  		<<?PORT, PortNum:16/big>>
          end,
      Sz = size(Datagram),
      Res = gen_tcp:send(Socket, <<Sz:32/big, Datagram/binary>>),
  
negative.code: %%--------------------------------------------------------------------
  recv_message(Rate, Message) ->
      MSize = size(Message),
      Decoded =
  	case Message of
  	    <<>> ->
  		keep_alive;
  	    <<?CHOKE>> ->
  		choke;
  	    <<?UNCHOKE>> ->
  		unchoke;
  	    <<?INTERESTED>> ->
  		interested;
  	    <<?NOT_INTERESTED>> ->
  		not_interested;
  	    <<?HAVE, PieceNum:32/big>> ->
  		{have, PieceNum};
  	    <<?BITFIELD, BitField/binary>> ->
  		{bitfield, BitField};
  	    <<?REQUEST, Index:32/big, Begin:32/big, Len:32/big>> ->
  		{request, Index, Begin, Len};
  	    <<?PIECE, Index:32/big, Begin:32/big, Data/binary>> ->
  		{piece, Index, Begin, Data};
  	    <<?CANCEL, Index:32/big, Begin:32/big, Len:32/big>> ->
  		{cancel, Index, Begin, Len};
  	    <<?PORT, Port:16/big>> ->
  		{port, Port};
  	    %% FAST EXTENSION MESSAGES
  	    <<?SUGGEST, Index:32/big>> ->
  		{suggest, Index};
  	    <<?HAVE_ALL>> ->
  		have_all;
  	    <<?HAVE_NONE>> ->
  		have_none;
  	    <<?REJECT_REQUEST, Index:32, Offset:32, Len:32>> ->
  		{reject_request, Index, Offset, Len};
  	    <<?ALLOWED_FAST, FastSet/binary>> ->
  		{allowed_fast, decode_allowed_fast(FastSet)}
  	end,
      {Decoded, etorrent_rate:update(Rate, MSize), MSize}.
  
  %%--------------------------------------------------------------------
  