From: Matthew D. S. <ak...@ch...> - 2008-06-30 02:40:24
|
On Sat, 28 Jun 2008 11:41:53 -0400 Richard M Kreuter <kr...@pr...> wrote: > Matthew D. Swank writes: > > Thomas F. Burdick <tburdick <at> gmail.com> writes: > > > > > > > > On Fri, Jun 27, 2008 at 5:37 AM, Matthew D. Swank > > > <akopa.gmane.poster <at> gmail.com> wrote: > > > > > > > > There is a problem in trying to use the abstract namespace for > > > > AF_LOCAL. Address in the abstract namespace are _not_ C strings. > > > > > > > > ... > > > > > > Would it be possible to ... support a subtype of LOCAL-SOCKET > > > > > > It should be pretty simple to support byte arrays as specifying > > > abstract namespace addresses. That sounds like the most reasonable > > > interface, too. > > > > > > > It does seems kind of low level to be reduced to using byte array > > in this particular instance, especially when it's "just" a special > > string conversion. > > There are alternatives: > > * have a subclass of LOCAL-SOCKET for sockets whose addresses are in > the abstract namespace, > Attached is a first pass at adding AF-LOCAL sockets with abstract namespace addresses as a subclass of LOCAL-SOCKET. It adds an alternate grovel of socketaddr-un that specifies the path as an (unsigned 8) array. Since the path is not a c-string, it is necessary to provide correct a correct addrlen to connect and bind. To that end make-sockaddr-for returns addr-len as an additional value. This is implemented w/o touching the existing LOCAL-SOCKET code, but it could be integrated easily into the LOCAL-SOCKET type. Matt -- "You do not really understand something unless you can explain it to your grandmother." -- Albert Einstein. |