#1699: Fix network wrt abstract unix sockets
---------------------------------------+------------------------------------
 Reporter:  [EMAIL PROTECTED]  |          Owner:          
     Type:  proposal                   |         Status:  new     
 Priority:  normal                     |      Milestone:  Not GHC 
Component:  libraries/network          |        Version:  6.6.1   
 Severity:  normal                     |     Resolution:          
 Keywords:                             |     Difficulty:  Unknown 
 Testcase:                             |   Architecture:  Multiple
       Os:  Linux                      |  
---------------------------------------+------------------------------------
Comment (by kolmodin):

 The first patch, attachment:"network_aus.dpatch", included both switching
 the use of CInt into CSockLen, and the abstract namespace features, I'm
 not sure it applies any more.

 attachment:"network_csocklen_cleanup.dpatch" has only the CInt to CSockLen
 changes and should apply to the current darcs repo.

 The AUS extention will follow in a third patch, once we've decided how we
 want it structured.
 The issue is that it looks and behaves very similar to
 UnixSocket/SockAddrUnix, but only works under the linux platform, not all
 Unix.
 To use abstract unix sockets in C you do as usual with the unix socket,
 but let the address have a leading zero instead of a trailing zero, also
 it's more picky about the CSockLen as there is no other way to indicate
 the length of the path.
 This is also what the first patch reflects, it uses UnixSocket and expects
 you to prefix your address with byte zero.

 Is this what we want? Currently I'm more leaning towards adding a new
 constructor, UnixAbstractSocket/SockAddrAbstUnix, which only would be
 visible on linux system where the linux kernel feature actually exists.
 Thus client code using it would require preprocessing to use the
 constructor when only when adequate. This would make code using this
 feature on other platforms simply not compile.

 Good / bad? Let me know.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1699#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to