Subject: Re: checking
To: None <>
From: Feico Dillema <>
List: tech-net
Date: 12/20/1999 13:02:40
On Mon, Dec 20, 1999 at 08:46:31PM +0900, wrote:
> 	maybe tech-userlevel...
> 	Due to my IPv6 changes, /etc/netstart requires /usr to be mounted.
> 	This is because I used sysctl to check for IPv6 support.  I would
> 	like to avoid this and make mount of /usr to be optional as before.
> 	What is the best way to check for kernel's capability of doing IPv6
> 	(or random other protocol families, like appletalk)?
> 	I can think of several candidates:
> 	- use /sbin/ifconfig and some other tools.  I may need grep, head, tail
> 	  and some other things but they are in /usr.
> 	- add a tool that does
> 		if (socket(AF_INET6, SOCK_RAW, 0) < 0)
> 			exit(1);
> 		else
> 			exit(0);
> 	  into /sbin.

Maybe just add an option to ifconfig (-f ?) that returns list of the supported
address families (instead of separate tool)?