smoltcp-rs / smoltcp

a smol tcp/ip stack
BSD Zero Clause License
3.64k stars 404 forks source link

`IpPacket` rewrite #802

Closed thvdveld closed 1 year ago

thvdveld commented 1 year ago

I rewrote IpPacket such that we can add hop-by-hop headers, fragment headers and routing headers to the representation. I discussed in #800 why I needed those changes.

The downside is that the IpPacket struct is now 264 bytes, and thus clippy complains about this.

codecov[bot] commented 1 year ago

Codecov Report

Merging #802 (2152c80) into main (aa5d887) will decrease coverage by 0.13%. The diff coverage is 46.87%.

:exclamation: Current head 2152c80 differs from pull request most recent head 618d7e3. Consider uploading reports for the commit 618d7e3 to get more accurate results

@@            Coverage Diff             @@
##             main     #802      +/-   ##
==========================================
- Coverage   79.65%   79.53%   -0.13%     
==========================================
  Files          71       72       +1     
  Lines       27786    27711      -75     
==========================================
- Hits        22134    22041      -93     
- Misses       5652     5670      +18     
Impacted Files Coverage Δ
src/iface/interface/mod.rs 49.67% <2.63%> (+0.17%) :arrow_up:
src/iface/ip_packet.rs 50.00% <50.00%> (ø)
src/iface/interface/sixlowpan.rs 74.93% <61.90%> (ø)
src/iface/interface/ipv4.rs 68.50% <93.75%> (+0.53%) :arrow_up:
src/iface/interface/ipv6.rs 91.38% <100.00%> (+0.12%) :arrow_up:

... and 4 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

thvdveld commented 1 year ago

I think that the size variant should not be an issue.

thvdveld commented 1 year ago

@Dirbaio I added the feature flags as discussed on Matrix.

Dirbaio commented 1 year ago

:rocket: thank you!