bytecodealliance / bytecodealliance/rustix

Netlink socket protocols are largely actually socket options, which are also missing

Aperta
#1,252 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
2.1k
Fork
296
Merge medio
6g 22h
PR unite (30g)
4

Descrizione

https://docs.rs/rustix/0.38.42/rustix/net/sockopt/index.html

Many of the supposed netlink protocols are in reality netlink specific socket options, which are also completely missing in the sockopt module

https://docs.rs/rustix/0.38.42/rustix/net/netlink/constant.ADD_MEMBERSHIP.html
https://docs.rs/rustix/0.38.42/rustix/net/netlink/constant.DROP_MEMBERSHIP.html
https://docs.rs/rustix/0.38.42/rustix/net/netlink/constant.LIST_MEMBERSHIPS.html
https://docs.rs/rustix/0.38.42/rustix/net/netlink/constant.BROADCAST_ERROR.html
https://docs.rs/rustix/0.38.42/rustix/net/netlink/constant.NO_ENOBUFS.html
https://docs.rs/rustix/0.38.42/rustix/net/netlink/constant.CAP_ACK.html
https://docs.rs/rustix/0.38.42/rustix/net/netlink/constant.EXT_ACK.html
https://docs.rs/rustix/0.38.42/rustix/net/netlink/constant.GET_STRICT_CHK.html
https://docs.rs/rustix/0.38.42/rustix/net/netlink/constant.LISTEN_ALL_NSID.html
https://docs.rs/rustix/0.38.42/rustix/net/netlink/constant.PKTINFO.html

all of these are socket options described in [`netlink.7`](https://man.archlinux.org/man/netlink.7.en) or [the netlink handbook](https://docs.kernel.org/userspace-api/netlink/intro.html#strict-checking).

----

Additionally, when I read rustix was low-level and "aims to provide safe and idiomatic Rust interfaces to low-level syscalls", I was surprised to find no direct interface to many syscalls, but instead high level wrappers exclusively exposing specific subsets of them that rustix knows about, and nothing for those it doesn't.

I was expecting a lower level API to syscalls like this, with all the benefits of type, memory, and I/O safety rustix provides over the raw syscalls and bare integers, but that doesn't seem to be a design goal for rustix.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia leggendo i moduli rustix/net/netlink e rustix/net/sockopt, quindi confronta le relative costanti esportate con la documentazione netlink.7 collegata e il manuale netlink. Chiarisci se l’obiettivo è riclassificare le costanti elencate, aggiungere interfacce per le opzioni dei socket o definire un’API syscall più ampia; il completamento dipende da questa decisione progettuale.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
linux, rust
Ambito
networking, operating-systems
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.