[Ace-users] [ace-users] IPV6 - problem in Windows XP
Premkumar P
kumaran.prem at gmail.com
Wed Nov 7 08:42:41 CST 2007
hi All,
ACE VERSION: 5.5.10
HOST MACHINE and OPERATING SYSTEM:
If on Windows based OS's, which version of WINSOCK do you
use?: winsock 2
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]: win32-config.h
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual
C++)]: VC 2003
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
(used by MPC when you generate your own makefiles):
ssl = 1
ipv6 = 1
ACE_HAS_IPV4_IPV6_MIGRATION is defined
AREA/CLASS/EXAMPLE AFFECTED:
[What example failed? What module failed to compile?]
DOES THE PROBLEM AFFECT:
COMPILATION?
LINKING?
On Unix systems, did you run make realclean first?
EXECUTION? YES
OTHER (please specify)?
[Please indicate whether ACE, your application, or both are affected.]
I am using a Windows dual stack machine (IPV4, IPV6), and i want to
all addresses (IPV6 & IPV4) available on the machine. My code works
fine on all unix flavours (solaris, AIX, HPUX, Linux and also MAC).
I am aware that on windows XP we need to create 2 different sockets to
listen do this, one listening on IPV4 addresses and other for IPV6
address, here is the problem.
as i have enabled IPV4_IPV6 migration (i cant disable this), when a
INET_Addr is created it finds that ipv6 is enabled on the machine and
sets the type to AF_INET6 and calls INET_Addr::reset which sets the
following
this->inet_addr_.in6_.sin6_family = AF_INET6;
if i change its type to AF_INET using INET_Addr::set_type, it does not
do the following
this->inet_addr_.in4_.sin_family = AF_INET;
so, if i pass the above created addess to Asynch_Acceptor::open bind
returns error.
i fixed the above by adding the following to set_port_number
this->inet_addr_.in4_.sin_family = AF_INET;
I dont see any way by which i can achieve what i am trying to do here,
i cant pass the hostname to INET_Addr::set (wild card address needed)
which rules out all set methods.
regards,
Prem
More information about the Ace-users
mailing list