Re: struct sock change in kernel 2.6

2010-12-22 Thread lijin liu
Hi Bharath,all, On Thu, Dec 23, 2010 at 12:31 AM, Bharath H S bhslin...@gmail.com wrote: Hi Lijin liu, There is sk_sleep function in include/net/sock.h line 1241 This might help. - Bharath H S On Wed, Dec 22, 2010 at 11:47 AM, lijin liu llj...@gmail.com wrote: Hello everyone! I am

Re: struct sock change in kernel 2.6

2010-12-22 Thread Mulyadi Santosa
On Thu, Dec 23, 2010 at 07:18, lijin liu llj...@gmail.com wrote: After reading the source code, comparing the codes of the two versions I got the answer: 1.We can use sk_wq-wait instead of sk_wait. 2.Use reqsk_queue_empty(struct request_sock_queue*) to check if there is a new connection to

struct sock change in kernel 2.6

2010-12-21 Thread lijin liu
Hello everyone! I am trying to implement a simple tcp server in the kernel. I read the ktcpvs's source code, but it works under kernel 2.4. The struct sock changed in kernel 2.6, I have two questions about the struct: 1. Is sk_wq field in 2.6 equals to sk_sleep field in 2.4? 2. How can I