anchor.diff:  %% d(F) ->
   %%     d(F, []).
   
  -%% d(F, A) ->
  -%%     io:format("~w:" ++ F ++ "~n", [?MODULE|A]).
  +d(F, A) ->
  +    io:format("~w:" ++ F ++ "~n", [?MODULE|A]).
  
positive.code:   [#{addr   := #{family := Fam, addr := PAddr},
       length := PLen} = Prefix|Prefixes],
    #{length := SPLen} = SPrefix) when (Fam =:= inet6) ->
      %% d("shortest_matching_prefix(~w) -> entry with"
      %%   "~n   Addr:   ~p"
      %%   "~n   PAddr:  ~p"
      %%   "~n   PLen:   ~p"
      %%   "~n   SPLen:  ~p", [Fam, Addr, PAddr, PLen, SPLen]),
      Mask = <<(16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF bsl (128 - PLen)):128>>,
      %% d("shortest_matching_prefix(inet) -> entry with"
      %%   "~n   Mask: ~w", [Mask]),
      case masked_eq(Mask, ipv6_to_bin(Addr), ipv6_to_bin(PAddr)) of
          true ->
              %% d("shortest_matching_prefix(~w) -> equal", [Fam]),
              if
                  (SPLen =:= undefined) ->
                      %% d("shortest_matching_prefix(~w) -> "
                      %%   "initial shortest (prefix) found", [Fam]),
                      shortest_matching_prefix(UCAddr, Prefixes, Prefix);
                  (PLen < SPLen) ->
                      %% d("shortest_matching_prefix(~w) -> "
                      %%   "new shortest (prefix) found", [Fam]),
                      shortest_matching_prefix(UCAddr, Prefixes, Prefix);
                 true ->
                      shortest_matching_prefix(UCAddr, Prefixes, SPrefix)
              end;
          false ->
              %% d("shortest_matching_prefix(~w) -> not equal", [Fam]),
              shortest_matching_prefix(UCAddr, Prefixes, SPrefix)
      end;
  shortest_matching_prefix(UCAddr, [_Prefix|Prefixes], SPrefix) ->
      %% d("shortest_matching_prefix -> entry when skipping: "
      %%   "~n   UCAddr:  ~p"
      %%   "~n   Prefix:  ~p"
      %%   "~n   SPrefix: ~p", [UCAddr, _Prefix, SPrefix]),
      shortest_matching_prefix(UCAddr, Prefixes, SPrefix).
  
  masked_eq(<<M:32>>,
            <<A:32>>,
            <<PA:32>>) ->
      %% d("masked_eq -> entry with"
      %%   "~n   M:  ~w"
      %%   "~n   A:  ~w"
      %%   "~n   PA: ~w", [M, A, PA]),
      (A band M) =:= (PA band M);
  %% masked_eq(<<M1:8,  M2:8,  M3:8,  M4:8>>,
  %%           <<A1:8,  A2:8,  A3:8,  A4:8>>,
  %%           <<PA1:8, PA2:8, PA3:8, PA4:8>>) ->
  %%     %% d("masked_eq -> entry with"
  %%     %%   "~n   M1:  ~w"
  %%     %%   "~n   M2:  ~w"
  %%     %%   "~n   M3:  ~w"
  %%     %%   "~n   M4:  ~w"
  %%     %%   "~n   A1:  ~w"
  %%     %%   "~n   A2:  ~w"
  %%     %%   "~n   A3:  ~w"
  %%     %%   "~n   A4:  ~w"
  %%     %%   "~n   PA1: ~w"
  %%     %%   "~n   PA2: ~w"
  %%     %%   "~n   PA3: ~w"
  %%     %%   "~n   PA4: ~w", [M1,  M2,  M3,  M4,
  %%     %%                    A1,  A2,  A3,  A4,
  %%     %%                    PA1, PA2, PA3, PA4]),
  %%     ((A1 band M1) =:= (PA1 band M1)) andalso
  %%                                        ((A2 band M2) =:= (PA2 band M2)) andalso
  %%                                                                           ((A3 band M3) =:= (PA3 band M3)) andalso
  
negative.code:     end.
  
  shortest_matching_prefix(#{addr := Addr} = UCAddr, Prefixes) ->
      SPrefix = #{addr => Addr, length => undefined},
      shortest_matching_prefix(UCAddr, Prefixes, SPrefix).
  
  shortest_matching_prefix(#{addr := #{family := inet,
                                       addr   := {A, _, _, _}} = Addr}, [],
                             #{length := undefined}) ->
      %% Fall back to old classfull network addresses
      Shortest =
          if
  