This is a discussion on question on inpcb structures within the lucky.openbsd.tech forums, part of the OpenBSD category; --> Hi all, I am trying to understand the flow of packets up the TCP/IP stack and for now would ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all, I am trying to understand the flow of packets up the TCP/IP stack and for now would like to get a basic understanding. From what I understand, the listen() syscall is going to put the caller to sleep and when it returns, the inpcb structure for that socket will have its inp_faddr and inp_fport fields filled in so that when accept() is called later, these fields will be copied into the mbuf that is sent back to the caller. What I am trying to find is where in the code is the inp_faddr and inp_fport fields are filled with the remote address and remote port. I'm guessing these fields are going to be filled in from the IP header once the three way handshake is over. But there is just so much code in tcp_input() that I am having trouble locating what I need. Any help would be greatly appreciated. Thanks, Bijoy Thomas. |