-
Notifications
You must be signed in to change notification settings - Fork 1.2k
adds sockaddr_iucv #5041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
adds sockaddr_iucv #5041
Changes from 6 commits
db56f52
b02d775
02ec3b1
f113e57
c57a28d
5a9c3ed
2f53915
84da297
0e70b72
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -235,6 +235,24 @@ s! { | |
| } | ||
| } | ||
|
|
||
| cfg_if! { | ||
| if #[cfg(all( | ||
| any(target_arch = "x86_64", target_arch = "s390x"), | ||
| not(any(target_env = "musl", target_os = "android")) | ||
| ))] { | ||
| s! { | ||
| pub struct sockaddr_iucv { | ||
| pub siucv_family: crate::sa_family_t, | ||
| pub siucv_port: crate::in_port_t, | ||
| pub siucv_addr: crate::in_addr_t, | ||
| pub siucv_nodeid: [c_char; 8], | ||
| pub siucv_user_id: [c_char; 8], | ||
| pub siucv_name: [c_char; 8], | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Per https://github.com/torvalds/linux/blob/7ca6d1cfec80ebe46cc063f3284c5896c344d9a1/include/net/iucv/af_iucv.h#L46-L50 all except for the first field are reserved. Does common access require using them or could we make them private in case things change?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Port and Addr don't do anything as far as I know. Making them private should be fine. NodeID and UserID are used to specify your target z/VM ID to connect to, and Name is the application. However, my basic understanding of the C code is that NodeID is actually unused in the linux implementation, so I don't know if the right thing to do is make it private or leave it public in the hopes that some day it's fixed. In other words, at least UserID and Name should be public. I'll defer to experience on NodeID.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you don't know of port and addr to do anything and they have a "reserved" comment, would you mind making them private? It's nice to be on the conservative side here because a private field also makes the struct effectively non-exhaustive so we can add fields in the future (just using |
||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| cfg_if! { | ||
| if #[cfg(not(any(target_os = "emscripten", target_os = "l4re")))] { | ||
| s! { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this in
linux_like/linux/gnu; currently this is available on theoretical emscripten and l4re targets which I think probably doesn't make sense. I think you may also be able to drop thetarget_archlist too if you do that, and just leave it enabled everywhere.(test config will need to be updated to match)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'll try it under linux/gnu and see if the tests pass. Thanks.