#2103: Some functions in network library do not work on NetBSD
-------------------------------+--------------------------------------------
 Reporter:  iquiw              |          Owner:          
     Type:  bug                |         Status:  reopened
 Priority:  high               |      Milestone:  6.10.1  
Component:  libraries/network  |        Version:  6.8.3   
 Severity:  major              |     Resolution:          
 Keywords:  network            |     Difficulty:  Unknown 
 Testcase:                     |   Architecture:  x86     
       Os:  NetBSD             |  
-------------------------------+--------------------------------------------
Comment (by cjs):

 iquiw: Thanks! I'd never thought to check IPv6. Indeed, it is listening on
 IPv6, and I can successfully connect to it (using telnet) and see the
 output. I think there ought to be a way to use IPv4 with Network, but I'll
 file another report for that.

 However, I still seem to have some issues here. Before I filed my first
 comment here, I also tried using Network.Socket, with no luck. This
 program appears not to listen on any network protocol:
 {{{
 import IO
 import Network.Socket

 main = do
     s <- socket AF_INET Stream defaultProtocol
     bindSocket s (SockAddrInet (PortNum 4444) iNADDR_ANY)
     listen s 7
     print s
     (ss, sa) <- Network.Socket.accept s
     print ss
     print sa
 }}}

 Just to check, I did an IPv6 version of this, and it has the same issue,
 though I'm not perfectly certain that a !FlowInfo and ScopeID of 0 are
 correct.
 {{{
 import IO
 import Network.Socket

 main = do
     s <- socket AF_INET6 Stream defaultProtocol
     bindSocket s (SockAddrInet6 (PortNum 4444) 0 iN6ADDR_ANY 0)
     listen s 7
     print s
     (ss, sa) <- Network.Socket.accept s
     print ss
     print sa
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2103#comment:9>
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