anchor.diff:      Header = <<?IP_VERSION:4, HLen:4, DiffServ:8, TotLen:16,
                 ID:16, Flags:3/bits, FragOff:13, TTL:8, Proto:8, 0:16,
                 SrcIP:4/binary, DestIP:4/binary, RestDgram/binary>>,
  -    checksum(Header).
  -
  -checksum(Bin) when is_binary(Bin) ->
  -    lists:foldl(fun checksum/2,
  -                0,
  -                [N || <<N:16/big>> <= Bin]).
  -
  -%% 16 bits Ones complement addition.
  -checksum(A, Sum) ->
  -    case A + Sum of
  -        N when N > 16#FFFF ->
  -            N - 16#10000 + 1;
  -        N when N =< 16#FFFF ->
  -            N
  -    end.
  +    enet_checksum:oc16_sum(Header).
   
   decode_option_type(0,  0) -> eool;
   decode_option_type(0,  1) -> nop;
  
positive.code:   when is_integer(HLen), is_integer(DiffServ),
         is_integer(TotLen), is_integer(ID),
         is_bitstring(Flags), is_integer(FragOff), is_integer(TTL),
         is_integer(HdrChkSum), is_binary(SrcIP), is_binary(DestIP),
         is_binary(Data), is_binary(Options) ->
      OptsLen = byte_size(Options),
  
negative.code:                                                  is_integer(HdrChkSum) ->
      HeaderLen = 4 * HLen,
      <<Header:HeaderLen/binary, _/binary>> = Dgram,
      enet_checksum:oc16_check(Header, HdrChkSum).
  
  header_checksum(#ipv4{vsn=?IP_VERSION,
                        hlen=HLen,
  