X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/6cb6b7ede2d178e03fa817bc28474c175f5a93b9..d8d568ba2b45905cbe2c8e1956b6444d5b6560f4:/dnssync.pas?ds=sidebyside

diff --git a/dnssync.pas b/dnssync.pas
index 3632b29..b682acf 100755
--- a/dnssync.pas
+++ b/dnssync.pas
@@ -44,14 +44,7 @@ function forwardlookuplist(name:string;timeout:integer):tbiniplist;
 //details as above
 function reverselookup(ip:tbinip;timeout:integer):string;
 
-{$ifdef linux}{$ifdef ipv6}
-function getv6localips:tbiniplist;
-procedure initpreferredmode;
 
-var
-  preferredmodeinited:boolean;
-
-{$endif}{$endif}
 
 const
   tswrap=$4000;
@@ -274,16 +267,6 @@ begin
 end;
 {$endif}
 
-procedure addipsoffamily(var l:tbiniplist;const l2:tbiniplist;family:integer);
-var
-  a:integer;
-  biniptemp:tbinip;
-begin
-  for a := biniplist_getcount(l2)-1 downto 0 do begin
-    biniptemp := biniplist_get(l2,a);
-    if (biniptemp.family = family) then biniplist_add(l,biniptemp);
-  end;
-end;
 
 
 function forwardlookuplist(name:string;timeout:integer):tbiniplist;
@@ -383,62 +366,6 @@ begin
   {$endif}
 end;
 
-{$ifdef linux}{$ifdef ipv6}{$ifdef syncdnscore}
-function getv6localips:tbiniplist;
-var
-  t:textfile;
-  s,s2:string;
-  ip:tbinip;
-  a:integer;
-begin
-  result := biniplist_new;
-
-  assignfile(t,'/proc/net/if_inet6');
-  {$i-}reset(t);{$i+}
-  if ioresult <> 0 then exit; {none found, return empty list}
-
-  while not eof(t) do begin
-    readln(t,s);
-    s2 := '';
-    for a := 0 to 7 do begin
-      if (s2 <> '') then s2 := s2 + ':';
-      s2 := s2 + copy(s,(a shl 2)+1,4);
-    end;
-    ipstrtobin(s2,ip);
-    if ip.family <> 0 then biniplist_add(result,ip);
-  end;
-  closefile(t);
-end;
-
-procedure initpreferredmode;
-var
-  l:tbiniplist;
-  a:integer;
-  ip:tbinip;
-  ipmask_global,ipmask_6to4,ipmask_teredo:tbinip;
-
-begin
-  if preferredmodeinited then exit;
-  if useaf <> useaf_default then exit;
-  useaf := useaf_preferv4;
-  l := getv6localips;
-  ipstrtobin('2000::',ipmask_global);
-  ipstrtobin('2001::',ipmask_teredo);
-  ipstrtobin('2002::',ipmask_6to4);
-  {if there is any v6 IP which is globally routable and not 6to4 and not teredo, prefer v6}
-  for a := biniplist_getcount(l)-1 downto 0 do begin
-    ip := biniplist_get(l,a);
-    if not comparebinipmask(ip,ipmask_global,3) then continue;
-    if comparebinipmask(ip,ipmask_teredo,32) then continue;
-    if comparebinipmask(ip,ipmask_6to4,16) then continue;
-    useaf := useaf_preferv6;
-    preferredmodeinited := true;
-    exit;
-  end;
-end;
-
-{$endif}{$endif}{$endif}
-
 {$ifdef win32}
   var
     wsadata : twsadata;