[Feature Request] Add AF_PACKET support to the socket interface

Open
#1,012 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
12/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
networking

Research direction

The request is for AF_PACKET-style SOCK_RAW and SOCK_DGRAM sockets, and the payload names only the existing eNetworkTxEvent path to the FreeRTOS+TCP task as today's workaround. Start by reading how that event sends raw Ethernet frames, then settle the socket API design with maintainers before writing code. The issue is open with no assignee or linked pull request and has been idle for about three years, so confirm it is still wanted first.

Written by the indexing model from the issue text.

Description

Is your feature request related to a problem? Please describe.

Linux/BSD style AF_PACKET / IPPROTO_RAW sockets are useful for implementing custom IP protocols or sending and receiving raw ethernet frames.

@evpopov filed Issue #1011 which prompted me to file this ticket.

Adding AF_PACKET sockets to FreeRTOS+TCP would allow users to extend the capabilities of FreeRTOS+TCP with their own custom protocol implementations in a relatively standard way.

Describe the solution you'd like
Add support for *nix style packet sockets ( AF_PACKET ) with SOCK_RAW and SOCK_DGRAM socket types.

Describe alternatives you've considered
Sending raw ethernet frames is currently possible by sending a eNetworkTxEvent request to FreeRTOS+TCP task, however this API is non-standard and not well documented for this purpose.

Additional context
N/A

Dominant language
C
Stars
215
Forks
222
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FreeRTOS/FreeRTOS-Plus-TCP

All issues in FreeRTOS/FreeRTOS-Plus-TCP

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.