user-mode tinc?

Guus Sliepen guus at sliepen.eu.org
Wed Oct 20 20:47:12 CEST 2004


On Wed, Oct 20, 2004 at 01:31:47PM -0500, David Nicol wrote:

> Once we've got a user-space daemon that joins the tinc VPN, I want a library, 
> that I can make calls to in a user-space program, that gives me VPN versions of
> the BSD socket library, taking the tinc socket as a parameter.  
> 
> So instead of socket, listen, accept, setsockopt, connect, getpeername,
> et cetera, there would be tinc_* versions of all of these that take a
> file system
> socket as a parameter.
> 
> Alternatively,  "umtinc/types.h" and a "umtinc/socket.h" header files could
> be dropped in place of <sys/types.h> and <sys/socket.h> to give full socket
> functionality  with traditional syntax.

If you make a preload library out of this that transparently replaces
all the socket operations, you can let any program use tinc that way, no
need to recompile with different headers and libraries. See for example
Rocks: http://www.cs.wisc.edu/~zandy/rocks/, and search for LD_PRELOAD
in the ld.so(8) manpage.

The hard part however is that tinc itself only deals with packets, not
with higher level socket functions. So you would have to take a user
space network stack (I'm sure there are some) and somehow fuse it to the
library you propose.

> While I'm dumping my socket library wish list, 
> I also want non-blocking connect that takes an int timeout parameter and an int*
> where the return value will go, for single-threaded multiplexing clients.
> 
> I fear it's just the coffee talking.

If you still have a surplus of caffeine in your veins, I suggest you
start hacking this :)

-- 
Met vriendelijke groet / with kind regards,
    Guus Sliepen <guus at sliepen.eu.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://brouwer.uvt.nl/pipermail/tinc/attachments/20041020/eb516598/attachment-0001.pgp


More information about the tinc mailing list