Login
User Name:

Password:



Register

Forgot your password?
 IPv6
Jan 20, 2025 12:38 pm
By GatewaySysop
mudstrlcpy and mudstrlcat
Jan 18, 2025 5:23 pm
By Samson
I3 and IMC
Jan 17, 2025 9:35 pm
By Samson
AFKMud 2.5.1
Jan 17, 2025 2:22 pm
By Samson
Array out of bounds ?
Jan 16, 2025 4:48 am
By Remcon
SmaugFUSS 1.9.7
Author: Various
Submitted by: Samson
AFKMud 2.5.1
Author: AFKMud Team
Submitted by: Samson
Kayle's Weather Code for AFKMud
Author: Kayle
Submitted by: Samson
AFKMud 2.5.0
Author: AFKMud Team
Submitted by: Samson
SWFotEFUSS 1.5.2
Author: Various
Submitted by: Samson
Users Online
Anthropic, DotBot, Bytespider, Bing

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
503
3,811
19,713
593
LuannGipso

» SmaugMuds » General » Coding » IPv6
Forum Rules | Mark all | Recent Posts

IPv6
< Newer Topic :: Older Topic >

Pages:<< prev 1, 2, 3 next >>
Post is unread #21 Dec 26, 2011 6:28 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,705
JoinedJan 1, 2002

 
Well that's a start I guess. It does look to me like they're only binding one port number, which would be what I was hoping for. I'll see if I can muster some time later to try something on my server and see if it will at least bind. I don't have IPv6 connectivity at home to verify it with though.

Post is unread #22 Dec 28, 2011 9:32 pm   
Go to the top of the page
Go to the bottom of the page

InfiniteAxis
Off the Edge of the Map
GroupAdministrators
Posts1,199
JoinedMar 21, 2006

 
You might try on the VPS. I can't remember if it has IPv6 or not.

Post is unread #23 Dec 28, 2011 10:15 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,705
JoinedJan 1, 2002

 
Yours doesn't, mine does. I'll take a look at it a bit later.

Post is unread #24 Dec 29, 2011 2:47 am   Last edited Dec 29, 2011 2:48 am by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,705
JoinedJan 1, 2002

 
Test code for init_socket (ignore the bogus return at the end for now):
int init_socket( int mudport )
{
   struct addrinfo hints, *res, *ptr;
   char mport[MIL];
   int sock[16];
   int rc, count=0;
   int x = 1;

   memset( &hints, 0, sizeof hints );
   hints.ai_family = AF_UNSPEC;
   hints.ai_socktype = SOCK_STREAM;
   hints.ai_protocol = IPPROTO_TCP;
   hints.ai_flags = AI_PASSIVE;

   snprintf( mport, MIL, "%d", mudport );
   if( (rc = getaddrinfo( NULL, mport, &hints, &res )) < 0 )
   {
      perror( "Init_socket: getaddrinfo" );
      exit(1);
   }

   ptr = res;

   while( ptr )
   {
log_printf( "Count: %d", count );
log_printf( "Family: %d, Socktype: %d, Proto: %d", ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol );
      if( (sock[count] = socket( ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol )) < 0 )
      {
         perror( "Init_socket: socket" );
         exit(1);
      }
log_printf( "Sock: %d", sock[count] );
      if( setsockopt( sock[count], SOL_SOCKET, SO_REUSEADDR, ( void * )&x, sizeof( x ) ) < 0 )
      {
         perror( "Init_socket: SO_REUSEADDR" );
         close( sock[count] );
         exit( 1 );
      }

      if( bind( sock[count], ptr->ai_addr, ptr->ai_addrlen ) < 0 )
      {
         perror( "Init_socket: bind" );
         close( sock[count] );
         exit( 1 );
      }

      if( listen( sock[count], 50 ) < 0 )
      {
         perror( "Init_socket: listen" );
         close( sock[count] );
         exit( 1 );
      }
      count++;
      ptr = ptr->ai_next;
   }
   return sock[count];
}


Result:
Thu Dec 29 03:45:58 2011 :: Initializing socket
Thu Dec 29 03:45:58 2011 :: Count: 0
Thu Dec 29 03:45:58 2011 :: Family: 2, Socktype: 1, Proto: 6
Thu Dec 29 03:45:58 2011 :: Sock: 3
Thu Dec 29 03:45:58 2011 :: Count: 1
Thu Dec 29 03:45:58 2011 :: Family: 10, Socktype: 1, Proto: 6
Thu Dec 29 03:45:58 2011 :: Sock: 4
Init_socket: bind: Address already in use


So it's back to the same old crap as before. Not allowing to bind everything to one port, despite the obvious fact that other services on the box are doing so without issue. Something is clearly missing here but I have no idea what.

Post is unread #25 Dec 29, 2011 11:54 am   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts428
JoinedMar 7, 2005

 
Hmm. I'm curious about this part that I found in one of the later examples at the page I mentioned earlier. Would something like this make a difference?

                        // After the socket descriptor is created, a bind() function gets a
                        // unique name for the socket.  In this example, the user sets the
                        // address to in6addr_any, which (by default) allows connections to
                        // be established from any IPv4 or IPv6 client based on the hostname
                        // that specifies port 7171.
                        // That is, the bind is done to both the IPv4 and IPv6 TCP/IP
                        // stacks. However this sample program only accept the IPv4 hostname, then
                        // the client must prepare to convert the IPv4 address to the hostname
                        // before translating the IP string to network address before making a connection
                        // using various Winsock API such as getaddressinfo() etc.

                        memset(&serveraddr, 0, sizeof(serveraddr));
                        serveraddr.sin6_family = AF_INET6;
                        serveraddr.sin6_port   = htons(SERVER_PORT);

                        // Applications use in6addr_any similarly to the way they use
                        // INADDR_ANY in IPv4.

                        serveraddr.sin6_addr   = in6addr_any;

                        // The remaining fields in the sockaddr_in6 are currently not
                        // supported and should be set to 0 to ensure upward compatibility

                        if (bind(sd, (struct sockaddr *)&serveraddr, sizeof(serveraddr)) == SOCKET_ERROR)


I'm no expert on sockets (maybe someday if I have more time!) but maybe this is helpful. :shrug:

Post is unread #26 Dec 29, 2011 1:42 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,705
JoinedJan 1, 2002

 
That appears to be wanting to open this as an IPv6 only socket though. Unless there's no other way to do this that's not really what we're after here.

Post is unread #27 Jun 1, 2012 12:48 am   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts428
JoinedMar 7, 2005

 
Checking in to see if anything new has developed on this front? Anyone? :thinking:

Post is unread #28 Jun 7, 2012 12:02 am   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,705
JoinedJan 1, 2002

 
Nope. Apparently there's just not enough interest in moving on this. I'd still like to see it get added at some point but only if IPv4 and IPv6 traffic can live on the same port somehow.

I also don't have access to a server with IPv6 capability anymore, nor do I have IPv6 network access at home (yeah, thanks Verizon, for being so backward).

Post is unread #29 Jun 13, 2012 2:31 pm   Last edited Jun 13, 2012 2:38 pm by Kober
Go to the top of the page
Go to the bottom of the page

Kober
Fledgling
GroupMembers
Posts1
JoinedApr 6, 2010

 
Here is my init_socket that seems to work.

int init_socket(int port)
{
  char mport[MIL];
	int sockfd, yes = 1, rv;
	struct addrinfo hints, *servinfo, *p;
	
	memset(&hints, 0, sizeof hints);
	hints.ai_family = AF_UNSPEC;
	/*hints.ai_family = AF_INET;*/
	hints.ai_socktype = SOCK_STREAM;
  hints.ai_protocol = IPPROTO_TCP;
	hints.ai_flags = AI_PASSIVE;
	
  snprintf(mport, MIL, "%d", port);
	if ((rv = getaddrinfo(NULL, mport, &hints, &servinfo)) != 0)
	{
        fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv));
        return 1;
    }
	
	for(p = servinfo; p != NULL; p = p->ai_next)
	{
		if((sockfd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1)
		{
			perror("Init_socket: socket" );
			continue;
		}
		
		if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(int)) == -1)
		{
            perror("Init_socket: SO_REUSEADDR" );
			close(sockfd);
            exit(1);
        }
		
#if defined(SO_DONTLINGER) && !defined(SYSV)
		{
			struct linger ld;
			ld.l_onoff=1;
			ld.l_linger=1000;
		
			if(setsockopt(sockfd, SOL_SOCKET, SO_DONTLINGER, (char *)&ld, sizeof(ld))< 0)
			{
				perror( "Init_socket: SO_DONTLINGER" );
				close(sockfd );
				exit( 1 );
			}
		}
#endif

		if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1)
		{
            perror("Init_socket: bind" );
			close(sockfd);
            continue;
        }
		break;
	}
	
	if (p == NULL)
	{
        fprintf(stderr, "server: failed to bind\n" );
        return 2;
    }
	
	freeaddrinfo(servinfo); // all done with this structure

    if (listen(sockfd, 3) == -1)
	{
        perror("Init_socket: listen" );
		close(sockfd);
        exit(1);
    }
	return sockfd;
}

Post is unread #30 Jun 14, 2012 1:39 am   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts428
JoinedMar 7, 2005

 
Stumbled on this, thought it might provide some insight on the bind( ) problems. Have not had a chance to play around with it yet.

Binding Sockets to IPv4 and IPv6

Perhaps this is more helpful. :cyclops:

Post is unread #31 Jun 30, 2012 1:41 pm   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts428
JoinedMar 7, 2005

 
Anyone? :cricket:

I'm going to take a crack at this stuff again as soon as I have time, looks like the link I mentioned might lead to a solution to our problems.

Post is unread #32 Jun 30, 2012 9:17 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,705
JoinedJan 1, 2002

 
Could be, but I no longer have access to a server with IPv6 capabilities.

Also nice to see the cricket emote get some love :P

Post is unread #33 Oct 27, 2014 6:40 pm   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts428
JoinedMar 7, 2005

 
Kober said:

Here is my init_socket that seems to work.


Decided to look at this again, along with the link I posted before that talked about IPv4 and IPv6 coexisting. Maybe I'm wrong, but isn't the code from Kober missing only something like this to make it work, at least in theory? :wink:

#ifdef IPV6_V6ONLY
        {
           int v6only = 1;
           if (p->ai_family == AF_INET6 && setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, &v6only, sizeof(v6only)) < 0) {
              close(sockfd);
              continue;
           }
        }
#endif


If anyone wants to slap that into Kober's posted code and give it a try, assuming anyone has IPv6 connectivity to make use of, that would be helpful. Would be nice if this was the only missing link. :alien:


Post is unread #34 Jan 18, 2025 1:49 am   Last edited Jan 18, 2025 1:52 am by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,705
JoinedJan 1, 2002

 
So I know this is literally a decade old topic now, but as I was going through old posts I stumbled on this and decided to have a go at it - with the help of Google's Search AI. Yes, I know, trusting AI etc. I only used what it told me as an example. In doing so, this is what I currently have for init_socket():

