X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/5c04c841812bdb200cc3c73169b1542aef6c2fc3..8bffcf295dad495a39dabb9c6915c1692738b3fa:/binipstuff.pas diff --git a/binipstuff.pas b/binipstuff.pas index 40b5f9f..cfc7c1b 100644 --- a/binipstuff.pas +++ b/binipstuff.pas @@ -118,7 +118,7 @@ bin IP list code, by beware while this is really just a string, on the interface side it must be treated as an opaque var which is passed as "var" when it needs to be modified} - tbiniplist=tipstring; + tbiniplist=tbufferstring; function biniplist_new:tbiniplist; procedure biniplist_add(var l:tbiniplist;ip:tbinip); @@ -128,18 +128,18 @@ procedure biniplist_set(var l:tbiniplist;index:integer;ip:tbinip); procedure biniplist_setcount(var l:tbiniplist;newlen:integer); procedure biniplist_free(var l:tbiniplist); procedure biniplist_addlist(var l:tbiniplist;const l2:tbiniplist); -function biniplist_tostr(const l:tbiniplist):tipstring; +function biniplist_tostr(const l:tbiniplist):thostname; function isbiniplist(const l:tbiniplist):boolean; function htons(w:word):word; function htonl(i:uint32):uint32; -function ipstrtobin(const s:tipstring;var binip:tbinip):boolean; -function ipstrtobinf(const s:tipstring):tbinip; -function ipbintostr(const binip:tbinip):tipstring; +function ipstrtobin(const s:thostname;var binip:tbinip):boolean; +function ipstrtobinf(const s:thostname):tbinip; +function ipbintostr(const binip:tbinip):thostname; {$ifdef ipv6} -function ip6bintostr(const bin:tin6_addr):tipstring; -function ip6strtobin(const s:tipstring;var bin:tin6_addr):boolean; +function ip6bintostr(const bin:tin6_addr):thostname; +function ip6strtobin(const s:thostname;var bin:tin6_addr):boolean; {$endif} function comparebinip(const ip1,ip2:tbinip):boolean; @@ -149,7 +149,7 @@ function comparebinipmask(ip1,ip2:tbinip;bits:integer):boolean; procedure addipsoffamily(var l:tbiniplist;const l2:tbiniplist;family:integer); {deprecated} -function longip(s:tipstring):longint; +function longip(s:thostname):longint; function needconverttov4(const ip:tbinip):boolean; procedure converttov4(var ip:tbinip); @@ -222,7 +222,7 @@ end; {internal} {converts dotted v4 IP to longint. returns host endian order} -function longip(s:tipstring):longint; +function longip(s:thostname):longint; var l:longint; a,b:integer; @@ -277,7 +277,7 @@ begin ipstrtobin(s,result); end; -function ipstrtobin(const s:tipstring;var binip:tbinip):boolean; +function ipstrtobin(const s:thostname;var binip:tbinip):boolean; begin binip.family := 0; result := false; @@ -299,7 +299,7 @@ begin end; end; -function ipbintostr(const binip:tbinip):tipstring; +function ipbintostr(const binip:tbinip):thostname; var a:integer; begin @@ -335,7 +335,7 @@ written by beware {fpc has hostaddrtostr6 and strtohostaddr6 but the later isnt implemented yet} -function ip6bintostr(const bin:tin6_addr):tipstring; +function ip6bintostr(const bin:tin6_addr):thostname; {base16 with lowercase output} function makehex(w:word):ansistring; begin @@ -393,7 +393,7 @@ begin end; end; -function ip6strtobin(const s:tipstring;var bin:tin6_addr):boolean; +function ip6strtobin(const s:thostname;var bin:tin6_addr):boolean; var a,b:integer; fields:array[0..7] of ansistring; @@ -592,7 +592,7 @@ begin l := l + copy(l2,biniplist_prefixlen+1,maxlongint); end; -function biniplist_tostr(const l:tbiniplist):tipstring; +function biniplist_tostr(const l:tbiniplist):thostname; var a:integer; begin