WebAssembly / WebAssembly/wasi-libc

Provide socket option definitions

Open
#304 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1k
Forks
251
Avg merge
7h 15m
Merged PRs (30d)
3

Description

Hi,
I've noticed there's no definition in __header_sys_socket.h for socket options. Is that intentional? I see other definitions (e.g. AF_INET) are already added to the header, but I can't find it anywhere in the WASI spec (so I'm not sure why e.g. AF_INET is defined as 1, even though in linux headers it's 3).
I can also see SO_TYPE being already included, but that's the only option that's available (and is set to 3, which matches Linux headers).

If lack of those definitions is not intentional, I can provide a PR for that; however, I'm not sure what numbers should be assigned to a specific definition - is there any specification already? (as I said, I couldn't find one for AF_INET either).

Many thanks

Contributor guide

No contributing guide indexed for this repository

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 comparing libc-bottom-half/headers/public/__header_sys_socket.h with libc-top-half/musl/include/sys/socket.h around line 209, then check the WASI specification for socket-option assignments. Resolve whether definitions are intentionally absent and where values such as AF_INET and SO_TYPE come from; done requires an agreed specification or numbering source and a defined scope for the missing options.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, wasm
Domain
networking, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.