Expected behavior of getsockname for unbound socket #76
Answered
by
Pusnow
metamon123
asked this question in
[Project Q&A] 2. Transport Layer (TCP)
-
Hi. I wonder the expected behavior of syscall In the following references which are mentioned in PA#2 doc, there is no well-defined specification for unbound socket input.
Specifically, I wonder these three.
|
Beta Was this translation helpful? Give feedback.
Answered by
Pusnow
Apr 11, 2022
Replies: 1 comment
-
Unbound socket would return
For the connected sockets, an address in 5-tuple is returned. If you're curious about the specific behavior of a system call, you can try it on a Linux machine. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
metamon123
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unbound socket would return
INADDR_ANY
(0.0.0.0) and zero for return value, and the result will not used in the PA3.For the connected sockets, an address in 5-tuple is returned.
If you're curious about the specific behavior of a system call, you can try it on a Linux machine.