Subject: RPC and ipv6
To: None <tech-net@netbsd.org>
From: Frank van der Linden <frank@wins.uva.nl>
List: tech-net
Date: 12/07/1999 14:59:17
I was looking into updating the RPC-based code in the tree to make it
ipv6-ready. This is not hard in itself, but there are some interface
issues. It comes down to 2 things:

	* several RPC library calls take a sockaddr_in * parameter
	* struct sockaddr_in is part of the SVCXPRT structure.

As RFC 2553 suggests, sockaddr_in usage should be replaced by
sockaddr_storage to make code more protocol independent. This means
an interface change. This can't be avoided in case of the SVCXPRT
change. Basically there are 2 options:

	a) Go for struct sockaddr_storage completely, including in the
	   interface. Use versioning for the old interface for backward
	   compatibility.
	b) Only use struct sockaddr_storage inside SVCXPRT (and use
	   versioning there too), but do not change the sockaddr_in *
	   paramemeters. Rely on the application to check for address
	   family and do the right thing.

I prefer a), but it does mean that any source code using the RPC 
library calls won't compile anymore, and needs to be modified.

Solaris 8 seems to have kept the old interface. Disadvantage is
that this may lead to source code compiling, but crashing because
an address may resolve to an ipv6 address, not fitting in the
sockaddr_in structure it passed a pointer to. I'd rather have
the failure at compile time.

Opinions?

- Frank