[iolib-devel] Abstract sockets

Julian Stecklina js at alien8.de
Tue Feb 3 00:47:54 UTC 2009


Hello,

the attached patch fixes abstract sockets for Linux. It least it tries
as it does not work:

strace output from dbus-monitor:
socket(PF_FILE, SOCK_STREAM, 0)         = 3
connect(3, {sa_family=AF_FILE, path=@"/tmp/dbus-RhgMDI9FXg"...}, 23) = 0

strace output from my app using iolib:
socket(PF_FILE, SOCK_STREAM, 0)         = 5
connect(5, {sa_family=AF_FILE, path=@"/tmp/dbus-RhgMDI9FXg"...}, 110) = -1 ECONNREFUSED (Connection refused)

It seems as if connect (and bind) have to be passed "exact" sizes as
addrlen parameter. But what is a good (i.e. portable) way to compute
these? Using (+ 3 (length address)) (counting the address family word,
the zero byte, and the string) would be quite a hack...

Regards,
-- 
Julian Stecklina

Well, take it from an old hand: the only reason it would be easier to
program in C is that you can't easily express complex problems in C,
so you don't. - Erik Naggum (in comp.lang.lisp)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: abstract-sockets.patch
Type: text/x-patch
Size: 2473 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/iolib-devel/attachments/20090203/39c96adb/attachment.bin>


More information about the iolib-devel mailing list