rust-lang / rust-lang/socket2

Support for ancillary data/control messages in `sendmsg`/`recvmsg` as well as the upcoming `sendmmsg`/`recvmmsg`

Open
#614 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
870
Forks
305
PR merge metrics
No merged PRs in 30d

Description

The idiomatic way of parsing and constructing ancillary data in C is to use the various macros defined in sys/socket.h (CMSG_FIRSTHDR, CMSG_NXTHDR etc.). Those macros act on msghdr directly. Since we no longer return msghdr in the API, we should serialize/deserialize these messages for the user in the API as well.

Contributor guide

Open the contributing guide

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.

Research direction

Start by reviewing the existing sendmsg and recvmsg API, then compare its data representation with the msghdr-based ancillary-data macros in sys/socket.h, including CMSG_FIRSTHDR and CMSG_NXTHDR. Define how ancillary messages should be serialized and deserialized and how that design extends to sendmmsg and recvmmsg; the issue is done when the API supports these message types consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.