Lines Matching refs:host

21 my($host,$domain,$fqdn) = (undef,undef,undef);
28 return $host
29 if(defined $host);
37 $host = gethostbyaddr($a,Socket::AF_INET());
38 last if defined $host;
40 if (defined($host) && index($host,'.') > 0) {
41 $fqdn = $host;
42 ($host,$domain) = $fqdn =~ /^([^\.]+)\.(.*)$/;
44 return $host;
47 chomp ($host = `hostname`);
50 $host = $ENV{'UCX$INET_HOST'} if defined($ENV{'UCX$INET_HOST'});
51 $host = $ENV{'MULTINET_HOST_NAME'} if defined($ENV{'MULTINET_HOST_NAME'});
52 if (index($host,'.') > 0) {
53 $fqdn = $host;
54 ($host,$domain) = $fqdn =~ /^([^\.]+)\.(.*)$/;
56 return $host;
74 and $host = (syscall(&main::SYS_gethostname, $tmp, 256) == 0)
82 $host = (POSIX::uname())[1];
87 chop($host = `(hostname) 2>/dev/null`); # BSD'ish
92 chop($host = `uname -n 2>/dev/null`); ## SYSV'ish && POSIX'ish
97 $host = (split(/[:\. ]/,`/com/host`,6))[0];
101 $host = "";
106 $host =~ s/[\0\r\n]+//go;
107 $host =~ s/(\A\.+|\.+\Z)//go;
108 $host =~ s/\.\.+/\./go;
110 $host;
145 my $host = _hostname();
148 @hosts = ($host,"localhost");
150 unless (defined($host) && $host =~ /\./) {
179 push(@h, "$host.$dom");
227 # Assumption: If the host name does not contain a period
232 return $fqdn = $host . "." . $domain
233 if(defined $host and defined $domain
234 and $host !~ /\./ and $domain =~ /\./);
237 return $fqdn = $host if defined $host and $host =~ /^\d+(\.\d+){3}$/;
239 my @host = defined $host ? split(/\./, $host) : ('localhost');
243 # Determine from @host & @domain the FQDN
249 my @h = @host;
263 $host = shift @fqdn;
264 until((gethostbyname($host))[0]) {
265 $host .= "." . shift @fqdn;
270 undef $host;
282 unless(defined $host);
283 return $host;
298 Net::Domain - Attempt to evaluate the current host's internet name and domain
307 of the current host. From this determine the host-name and the host-domain.
315 Identify and return the FQDN of the current host.
319 Returns the smallest part of the FQDN which can be used to identify the host.