I've got a couple of questions about TCP code that I'm hoping someone
could answer.  I have a kernel thread with a struct sock waiting for a
state_change callback, but the callback is never getting, well, called
back.

When I setup the socket, I do the following steps

sock_create (new_socket, ...)
setup the sin structure
new_socket->ops->bind (new_socket, (struct sockaddr_in *) sin, ...)
new_socket->ops->listen (new_socket, ...)

I then setup the callbacks:

new_socket->sk->state_change = foo;
new_socket->sk->data_ready = bar;

At this point, everything in new_socket and new_socket->sk looks OK to me.

When I try and send data to the socket from the other end, however,
neither of these callbacks is ever activated.

So, here are my questions:

- My understanding from the code is that sk->state_change is called when a
struct sock transits from SYN_RCVD to ESTABLISHED and from ESTABLISHED to
{CLOSE_WAIT,FIN_WAIT_1}.  Is this correct?

- sk->data_ready is called whenever any new data is deposited in the
associated sk_buff.  Is this correct?

Bob





-- 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to