fasync_list query

Mark Stacey (heathclf@skynet.csn.ul.ie)
Sun, 1 Mar 1998 22:21:19 +0000 (GMT)

I have a question regarding sleeping sockets, and waking them up to pass
data to them.

What is happening is that I need to be able to store data that arrived in
an initial SYN packet, and then pass it to the process when the three way
handshake has been completed. I'm at the stage where I can save the data
in an skb queue in the sock struct, and then when I need the data, I can
retrieve it. The problem comes when the tcp_queue() function tries to
pass the data to the socket. It does this through a call to data_ready()
which is a pointer to def_callback2() in the af_inet.c file.

I know that the sock_wake_async() call fails because the check on
sock->fasync_list fails. This function is located in the ./net/socket.c

Under what circumstances do I need to set up the fasync_list field and how
is it done? What is done differently under normal TCP/IP processing that I
might not be doing here? Should I set the socket sleeping after saving the
skb with the data in it?

Mark Stacey

... and that's my two cents.

"Its not that I forgot, its just that I can't remember"

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu