Hi Lijin liu,<br>There is sk_sleep function in include/net/sock.h line 1241 This might help.<br clear="all"><i style="font-family:tahoma,sans-serif;color:rgb(153, 0, 0)"><b>- Bharath H S</b></i><br><br>
<br><br><div class="gmail_quote">On Wed, Dec 22, 2010 at 11:47 AM, lijin liu <span dir="ltr"><<a href="mailto:llj098@gmail.com">llj098@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello everyone!<br>
<br>
I am trying to implement a simple tcp server in the kernel. I read the<br>
ktcpvs's source code, but it works under kernel 2.4.<br>
<br>
The struct sock changed in kernel 2.6, I have two questions about the struct:<br>
<br>
1. Is sk_wq field in 2.6 equals to sk_sleep field in 2.4?<br>
2. How can I access the tcp accept queue in kernel 2.6? (In kernel<br>
2.4, we could use tp_pinfo.af_tcp.accept_queue, but it was removed in<br>
2.6)<br>
<br>
<br>
PS: Should sk_receive_queue in the struct sock be used as<br>
tp_pinfo.af_tcp.accept_queue?<br>
<br>
Thanks a lot!<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br>