Skip to content

Add new socket type for raw ethernet protocols #1013

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

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

Conversation

ususdei
Copy link

@ususdei ususdei commented Nov 24, 2024

Hi everyone!

I'm currently working on a rust library for a protocol which runs on plain ethernet using a custom ethertype (TECMP on 0x99FE).
It also uses an additional IP-based protocol for discovery and configuration.

I would also like to use this library on some STM32, so I tried to port it from native linux sockets to the smoltcp stack.

Thus I started to implement some basic support for raw ethernet sockets.
This is still a work in progress but the basic functionality already works on an STM32F7.
It is still missing support for Metadata and the send API could be more convenient
but I would like to get this out there and gather some early feedback as to whether you would even consider merging something like this.

So just some initial questions:

  • Is this feature even in scope for the smoltcp project?
  • Do you agree with my overall design?
  • Do you already have any other initial feedback?

Thank you all for your feedback and your great contribution to the embedded rust ecosystem!

@ususdei ususdei force-pushed the ethernet_socket branch 2 times, most recently from 7b7b67f to 682e851 Compare November 24, 2024 21:03
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 63.08725% with 110 lines in your changes missing coverage. Please review.

Project coverage is 81.03%. Comparing base (f8bfa31) to head (ef11c4f).

Files with missing lines Patch % Lines
src/socket/eth.rs 65.72% 85 Missing ⚠️
src/iface/interface/mod.rs 42.50% 23 Missing ⚠️
src/socket/mod.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1013      +/-   ##
==========================================
- Coverage   81.17%   81.03%   -0.15%     
==========================================
  Files          81       82       +1     
  Lines       28956    29235     +279     
==========================================
+ Hits        23505    23690     +185     
- Misses       5451     5545      +94     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ususdei ususdei changed the title WIP: Add new socket type for raw ethernet protocols Add new socket type for raw ethernet protocols Apr 13, 2025
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.

1 participant