anchor.diff:  
   send_zone(<<"true">>,Socket,{Questions,DNSId,OptB,OptE,RH,Rest,Zone,?T_IXFR,NSServ,MailAddr,TSIG,SOA}, Proto) when Zone#rpz.serial==Zone#rpz.serial_ixfr,Zone#rpz.status == ready;Zone#rpz.serial==Zone#rpz.serial_ixfr,Zone#rpz.status == updating;SOA#dns_SOA_RR.serial<Zone#rpz.serial_ixfr,Zone#rpz.status == ready;SOA#dns_SOA_RR.serial<Zone#rpz.serial_ixfr,Zone#rpz.status == updating ->
   %Serial_IXFR = Serial => do full zone transfer. SOA#dns_SOA_RR.serial less than Serial and we do not have the changes log
  -%  ioc2rpz_fun:logMessage("Serial = Serial IXFR ~p ~n",[Zone]),
  +
  +  ioc2rpz_fun:logMessage("IXFR zone ~p serial ~p request serial ~p ~n",[Zone#rpz.zone_str, Zone#rpz.serial_ixfr, SOA#dns_SOA_RR.serial]),
     SOAR = <<NSServ/binary,MailAddr/binary,(Zone#rpz.serial):32,(Zone#rpz.soa_timers)/binary>>,
     SOAREC = <<?ZNameZip, ?T_SOA:16, ?C_IN:16, 604800:32, (byte_size(SOAR)):16, SOAR/binary>>, % 16#c00c:16 - Zone name/request is always at this location (10 bytes from DNSID)
     NSRec = <<?ZNameZip, ?T_NS:16, ?C_IN:16, 604800:32, (byte_size(NSServ)):16, NSServ/binary>>,
  
positive.code:   {ok,RR,#dns_TSIG_RR{name = <<>>},SOA,RAWN};
  
  parse_rr(NSCOUNT, ARCOUNT, <<Zip:8,_/binary>> = RAW, RR, SOA, RAWN) ->
    if Zip >= 192 ->
        <<RNAME:2/binary, RType:2/big-unsigned-unit:8,RClass:2/big-unsigned-unit:8,RTTL:4/big-unsigned-unit:8,DLen:2/big-unsigned-unit:8,REST/binary>> = RAW;
      true ->
        %TODO переделать, так как может зиповаться часть записи/FQDN и в этом случае нужен весь пакет, чтобы получить запись
        [RNAME0,<<RType:2/big-unsigned-unit:8,RClass:2/big-unsigned-unit:8,RTTL:4/big-unsigned-unit:8,DLen:2/big-unsigned-unit:8,REST/binary>>] = binary:split(RAW,<<0>>),
        RNAME = <<RNAME0/binary,0:8>>
    end,
    case {RType, RClass} of
      {?RT_TSIG, ?C_ANY} -> %TSIG Record
        if DLen < byte_size(REST) -> {badTSIGposition,[],[]};
          true ->
            [TSIG_ALG,<<TSIG_TIME:6/bytes,TSIG_FUDGE:2/bytes,MACLEN:2/big-unsigned-unit:8,REST1/binary>>] = binary:split(REST,<<0>>),
            <<TSIG_MAC:MACLEN/bytes,TSIG_OID:2/big-unsigned-unit:8,TSIG_ERR:2/bytes,TSIG_OTHER_LEN:2/big-unsigned-unit:8,REST2/binary>> = REST1,
            <<TSIG_OTHER:TSIG_OTHER_LEN/bytes>> = REST2,
            {ok,RR,#dns_TSIG_RR{name=RNAME,type=RType,class=RClass,rdlength=DLen, alg = <<TSIG_ALG/binary,0>>, time=TSIG_TIME, fudge=TSIG_FUDGE, mac_len=MACLEN, mac=TSIG_MAC, oid=TSIG_OID,error=TSIG_ERR,olen=TSIG_OTHER_LEN,odata=TSIG_OTHER,time_only=false},SOA,RAWN}
  
negative.code: 	ets:insert(T_ZIP_L, {Labels, ?ZNameZipN}),
  	T_ZIP_L.
  
  
  %Extract zipped or regular label
  extract_label(Packet,AddZero) ->
   extract_label(Packet,<<>>,AddZero).
  
  extract_label(<<Zip:8,_/binary>>=Packet, Labels,_AddZero) when Zip >= 192 ->
    <<Label:2/binary,REST/binary>>=Packet,
    {REST, <<Labels/binary,Label/binary>>};
  
  extract_label(<<Zip:8,REST/binary>>=Packet, Labels,AddZero) when Zip == 0 ->
    {REST, <<Labels/binary,AddZero/binary>>};
  
  extract_label(<<Len:8,_/binary>>=Packet, Labels,AddZero) ->
    <<_:8,Label:Len/bytes,REST/binary>>=Packet,
    extract_label(REST,<<Labels/binary,Len:8,Label/binary>>,AddZero).
  
  %%%%
  %%%% EUnit tests
  %%%%
  extract_label_test() -> [
    ?assert(extract_label(<<16#c00c:16,7,"example",3,"com">>,<<>>) =:= {<<7,"example",3,"com">>,<<16#c00c:16>>}),
    ?assert(extract_label(<<7,"example",16#c00c:16>>,<<>>) =:= {<<>>,<<7,"example",16#c00c:16>>}),
    ?assert(extract_label(<<7,"example",16#c00c:16,0>>,<<>>) =:= {<<0>>,<<7,"example",16#c00c:16>>}),
    ?assert(extract_label(<<7,"example",3,"com",0>>,<<>>) =:= {<<>>,<<7,"example",3,"com">>}),
    ?assert(extract_label(<<7,"example",3,"com",0,7,"example",3,"com">>,<<0>>) =:= {<<7,"example",3,"com">>,<<7,"example",3,"com",0>>})
  
  ].
  
  reverse_IP_test() ->[
  	?assert(reverse_IP(<<"10.20.30.40">>) =:= <<"32.40.30.20.10">>),
  