ipv6 subroutines
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6017 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -1862,7 +1862,7 @@ sub getNetwkInfo | ||||
| 			chomp $NM; | ||||
| 			chomp $net; | ||||
|  | ||||
|                         if(xCAT::Utils->ishostinsubnet($IP, $NM, $net)) | ||||
|                         if(xCAT::NetworkUtils->ishostinsubnet($IP, $NM, $net)) | ||||
|                         { | ||||
| 				# fill in the hash -  | ||||
| 				foreach my $attr (@attrnames) { | ||||
|   | ||||
| @@ -117,8 +117,8 @@ sub gethostname() | ||||
|     { | ||||
|         if ($socket6support) # the getaddrinfo and getnameinfo supports both IPv4 and IPv6 | ||||
|         { | ||||
|             my ($family, $socket, $protocol, $ip, $name) = getaddrinfo($iporhost,0); | ||||
|             my $host = (getnameinfo($ip))[0]; | ||||
|             my ($family, $socket, $protocol, $ip, $name) = Socket6::getaddrinfo($iporhost,0); | ||||
|             my $host = (Socket6::getnameinfo($ip))[0]; | ||||
|             if ($host eq $iporhost) # can not resolve | ||||
|             { | ||||
|                 return undef; | ||||
| @@ -180,10 +180,10 @@ sub getipaddr() | ||||
|     { | ||||
|         if ($socket6support) # the getaddrinfo and getnameinfo supports both IPv4 and IPv6 | ||||
|         { | ||||
|             my ($family, $socket, $protocol, $ip, $name) = getaddrinfo($iporhost,0); | ||||
|             my ($family, $socket, $protocol, $ip, $name) = Socket6::getaddrinfo($iporhost,0); | ||||
|             if ($ip) | ||||
|             { | ||||
|                 return (getnameinfo($ip, NI_NUMERICHOST()))[0]; | ||||
|                 return (Socket6::getnameinfo($ip, Socket6::NI_NUMERICHOST()))[0]; | ||||
|             } | ||||
|             return undef; | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user