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

Add wire representations for SRv6 header as part of IPv6 Routing header #610

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ngc0202
Copy link
Contributor

@ngc0202 ngc0202 commented May 9, 2022

This is my first of what is likely to be multiple PRs for working with SRv6 with smoltcp! For now, this is just the wire representations. I believe I implemented all the necessary cases, but worth double checking it. I'm also open to suggestions on more areas that could be upgraded to work better with SRv6, and I'll be happy to work on it.

@thvdveld
Copy link
Contributor

@Dirbaio can we merge this? I need this for RPL as well.

@ngc0202 are you still working on this after this is merged? If not, I'll continue your since I require it for RPL routing.

@ngc0202
Copy link
Contributor Author

ngc0202 commented Mar 22, 2023

@thvdveld I have a bunch of local changes, but most wasn't really intended to be pushed up. Stuff like some higher-level methods for working with TLVs and the like, I wasn't really sure what was suitable for the PR. I did have a bug in here that I never pushed the fix for however:

     /// Variable-length field containing the segment list
     pub const fn SEGMENTS(last_entry_field: u8) -> Field {
-        let bytes = 16 * (last_entry_field as usize) + 8;
+        let bytes = 16 * (last_entry_field as usize) + 24;
         8..bytes
     }

Besides that I think it's good to go as is, with whatever changes you see fit.

@thvdveld
Copy link
Contributor

I thought I needed this for RPL, but it's source routing that I need (which is already in there). Maybe if you could add some tests for the parsing of SRv6 packets, that would be nice.

@thvdveld
Copy link
Contributor

Could you maybe add tests for parsing/emitting? I think that we can merge this after the tests are added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants