struct sock change in kernel 2.6
lijin liu
llj098 at gmail.com
Thu Dec 23 00:19:23 EST 2010
On Thu, Dec 23, 2010 at 1:16 PM, Mulyadi Santosa
<mulyadi.santosa at gmail.com> wrote:
> On Thu, Dec 23, 2010 at 07:18, lijin liu <llj098 at 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 accept. (thsi method is in net/request_sock.h)
>> we can use it like:
>>
>> struct inet_connection_sock *isock = inet_csk(socket->sk);
>> if(reqsk_queue_empty(&isock->icsk_accept_queue)){
>> //sleep here
>> }
>
> Thanks for sharing :) I believe you're intention is porting that code
> to latest kernel version, right?
>
> Then, i humbly suggest that you contribute the porting back to the
> original project. Who knows, that way many people will get the
> advantage and indirectly you got the benefit too: you become popular
> :)
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>
I will try when I am free. Thanks!
:)
More information about the Kernelnewbies
mailing list