int init_socket( int mudport )
{
   struct sockaddr_in6 serv_addr6;
   int x = 1, ipv6only = 0;
   int fd;

   if( ( fd = socket( AF_INET6, SOCK_STREAM, 0 ) ) < 0 )
   {
      perror( "Init_socket: socket" );
      exit( 1 );
   }

#if defined(WIN32)
   if( setsockopt( fd, IPPROTO_IPV6, IPV6_V6ONLY, ( const char * )&ipv6only, sizeof( ipv6only ) ) < 0 )
#else
   if( setsockopt( fd, IPPROTO_IPV6, IPV6_V6ONLY, ( void * )&ipv6only, sizeof( ipv6only ) ) < 0 )
#endif
   {
      perror( "Init_socket: IPPROTO_IPV6" );
      close( fd );
      exit( 1 );
   }

#if defined(WIN32)
   if( setsockopt( fd, SOL_SOCKET, SO_REUSEADDR, ( const char * )&x, sizeof( x ) ) < 0 )
#else
   if( setsockopt( fd, SOL_SOCKET, SO_REUSEADDR, ( void * )&x, sizeof( x ) ) < 0 )
#endif
   {
      perror( "Init_socket: SO_REUSEADDR" );
      close( fd );
      exit( 1 );
   }

   memset( &serv_addr6, '\0', sizeof( serv_addr6 ) );
   serv_addr6.sin6_family = AF_INET6;
   serv_addr6.sin6_addr = in6addr_any;
   serv_addr6.sin6_port = htons( mudport );

   /*
    * IP binding: uncomment if server requires it, and set x.x.x.x to proper IP - Samson 
    */
   /*
    * sa.sin_addr.s_addr = inet_addr( "x.x.x.x" ); 
    */
#if defined(__APPLE__)
   if( bind( fd, ( const struct sockaddr * )&serv_addr6, (socklen_t)sizeof( serv_addr6 ) ) == -1 )
#else
   if( bind( fd, ( struct sockaddr * )&serv_addr6, sizeof( serv_addr6 ) ) == -1 )
#endif
   {
      perror( "Init_socket: bind" );
      close( fd );
      exit( 1 );
   }

   if( listen( fd, 50 ) < 0 )
   {
      perror( "Init_socket: listen" );
      close( fd );
      exit( 1 );
   }

   return fd;
}


The observant will note I left out the part where the SO_DONTLINGER option was set. Nothing seems to have gone awry leaving it out. SO_REUSEADDR had to stay though because it would report the address as already in use.

My new_descriptor function had to be adapted as well and looks like this now:

void new_descriptor( int new_desc )
{
   descriptor_data *dnew;
   struct sockaddr_in6 sock;
   int desc;
   char ip[INET6_ADDRSTRLEN];
#if defined(WIN32)
   ULONG r;
   int size;
#else
   int r;
   socklen_t size;
#endif

   size = sizeof( sock );
   if( check_bad_desc( new_desc ) )
   {
      set_alarm( 0 );
      return;
   }
   set_alarm( 20 );
   alarm_section = "new_descriptor: accept";
   if( ( desc = accept( new_desc, ( struct sockaddr * )&sock, &size ) ) < 0 )
   {
      perror( "New_descriptor: accept" );
      set_alarm( 0 );
      return;
   }
   if( check_bad_desc( new_desc ) )
   {
      set_alarm( 0 );
      return;
   }

   set_alarm( 20 );
   alarm_section = "new_descriptor: after accept";

#if defined(WIN32)
   r = 1;
   if( ioctlsocket( desc, FIONBIO, &r ) == SOCKET_ERROR )
   {
      perror( "New_descriptor: fcntl: O_NONBLOCK" );
      close( desc );
      return;
   }
#else
   r = fcntl( desc, F_GETFL, 0 );
   if( r < 0 || fcntl( desc, F_SETFL, O_NONBLOCK | O_NDELAY | r ) < 0 )
   {
      perror( "New_descriptor: fcntl: O_NONBLOCK" );
      close( desc );
      return;
   }
#endif

   if( check_bad_desc( new_desc ) )
      return;

   inet_ntop( AF_INET6, &sock.sin6_addr, ip, INET6_ADDRSTRLEN );

   dnew = new descriptor_data;
   dnew->init(  );
   if( desc == 0 )
   {
      bug( "%s: }RALERT! Assigning socket 0! BAD BAD BAD! Host: %s", __func__, ip );
      deleteptr( dnew );
      set_alarm( 0 );
      return;
   }
   dnew->descriptor = desc;
   dnew->client_port = ntohs( sock.sin6_port );
   dnew->ipaddress = ip;
   dnew->hostname = dnew->ipaddress;

/*
#if !defined(WIN32)
   if( !sysdata->NO_NAME_RESOLVING )
   {
      string buf = in_dns_cache( dnew->ipaddress );

      if( buf.empty(  ) )
         dnew->resolve_dns( sock.sin_addr.s_addr );
      else
         dnew->hostname = buf;
   }
#endif
*/
   // Ban notice is given in the ban.cpp file
   if( is_banned( dnew ) )
   {
      deleteptr( dnew );
      set_alarm( 0 );
      return;
   }

   if( dlist.empty(  ) )
      log_string( "Waking up autonomous update handlers." );

   dlist.push_back( dnew );

   /*
    * Terminal detect 
    */
   dnew->write_to_buffer( (const char*)do_term_type );

   /*
    * MCCP Compression 
    */
   dnew->write_to_buffer( (const char*)will_compress2_str );

   /*
    * Mud Sound Protocol 
    */
   dnew->write_to_buffer( (const char*)will_msp_str );

   /*
    * Send the greeting. No longer handled kludgely by a global variable.
    */
   dnew->send_greeting(  );

   dnew->send_color( "Enter your character's name, or type new: &d" );

   if( ++num_descriptors > sysdata->maxplayers )
      sysdata->maxplayers = num_descriptors;
   if( sysdata->maxplayers > sysdata->alltimemax )
   {
      sysdata->time_of_max = c_time( current_time, -1 );
      sysdata->alltimemax = sysdata->maxplayers;
      log_printf_plus( LOG_INFO, LEVEL_IMMORTAL, "Broke all-time maximum player record: %d", sysdata->alltimemax );
      save_sysdata(  );
   }
   set_alarm( 0 );
}


Obviously AFKMud has some extra meat in here :P

After successfully compiling this, the mud boots up and I can confirm via the netstat command on the server that it is listening on both IPv4 and IPv6. I then logged in to the MUD from my house using IPv4. Then quit from that and logged in again using the localhost connection from the sever. The logs looked like this:

Sat Jan 18, 2025 1:35:20 AM CST :: No people online yet. Suspending autonomous update handlers.
Sat Jan 18, 2025 1:35:32 AM CST :: Waking up autonomous update handlers.
Sat Jan 18, 2025 1:35:35 AM CST :: Incoming connection: ::ffff:97.117.127.63, port 52330.
Sat Jan 18, 2025 1:35:35 AM CST :: Preloading player data for: Samson
Sat Jan 18, 2025 1:35:38 AM CST :: Loading player data for Samson (19K)
Sat Jan 18, 2025 1:35:38 AM CST :: Samson [::ffff:97.117.127.63] has connected.
Sat Jan 18, 2025 1:35:39 AM CST :: Xterm client detected for Samson.
Sat Jan 18, 2025 1:35:39 AM CST :: Samson returns from beyond the void.
Sat Jan 18, 2025 1:36:01 AM CST :: Samson has quit.
Sat Jan 18, 2025 1:36:01 AM CST :: No more people online. Autonomous actions suspended.
Sat Jan 18, 2025 1:36:05 AM CST :: Waking up autonomous update handlers.
Sat Jan 18, 2025 1:36:08 AM CST :: Incoming connection: ::1, port 45068.
Sat Jan 18, 2025 1:36:08 AM CST :: Preloading player data for: Samson
Sat Jan 18, 2025 1:36:10 AM CST :: Loading player data for Samson (19K)
Sat Jan 18, 2025 1:36:10 AM CST :: Samson [::1] has connected.
Sat Jan 18, 2025 1:36:11 AM CST :: Xterm client detected for Samson.
Sat Jan 18, 2025 1:36:11 AM CST :: Samson returns from beyond the void.


You'll note the DNS resolver calls have been commented out. I doubt very much that they work with this code, and the IP coming in isn't "clean" as IPv4 connections go because of the extra "::ffff:" part in front of the actual IP.

