adds support for AF_IUCV sockets - #668
Conversation
|
Off to a good start. Clippy I can fix (doing so now), but I need some advice for the other two. For the external types checking, does that mean I'm not allowed to return a libc::sockaddr_iucv? It was the easiest way I could think of to get to the user_id and name fields. For 3ds, I'm surprised my cfg clause didn't prevent that, unless the runner is just busted? |
That's correct, we don't want to depend on any external libraries in our API otherwise we can change that dependency version (e.g. going from libc 0.2 to libc 1.0 would be a breaking change, even though the structure would likely not change).
You can ignore that one, it's a problem with the standard library |
Okay, that makes sense, but I'm less sure how to proceed now. Since there's no SockAddrIucv in the standard library to mirror SockAddrV4 and SockAddrV6 I can't just return one. I see two options:
|
Have you looked at |
This is my first attempt to add IUCV support. This references issue #667 .
The way I've tried to restrict this to only platforms with IUCV headers (as far as I can tell, this is GNU Linux on x86_64 and s390x) is with the following:
Let me know if that can be improved.
I've also added an
is_iucvandas_socket_iucv, doing my best to model that off of the existing functions.I've tested this on x86_64 Linux, and s390x Linux and it's all working as I hoped. I'm hoping that like libc you'll have a suite of tests to make sure I'm not introducing any issues in any platforms I'm not able test.
Scrutiny welcome, always looking to improve.