-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathtodo.txt
30 lines (20 loc) · 792 Bytes
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/** Done **/
struct socket *accept_socket
Issue a call to sock_create(&accept_socket)
every time when looking for a new connection.
That means bring the sock_create() with the
while(1) loop.
This is necessary as, on exploring code of
accept sys call (accept4) in net/socket.c,
it was found that the syscall isuues a call
to sock_alloc(), which returns a new socket
every time.
--------------------------------------------
Add a wait queue for connection handler
thread, add it to accept_socket->sk->sk_wq->wait queue.
The condition for which it waits should be,
!skb_queue_empty(&accept_socket->sk->sk_receive_queue),
i.e. something (msg) should be received in the
sk_receive_queue of the sock struct associated with the
accept_socket socket for this connection.
/** Done **/