X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/baf753e54d73673524de916757e66ef8c485bc0d..d53fe26eaac895d1e7a0ba2b2b8965cf77932de8:/binipstuff.pas diff --git a/binipstuff.pas b/binipstuff.pas index 59d123b..a1433fc 100755 --- a/binipstuff.pas +++ b/binipstuff.pas @@ -141,6 +141,8 @@ function comparebinip(const ip1,ip2:tbinip):boolean; procedure maskbits(var binip:tbinip;bits:integer); function comparebinipmask(ip1,ip2:tbinip;bits:integer):boolean; +procedure addipsoffamily(var l:tbiniplist;const l2:tbiniplist;family:integer); + {deprecated} function longip(s:string):longint; @@ -565,7 +567,7 @@ end; procedure biniplist_addlist; begin - l := l + l2; + l := l + copy(l2,biniplist_prefixlen+1,maxlongint); end; function biniplist_tostr(const l:tbiniplist):string; @@ -593,4 +595,16 @@ begin result := true; end; +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; + + end.