Adding support for AF_IUCV
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 870
- Forks
- 305
- PR merge metrics
- No merged PRs in 30d
Description
Hello all. As stated in the title I'm looking to add support for AF_IUCV sockets. Your contributing guide says to open an issue, so here I am.
AF_IUCV is an abstraction layer for IUCV (Inter User Communication Vehicle) on IBM Mainframes. It is predominantly used on z/VM and Linux on Z running under z/VM, though it can be used in other fashions such as with HyperSockets or z/OS.
The sockaddr struct looks like the following:
pub struct sockaddr_iucv {
pub siucv_family: crate::sa_family_t,
__siucv_port: Padding<u16>, // unused crate::in_port_t
__siucv_addr: Padding<u32>, // unused crate::in_addr_t
pub siucv_nodeid: [c_char; 8], // technically unused on Linux, hopefully not forever
pub siucv_user_id: [c_char; 8],
pub siucv_name: [c_char; 8],
I got this added to libc in version 0.2.188 and would like to extend this to socket2 now.
Other than the connection method being to specify a "userid" and application "name", they work more or less like any other socket, going through the process of bind, listen, accept, or connect. The headers for them can be found on most 64-bit GNU Linux systems, which is nice since I do most of my development work on my laptop, but I think they're probably only usable on IBM Z.
I have already forked socket2 and added them to test that they worked, and I'm happy to report that they do, I can connect rust code on Linux on Z to my z/VM CMS IDs and communicate just fine, but that was a while ago so I'd need to rebase off the latest version, and there's a few things I'd like advice on.
- Should this become a variant of the SockAddr enum? SockAddrIucv?
- Because it can be useful to get the userid of the person connecting to you in a server situation, how would you recommend setting that up?
- How is the best way to restrict this to only 64-bit GNU Linux and Linux on the s390x platform?
Thank you for you consideration and let me know if I can explain anything better or in more detail.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the SockAddr enum and existing socket-address variants, then compare the libc sockaddr_iucv definition and headers available on 64-bit GNU Linux and s390x. Resolve the API shape, peer userid access, and platform cfg boundaries; done means AF_IUCV sockets support bind, listen, accept, and connect on the supported platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, rust
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100