Open waldiTM opened 1 month ago
What API would need to be added to the net package? Thanks.
Sorry, I can't answer this. I don't know enough about how this should work.
I see separate implementations of sockaddr structs in syscall
and x/sys/unix
. So I assume right now, it would need the ones from syscall
?
This means:
src/syscall/types_linux.go
: map struct sockaddr_vm
to RawSockaddrVM
src/syscall/syscall_unix.go
(or _linux.go
?): add SockaddrVM
structsrc/syscall/syscall_linux.go
: implement AF_VSOCK
support in anyToSockaddr
function.src/net/file_unix.go
: implement support in newFileFD
and fileListener
src/net/vmlistener.go
: implement a separate listener for vsock connectionProblem I see: vsock is linux specific, the net package code is unix specific.
Thanks. The way the proposal process is intended to work is that people work out the details of how the libraries should change and open a proposal for that. It doesn't work to ask us to figure things out--we don't know what you need. I'm going to take this out of the proposal process. Perhaps interested parties can work out the API changes, and then we can open a proposal for that.
Proposal Details
There exists basic support for
AF_VSOCK
sockets implemented in #19434.Could support for such sockets please be added to the net module? For example
net.FileListener
can operate on TCP and UNIX sockets, but fails on vsock sockets.