[racket] tcp-connect and IPv6...

From: Rüdiger Asche (rac at ruediger-asche.de)
Date: Sun May 6 12:35:14 EDT 2012

ok, sorry...

(tcp-connect   hostname         
    local-port-no])   →   input-port?   output-port? 

If hostname already resolves to an IPv6 address, you are done - to test (locally):

In /etc/hosts, add something like     localhostipv4
::1               localhostipv6

then open a connection to localhostipv6. That'll get you via an IPv6 interface - which one I don't know since there is no scope Id you can specify in the call to connect!

Another way is to set local-hostname to localhostipv6, but then you can not leave local-port-no unspecified (I don't have any idea why that is so; I don't see any reason prescribed by IPv6 for it) which has ugly side effects (such as the one that you can't reopen the connection with the same local port unless TCP has nuked the old one completly which may take a while; also, there is not really a way to figure out if a port you select is in use or not).

For test purposes it works, but it appears that there is work left to be done...

  ----- Original Message ----- 
  From: Grant Rettke 
  To: Rüdiger Asche 
  Cc: users at racket-lang.org 
  Sent: Sunday, May 06, 2012 5:42 PM
  Subject: Re: [racket] tcp-connect and IPv6...

  What was the answer?

  On Sun, May 6, 2012 at 3:45 AM, Rüdiger Asche <rac at ruediger-asche.de> wrote:

    well I could have answered that myself (I did, eventually)... sorry for the noise...
    ----- Original Message ----- From: "Rüdiger Asche" <rac at ruediger-asche.de>
    To: <users at racket-lang.org>
    Sent: Friday, May 04, 2012 3:10 PM
    Subject: [racket] tcp-connect and IPv6...

      Hi there,

      is there a way on Racket to force an outgoing TCP connection (tcp-coonect) to go through an IPv6 interface on a multihomed machine?


       Racket Users list:

     Racket Users list:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120506/632b5515/attachment.html>

Posted on the users mailing list.