[AFS3-std] Re: first draft: ubik update proposal

Jeffrey Hutzelman jhutz@cmu.edu
Sat, 05 Feb 2011 04:09:20 -0500


--On Friday, February 04, 2011 10:14:23 AM -0600 Andrew Deason 
<adeason@sinenomine.net> wrote:

> On Fri, 4 Feb 2011 09:32:53 -0500
> Derrick Brashear <shadow@gmail.com> wrote:
>
>> struct UbikInterfaceInfo {
>>         afsUUID uuid;
>> 	struct sockaddr_storage hostAddr[UBIK_MAX_INTERFACE_ADDR];
>> };
>
> I thought struct sockaddr_storage can be different on different
> implementations, and isn't guaranteed to store ~everything, just the
> representations that host supports. This is something I've been a little
> unclear about, actually; is there any existing standard for transmitting
> generalized network addresses across platforms? Or does everyone just
> come up with their own?

Indeed, sockaddr_storage is an API artifact, and certainly not suitable for 
use in an Rx RPC signature.  The appropriate thing here is some kind of 
discriminated union.  We should probably define such a type as an extension 
to the "standard" types supported by Rx, rather than doing it in Ubik and 
again in VL and again in RXAFSCB and so on and so on.

-- Jeff