> getaddrinfo > while(res) { > skt = socket(res->ai_family, res->ai_socktype, res->ai_protocol) > bind(skt) > listen(skt) > next res > } > is this correct? Do I need to make several socket calls to listen to > all addresses?
Yes, and after you do a select (or poll) before accepting. But... linux won't work that way because if you have a socket listening for ipv6 it will take the ipv4 connections and won't let you bind to the same port for ipv4. USAGI worked right until some time ago when they went down the same road. That's the ugliest part of programming with IPv6 (and that's because the ugly IPv4 mapped addresses) > I'm doing this partly ito document it, so it is easier for others. > -- > Craig Small VK2XLZ GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5 > Eye-Net Consulting http://www.eye-net.com.au/ <[EMAIL PROTECTED]> > MIEEE <[EMAIL PROTECTED]> Debian developer <[EMAIL PROTECTED]> HoraPe --- Horacio J. Peņa [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]