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 partial default initialization with IpAuthHeader & Ipv6RawExtHeader #67

Open
JulianSchmid opened this issue Jul 5, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@JulianSchmid
Copy link
Owner

It would be nice if one could simply write:

let header = IpAuthHeader{
    next_header: 123,
    icv: [1,2,3,4].into(),
    ..Default::default()
};

or

let header = Ipv6RawExtHeader{
    next_header: 123,
    payload: [1,2,3,4,5,6].into()
};

But this is currently not possible as the payload buffers are implemented via some private fields. In both of structs cases these private fields contain a buffer for options as well as a length for how much of the buffer is filled.

We can get around this limitation by moving the buffers into their own types and making them public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant