-
Notifications
You must be signed in to change notification settings - Fork 19
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
Feat unix streams #24
Conversation
Add flow_info and scope_id to IPv6 address translation
addr6.sin6_flowinfo = 0; | ||
addr6.sin6_scope_id = 0; | ||
addr6.sin6_flowinfo = need_revert?htonl(peer_addr->u.inet6.addr.flow_info):peer_addr->u.inet6.addr.flow_info; | ||
addr6.sin6_scope_id = need_revert?htonl(peer_addr->u.inet6.addr.scope_id):peer_addr->u.inet6.addr.scope_id;; |
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.
You are sure the need_revert
test also apply to those new field?
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.
I'm 99% sure, but let me make 100% sure all the same.
@@ -4,6 +4,8 @@ | |||
#define FIONREAD 1 | |||
#define FIONBIO 2 | |||
|
|||
#define TIOCGWINSZ 0x101 |
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.
using random constant can be risky in the future...
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.
Definitely. I did this since the FIONREAD
and FIONBIO
constants where already redeclared as 1 and 2, which seems random enough; however, I went for an extra 0x100
to keep FIO
and TIO
kind of distinct. The usual implementation of this constant takes into account things such as the size of the result struct, which I suppose is relevant when implementing the syscall in the kernel. For our usecase, we don't really need the additional data, so I thought a simple number would suffice. I can change it to something else if you feel it's inappropriate.
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.
POSIX expect the port to be in "network order", so bigeeendian. The "need_reverse" test and the reversal of the port is needed there, please keep it.
30b2ff9
to
3c194fb
Compare
3c194fb
to
c7cfb2d
Compare
CI is red, but that seems to be an issue with the CI test iotself? |
Yes, the red pipelines are from the original wasi-libc. The one we merged today is green. |
A few changes related to sockets, unix streams and tty (all needed for
crossterm
to work):sockaddr_un