Is there a sysctl variable, or a quick method to determine if ipv6 is enabled in the kernel? e.g. How do I test for the prescence of ipv6 in a script or at the commandline? Thanks, Billy
On Tue, Jul 05, 2005 at 01:17:41AM -0500, Billy Newsom wrote:> Is there a sysctl variable, or a quick method to determine if ipv6 is > enabled in the kernel? e.g. How do I test for the prescence of ipv6 in > a script or at the commandline?You could check for the existance of the net.inet6 sysctl tree. If IPv6 is present then "sysctl net.inet6" will return true, otherwise it will return an error. (Note, that this doesn't mean that IPv6 has been configured, just that the kernel supports it.) David.
On Tue, Jul 05, 2005 at 01:17:41AM -0500, Billy Newsom wrote:> Is there a sysctl variable, or a quick method to determine if ipv6 is > enabled in the kernel? e.g. How do I test for the prescence of ipv6 in > a script or at the commandline?You could use ifconfig together with the loopback interface (or any other network interface): ifconfig lo0 inet6 This will return true or false, depending on the ipv6 protocol support. Simple for shell scripting. Bruce Nikkel