Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for optional data (4.19) of the XDR spec #11

Closed
fdawg4l opened this issue Feb 6, 2017 · 1 comment
Closed

Support for optional data (4.19) of the XDR spec #11

fdawg4l opened this issue Feb 6, 2017 · 1 comment

Comments

@fdawg4l
Copy link

fdawg4l commented Feb 6, 2017

I tried decoding optional-data 4.19 and came across this comment in the code

https://github.com/davecgh/go-xdr/blob/master/xdr2/decode.go#L572

// RFC Sections 4.15 though 4.19 only apply to the data specification language
// which is not implemented by this package

I don't understand the "only apply to the data specification language" bit. The API I'm using (NFSv3, to be specific) is encoding a linked-list with the above optional-data format and other than decoding each element and then checking for the "follows" 4B for zero before terminating (which is what I'm currently doing here), is there a way to decode this data?

If the loop-and-check method is the only way, are you averse to me pushing a PR to add support for this? I'm thinking it would require a StructTag to descend down the right path for a slice. Let me know and I'll be happy to get started on that.

Thanks!

@fdawg4l
Copy link
Author

fdawg4l commented Feb 22, 2017

I see now there's already a PR open for this. Closing.

@fdawg4l fdawg4l closed this as completed Feb 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant