[ace-users] question on ACE_INET_Addr
Premkumar P
kumaran.prem at gmail.com
Wed Aug 1 21:58:25 CDT 2007
hi,
i tried it already but it does not work, i made a small change in
INET_Addr.cpp and is working now ( for now that is !!!! )
modification made :
/////////////////////////////////////////////////////////////////////////////////////////
File : INET_Addr.cpp
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
ACE_INET_Addr::ACE_INET_Addr (u_short port_number,
const char host_name[],
int address_family)
: ACE_Addr (determine_type (), sizeof (inet_addr_))
{
ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
ACE_OS::memset (&this->inet_addr_, 0, sizeof (this->inet_addr_));
if (this->set (port_number,
host_name,
1,
address_family) == -1)
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("ACE_INET_Addr::ACE_INET_Addr: %p\n"),
ACE_TEXT_CHAR_TO_TCHAR ((host_name == 0) ?
"<unknown>" : host_name)));
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
ACE_INET_Addr::ACE_INET_Addr (u_short port_number,
const char host_name[],
int address_family)
: ACE_Addr (determine_type (), sizeof (inet_addr_))
{
ACE_TRACE ("ACE_INET_Addr::ACE_INET_Addr");
ACE_OS::memset (&this->inet_addr_, 0, sizeof (this->inet_addr_));
if (this->set (port_number,
host_name,
1,
(address_family == 0 ? get_type() : address_family)) == -1)
ACE_ERROR ((LM_ERROR,
ACE_LIB_TEXT ("ACE_INET_Addr::ACE_INET_Addr: %p\n"),
ACE_TEXT_CHAR_TO_TCHAR ((host_name == 0) ?
"<unknown>" : host_name)));
}
/////////////////////////////////////////////////////////////////////////////////////////
it is determining the type type properly in the constructory entry but the
set function when called with address_family set to 0 will set the type to
AF_INET6, i used the the guessed type if the address_family is not
specified.
if this is not the right place to make the modficiation please let me know
thankx in advance,
Prem
On 8/2/07, Phil Mesnier <mesnier_p at ociweb.com> wrote:
>
>
>
> Premkumar P wrote:
> > hi,
> > thankx for the reply
> > i found ACE_USES_IPV4_IPV6_MIGRATION being used in ACE_INET_Addr to
> > guess if ipv6 works or not and then set the type properly will this help
> ??
> >
>
> Yes, I had forgotten about that switch. #define that in your config.h
> and rebuild.
>
> --
> Phil Mesnier
> Principal Software Engineer, http://www.ociweb.com
> Object Computing, Inc. +01.314.579.0066
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/ace-users/attachments/20070802/45d185af/attachment.htm
More information about the Ace-users
mailing list