On Mon, 7 Feb 2011 16:07:10 -0600 Andrew Deason <[email protected]> wrote:
> On Mon, 07 Feb 2011 16:44:10 -0500 > Jeffrey Hutzelman <[email protected]> wrote: > > > And, we can't just use xdr_union, because that makes the type > > non-extensible -- xdr_union will fail if it receives an unknown > > discriminator value. To be extensible, we need to actually encode the > > length on the wire, and have an unknown discriminator handler that > > reads off the length and the other bits and either throws them away or > > hands them to the application somehow. > [...] > > But I believe that was proposed because allowing unknown union > discriminators to be parseable was impossible (at least, while staying > within the XDR spec). There's a way to allow the decoder to read the > length of the payload of an unknown discriminator from another field in > the structure? How do you do this? Er, sorry, I read that wrong; you said you were talking about something besides an xdr_union. But still, what I describe above is at least one way to do this: you put all future type payloads in an opaque blob, and run the xdr decoder on that to decode them. -- Andrew Deason [email protected] _______________________________________________ AFS3-standardization mailing list [email protected] http://lists.openafs.org/mailman/listinfo/afs3-standardization
