Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread Mark Morgan Lloyd
waldo kitty wrote: [crystalball] get nslookup working first. your code should work. [/crystalball] OK, that's no big deal. But it looks like GetDomainName() doesn't quite do what it says on the can :-) agreed... i was just looking around on my FPC 2.6.0 install and note the following

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread Tomas Hajny
On Tue, April 9, 2013 10:14, Mark Morgan Lloyd wrote: waldo kitty wrote: . . diggin in, i note that it seems to use the system's uname function... but i think that is different than the command line uname or uname -a because none of my linux machine return their FQDN in this output... i

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread Mark Morgan Lloyd
Tomas Hajny wrote: On Tue, April 9, 2013 10:14, Mark Morgan Lloyd wrote: waldo kitty wrote: . . diggin in, i note that it seems to use the system's uname function... but i think that is different than the command line uname or uname -a because none of my linux machine return their FQDN in

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread Ludo Brands
On 04/09/2013 10:14 AM, Mark Morgan Lloyd wrote: It might be notable that Debian doesn't volunteer a domain name unless it's able to contact DNS. I'll get onto nslookup, or just use temporary text (it's only salt for a password hash, and is stored). One of the problems with uname is that

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread Mark Morgan Lloyd
Ludo Brands wrote: On 04/09/2013 10:14 AM, Mark Morgan Lloyd wrote: It might be notable that Debian doesn't volunteer a domain name unless it's able to contact DNS. I'll get onto nslookup, or just use temporary text (it's only salt for a password hash, and is stored). One of the problems

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread waldo kitty
On 4/9/2013 04:14, Mark Morgan Lloyd wrote: It might be notable that Debian doesn't volunteer a domain name unless it's able to contact DNS. I'll get onto nslookup, or just use temporary text (it's only salt for a password hash, and is stored). understood... your nslookup output looked fine to

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread waldo kitty
On 4/9/2013 04:24, Tomas Hajny wrote: On Tue, April 9, 2013 10:14, Mark Morgan Lloyd wrote: waldo kitty wrote: i note that both, GetDomainName and GetHostName both use the same var (Sysn : utsname) but just different fields in what is apparently a record of some type... [TRIM] It might be

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread waldo kitty
On 4/9/2013 05:09, Mark Morgan Lloyd wrote: Ludo Brands wrote: On 04/09/2013 10:14 AM, Mark Morgan Lloyd wrote: It might be notable that Debian doesn't volunteer a domain name unless it's able to contact DNS. I'll get onto nslookup, or just use temporary text (it's only salt for a password

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread Tomas Hajny
On Tue, April 9, 2013 19:51, waldo kitty wrote: On 4/9/2013 04:24, Tomas Hajny wrote: . . Have you tried using unit netdb from package fcl-net? It doesn't support Windows (and some other platforms yet), but it should work for Unix targets. I believe that the two approaches for finding out

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread waldo kitty
On 4/9/2013 14:10, Tomas Hajny wrote: On Tue, April 9, 2013 19:51, waldo kitty wrote: On 4/9/2013 04:24, Tomas Hajny wrote: . . Have you tried using unit netdb from package fcl-net? It doesn't support Windows (and some other platforms yet), but it should work for Unix targets. I believe

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread Mark Morgan Lloyd
waldo kitty wrote: i would attempt to go portable by performing a DNS lookup on the address and or the given host name... i don't think i would try to use external programs for this but would compare my results with theirs for the same lookups... Agreed. I rarely use external programs since

[fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-08 Thread Mark Morgan Lloyd
How best to get the (internet-style) domain name of a system? GetDomainName() appears to be returning (none) here on x86 Linux. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-08 Thread waldo kitty
On 4/8/2013 11:03, Mark Morgan Lloyd wrote: How best to get the (internet-style) domain name of a system? GetDomainName() appears to be returning (none) here on x86 Linux. do you mean the FQDN (Fully Qualified Domain Name)?? ___ fpc-pascal maillist

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-08 Thread Mark Morgan Lloyd
waldo kitty wrote: On 4/8/2013 11:03, Mark Morgan Lloyd wrote: How best to get the (internet-style) domain name of a system? GetDomainName() appears to be returning (none) here on x86 Linux. do you mean the FQDN (Fully Qualified Domain Name)?? I mean that on the machine I'm working on the

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-08 Thread waldo kitty
On 4/8/2013 14:54, Mark Morgan Lloyd wrote: waldo kitty wrote: On 4/8/2013 11:03, Mark Morgan Lloyd wrote: How best to get the (internet-style) domain name of a system? GetDomainName() appears to be returning (none) here on x86 Linux. do you mean the FQDN (Fully Qualified Domain Name)?? I

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-08 Thread Mark Morgan Lloyd
waldo kitty wrote: On 4/8/2013 14:54, Mark Morgan Lloyd wrote: waldo kitty wrote: On 4/8/2013 11:03, Mark Morgan Lloyd wrote: How best to get the (internet-style) domain name of a system? GetDomainName() appears to be returning (none) here on x86 Linux. do you mean the FQDN (Fully

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-08 Thread waldo kitty
On 4/8/2013 16:14, Mark Morgan Lloyd wrote: waldo kitty wrote: from the machine you are trying to perform this look up from, what do you get if you do the following? nslookup pye-dev-01 Server: 192.168.1.1 Address: 192.168.1.1#53 Name: pye-dev-01.telemetry.co.uk Address: 192.168.1.16