Anyway, even though I'm reasonably certain anyone who wanted this has long since figured it out, I literally forgot about it after the previous post and hadn't given any thought to it since. If the DNS resolver code can be updated to properly resolve these things then we'd be in pretty good shape to include this in the existing supported codebases here.

If anyone has a better way to do this or has already figured the rest out, please post :)

Post is unread #35 Jan 18, 2025 7:55 pm   Last edited Jan 19, 2025 12:04 am by GatewaySysop
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts428
JoinedMar 7, 2005

 
Maybe this is a dumb question, but will this still work on a machine that is on IPv4 or is this only so that a mud with IPv6 connectivity can listen on IPv4 and IPv6, as you demonstrated it doing? Is this still going to be able to listen for IPv4 (only, obviously) on an IPv4 connected machine? At first glance it doesn't appear so, but maybe I'm ignorant or overthinking it.

I was poking around some time ago with something like this instead:

https://datatracker.ietf.org/doc/html/rfc4038#section-6.3.1

Something like this should work, yes? A little more complication but probably worth it.

Post is unread #36 Jan 18, 2025 11:28 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,705
JoinedJan 1, 2002

 
If all you want is IPv4 only then there's no reason to use the changes I've made. You'd just stick to what you have already. The whole idea was that we wanted a way for a system to run both IPv4 and IPv6. The code I've posted does this.

If you just want IPv6, then all you have to do is set the ipv6only value to 1 instead of 0.

The operating systems these days all have IPv6 support so I'd imagine that it will listen on both sides but if you only have an IPv4 address it would only ever respond to people connecting to that. IPv6 was still very new to the masses 13 years ago when I made the initial post and didn't have widespread OS support yet.

Post is unread #37 Jan 19, 2025 12:08 am   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts428
JoinedMar 7, 2005

 
I guess my point (my question?) was what happens if someone with an OS that doesn't have IPv6 support tries to compile and run the mud? Guessing if it's exclusively trying to do IPv6 (and listen for both v6 and v4 traffic) that it's going to puke its guts and not work, right?

For the sake or portability, wouldn't you want a solution that works whether the user is compiling on a machine with IPv4 or IPv6 support? Again forgive me if I'm off base here, but that's where my question was coming from. As written, it looked to me like the IPv4 crowd was more or less shit out of luck going forward. Am I wrong here?

Post is unread #38 Jan 19, 2025 12:20 am   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,705
JoinedJan 1, 2002

 
I don't have an exclusively IPv4 setup to test it on aside from my personal PC. However, the impression I got from the information I gathered (not from the AI btw) was that setting things up this way should still work because you aren't specifying a particular address. You're simply binding to the machine itself.

If you have a machine where you can try this that doesn't have an IPv6 address assigned at all then we'd know for sure. The function I posted should be usable on regular SmaugFUSS too.

Now you need to keep in mind that for some reason all of the information I was able to find is as old as my original post so who knows. Apparently nobody keeps properly updated documentation on things, which is apparently why I can't find an answer to "can I resolve both types of IPs back to hostnames".

Post is unread #39 Jan 19, 2025 1:02 am   
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts428
JoinedMar 7, 2005

 
Do have a look at the RFC I linked in my edited post. I think that's a good way to go, albeit a bit more complicated. Should allow one to have their cake and eat it too, from a portability perspective. :cool:

Post is unread #40 Jan 19, 2025 11:04 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,705
JoinedJan 1, 2002

 
I had a look at the RFC, and I really can't make heads or tails of what it's trying to say.

So I did some more digging and everything I'm turning up says that the function I posted will work just fine on a server that only supports IPv4. It simply won't be able to bind the IPv6 part to the port.

There is nothing out there to indicate that the code would refuse to work at all. They all simply say you'd only get one type or the other in a single protocol setup. They also said if you run into a server that only offers IPv4, you should find yourself a different provider. Even Cygwin supports dual stack setups now.

Pages:<< prev 1, 2, 3 next >>