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. draft-tkeiser-afs3-volser-tlv had the same issue, and there we specified that the 'default' leg of the union be an opaque, and any future defined discriminator payloads would be XDR-encoded, and the result is put into the opaque blob. So, interpreting the future payloads would involve XDR-decoding the contents of the blob. 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? -- Andrew Deason [email protected] _______________________________________________ AFS3-standardization mailing list [email protected] http://lists.openafs.org/mailman/listinfo/afs3-standardization
