Update TODO
authorAndreas Schneider <asn@samba.org>
Wed, 15 Jul 2015 13:18:08 +0000 (15:18 +0200)
committerAndreas Schneider <asn@samba.org>
Wed, 15 Jul 2015 13:18:08 +0000 (15:18 +0200)
TODO

diff --git a/TODO b/TODO
index fe05c75faaf4604130904a8fba7a718faada0362..147c166c8dd12bf1d6557de96fadade7085e1bbb 100644 (file)
--- a/TODO
+++ b/TODO
@@ -9,13 +9,19 @@ look at the list below.
 Library:
 ---------
 
-* Add support for fd passing in sendmsg/recvmsg.
-  Scenario:
-  We accept a connection from a client and need to pass the fd to another
-  child we forked. socket_wrapper then needs to send the 'struct socket_info'
-  to the child first and set it up there.
-  Or do it like swrap_accept() and call getpeername() and getsockname().
-* Add support for threading.
+Goals:
+* Thread safety
+* The proposed way ==> - fd-passing for tcp sockets (for free)
+  Approach:
+  - tdb "in small". So a "db file".
+    - for each socket an entry in the db file
+      (file, mmap, robust mutex. e.g. one file per local ip addr)
+    - socket_info : structure in db. protected by pthread robust mutexes
+    - socket_info_fd : --> pointer into mmap area of db
+    - free-list
+  - fd-passing: pass index in array
+    - the last element we pass is not a fd but the index number in the
+      mmaped file
 * Use realpath() in socket_wrapper_dir().
 
 Testing: