My suggestion was to remove these lines at all.
See attached diff file.
Anton Pak
On Wed, 09 Feb 2011 18:33:44 +0300, Preeti Sharma
<[email protected]> wrote:
Hi Anton,
Thanks, how to change below line of code for IPV6.
#ifndef INADDR_NONE
#define INADDR_NONE 0xffffffff
#endif
//TODO if (addr.sin_addr.s_addr == INADDR_NONE) {
Regards,
Preeti
-----Original Message-----
From: Anton Pak [mailto:[email protected]]
Sent: Wednesday, February 09, 2011 10:35 AM
To: Preeti Sharma
Cc: [email protected]
Subject: Re: [Openhpi-devel] How to configure openHpi-2.15.1 for IPV6 ?
Preeti,
Good.
I guess inet_addr() function has no direct counterpart in IPv6 world.
They introduced getaddrinfo() for any name resolution.
You can safely remove the code and return error if phe == NULL;
Anton Pak
On Wed, 09 Feb 2011 18:16:54 +0300, Preeti Sharma
<[email protected]> wrote:
Hi Anton,
I replaced code for IPV4 to IPV6 for openHpi-2.15.1 release. I have been
able to run daemon and clients successfully with the changes, though I
have commented out code below code as I could not figure out how to
modify this piece of code (shown below in red) from method
cstrmsock::Open of transport/strmsock.cpp (line no. 260 and 261).
if (phe)
memcpy((char *) &addr.sin6_addr, phe -> h_addr, phe ->
h_length);
//TODO else
//TODO addr.sin_addr.s_addr = inet_addr(pszHost);
//TODO if (addr.sin_addr.s_addr == INADDR_NONE) {
//TODO errcode = 67; // bad network name
//TODO close(s);
//TODO return(TRUE);
//TODO }
// connect to the remote host
Regards,
Preeti
-----Original Message-----
From: Anton Pak [mailto:[email protected]]
Sent: Tuesday, February 08, 2011 6:49 PM
To: Preeti Sharma
Subject: Re: [Openhpi-devel] How to configure openHpi-2.15.1 for IPV6 ?
Yes, it required rather significant code change.
See what grep shows on trunk in attached screenshot.
Anton Pak
On Wed, 09 Feb 2011 02:38:55 +0300, Preeti Sharma
<[email protected]> wrote:
Hi Anton,
Thanks for your response. I grepped in OpenHpi code for AF_INET6,
sockaddr_in6 - none result came. How to verify IPv6 is supported for
communication between daemon and Base Library.
Looks like it requires code change, not just configuration of
openHpi2.15.1 for IPV6 support.
Regards,
Preeti
-----Original Message-----
From: Anton Pak [mailto:[email protected]]
Sent: Friday, February 04, 2011 6:08 PM
To: [email protected]; Preeti Sharma
Subject: Re: [Openhpi-devel] How to configure openHpi-2.15.1 for IPV6 ?
IPv6 is currently supported for communication between OpenHPI daemon
and Base Library (client application).
Plug-ins do not support it.
Anton Pak
On Sat, 05 Feb 2011 01:40:18 +0300, Preeti Sharma
<[email protected]> wrote:
Hi,
I want to configure openHpi deamon and sample clients as well plugins
for IPV6. Please let me know how to do this?
Regards,
Preeti
--- transport/strmsock.cpp.old 2011-02-09 18:36:09.000000000 +0300
+++ transport/strmsock.cpp 2011-02-09 18:36:30.000000000 +0300
@@ -256,9 +256,7 @@
phe = gethostbyname(pszHost);
if (phe)
memcpy((char *) &addr.sin_addr, phe -> h_addr, phe -> h_length);
- else
- addr.sin_addr.s_addr = inet_addr(pszHost);
- if (addr.sin_addr.s_addr == INADDR_NONE) {
+ else {
errcode = 67; // bad network name
close(s);
return(TRUE);
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel