Re: [twsocket] Winsock 1.1 and IPv6

2010-05-23 Thread Francois PIETTE

if support for winsock below v2.2 was actually required in
ICS v7?


As Wiki says,
Version 2.1 of Winsock was supplied in an add-on package for Windows 95. 
It was an integral component of Windows 98, Windows NT 4.0, and all 
subsequent Windows releases. (Microsoft did not supply implementations of 
Winsock 2 for Windows 3.x or Windows NT 3.x.)


I don't think v7 could be launched on Win 3.x.


Agreed.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Winsock 1.1 and IPv6

2010-05-23 Thread Francois PIETTE

I'm going to look at how to implement IPv6 in ICS and wonder
if support for winsock below v2.2 was actually required in 
ICS v7?



No, I don't believe ICS v6 and v7 need to support any OSs earlier than
Windows 2000, since they are long out of support and there is no need for
them to support new applications.  v5 is fine for legacy applications and
compilers. 


Agreed.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Winsock 1.1 and IPv6

2010-05-23 Thread Francois PIETTE

I'm going to look at how to implement IPv6 in ICS and wonder
if support for winsock below v2.2 was actually required in
ICS v7?


No, I don't believe ICS v6 and v7 need to support any OSs earlier than
Windows 2000, since they are long out of support and there is no need
for them to support new applications.  v5 is fine for legacy
applications and compilers.


There's an option to dynamically load a different winsock version at
runtime (see properties ReqVerHigh and ReqVerLow).
However loading v2.x requires winsock2 headers, and if we want IPv6
we must use winsock2 API. I think I'll keep these two properties as
dummies, they would no longer work, what do you think?



Just an idea:
I don't think anyone ever changed the value of those properties. So changing 
their default value to the value required to support IPv6 wouldn't break any 
existing code and yet allow to trigger an exception if the winsock level is 
not reached. The setter of any other property specifying IPv6 would check 
the version properties and trigger an exception if the required version is 
not there. The idea is that it is better to trigger the exception when the 
IPv6 values are set to the properties than later when they are refused by 
the system calls.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Winsock 1.1 and IPv6

2010-05-21 Thread Anton Sviridov
There's a socket lib written on C++ which seems to have async v6 resolving:

2.1.1: Tcp socket Reconnect now works again. Improved ipv6 support. 
Asynchronous resolver now works with ipv6 too. Safer pointer handling using STL 
auto_ptr in some cases. Thread safety improvements, gethostby* functions has 
been replaced by getnameinfo/getaddrinfo.

I looked at the code, but they did something strange there, I can't realize 
their solution. Maybe you'll be able to?
Though I think the blocking issue shouldn't stop you because 
TCustomWSocket.Connect uses blocking WSocket_Synchronized_GetHostByName anyway.

-- 
Anton
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Winsock 1.1 and IPv6

2010-05-21 Thread Arno Garrels
Anton Sviridov wrote:
 There's a socket lib written on C++ which seems to have async v6
 resolving: 
 
[..]
 gethostby* functions has been replaced by getnameinfo/getaddrinfo.   

Yes, that is the recommended replacement.

 
 I looked at the code, but they did something strange there, I can't
 realize their solution. Maybe you'll be able to?

I still do not know exactly how to make it. Currently I waste my time 
with attempts to get multicasts/broadcasts working, still no luck :(
I can see sent data in Wireshark, however the listener doesn't trigger
OnDataAvailable.
 
 Though I think the blocking issue shouldn't stop you because
 TCustomWSocket.Connect uses blocking
 WSocket_Synchronized_GetHostByName anyway.  

I think in DnsLookup I'll start a thread that populates the IPList.
With new property SocketFamily set to sfAny the list may contain
both IPv4 and IPv6 IP-strings, with SocketFamily set to sfIPv4 or 
sfIPv6 just IPs of one family. 
 
--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Winsock 1.1 and IPv6

2010-05-20 Thread Anton Sviridov
 if support for winsock below v2.2 was actually required in 
 ICS v7?

As Wiki says,
Version 2.1 of Winsock was supplied in an add-on package for Windows 95. It was 
an integral component of Windows 98, Windows NT 4.0, and all subsequent Windows 
releases. (Microsoft did not supply implementations of Winsock 2 for Windows 
3.x or Windows NT 3.x.)

I don't think v7 could be launched on Win 3.x.

-- 
Anton
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Winsock 1.1 and IPv6

2010-05-20 Thread Angus Robertson - Magenta Systems Ltd
 I'm going to look at how to implement IPv6 in ICS and wonder
 if support for winsock below v2.2 was actually required in 
 ICS v7?

No, I don't believe ICS v6 and v7 need to support any OSs earlier than
Windows 2000, since they are long out of support and there is no need for
them to support new applications.  v5 is fine for legacy applications and
compilers. 

Angus


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Winsock 1.1 and IPv6

2010-05-20 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote:
 I'm going to look at how to implement IPv6 in ICS and wonder
 if support for winsock below v2.2 was actually required in
 ICS v7?
 
 No, I don't believe ICS v6 and v7 need to support any OSs earlier than
 Windows 2000, since they are long out of support and there is no need
 for them to support new applications.  v5 is fine for legacy
 applications and compilers.

There's an option to dynamically load a different winsock version at
runtime (see properties ReqVerHigh and ReqVerLow). 
However loading v2.x requires winsock2 headers, and if we want IPv6
we must use winsock2 API. I think I'll keep these two properties as 
dummies, they would no longer work, what do you think?   

--
Arno Garrels

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Winsock 1.1 and IPv6

2010-05-20 Thread Angus Robertson - Magenta Systems Ltd
 There's an option to dynamically load a different winsock version at
 runtime (see properties ReqVerHigh and ReqVerLow). 
 However loading v2.x requires winsock2 headers, and if we want IPv6
 we must use winsock2 API. I think I'll keep these two properties as 
 dummies, they would no longer work, what do you think?   

Yes, leave the version properties, but ignore them.  

Disappearing properties are always trouble, yesterday SslContext was
displaying a set of X509 FLAGs in the object inspector that did not exist
in the source so the form would not open, rebuilt the package and the
FLAGs disappeared.  Could not find them in any older version of WSocket
either, gave up, very puzzled. 

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Winsock 1.1 and IPv6

2010-05-20 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote:
 There's an option to dynamically load a different winsock version at
 runtime (see properties ReqVerHigh and ReqVerLow).
 However loading v2.x requires winsock2 headers, and if we want IPv6
 we must use winsock2 API. I think I'll keep these two properties as
 dummies, they would no longer work, what do you think?
 
 Yes, leave the version properties, but ignore them.

Done:  

TcpSrv (c) 1999-2008 by François PIETTE. V7.02
 TWSocket (c) 1996-2010 Francois Piette V7.39 
 TWSocketServer (c) 1999-2008 F. Piette V7.00 
 I am asus
 IP: 2001:db8::3
192.168.178.200
192.168.135.1
192.168.239.1

Waiting for clients...
Client connected. Remote: 2001:db8::3/1067 Local: 2001:db8::3/23
There is now 1 clients connected.
Received from 2001:db8::3: 'binary 128'

But there's another problem with WSocket_WSAAsyncGetHostByName.
AKAIK, this old API doesn't support IPv6. New API GetAddrInfo() handles 
both IPv4 and IPv6 but it is blocking. Should I try to emulate asynchron
lookups using a thread? Ideas are welcome.

--
Arno Garrels


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Winsock 1.1 and IPv6

2010-05-20 Thread Fastream Technologies
On Thu, May 20, 2010 at 7:42 PM, Arno Garrels arno.garr...@gmx.de wrote:

 Angus Robertson - Magenta Systems Ltd wrote:
  There's an option to dynamically load a different winsock version at
  runtime (see properties ReqVerHigh and ReqVerLow).
  However loading v2.x requires winsock2 headers, and if we want IPv6
  we must use winsock2 API. I think I'll keep these two properties as
  dummies, they would no longer work, what do you think?
 
  Yes, leave the version properties, but ignore them.

 Done:

 TcpSrv (c) 1999-2008 by François PIETTE. V7.02
  TWSocket (c) 1996-2010 Francois Piette V7.39
  TWSocketServer (c) 1999-2008 F. Piette V7.00
  I am asus
  IP: 2001:db8::3
 192.168.178.200
 192.168.135.1
 192.168.239.1

 Waiting for clients...
 Client connected. Remote: 2001:db8::3/1067 Local: 2001:db8::3/23
 There is now 1 clients connected.
 Received from 2001:db8::3: 'binary 128'

 But there's another problem with WSocket_WSAAsyncGetHostByName.
 AKAIK, this old API doesn't support IPv6. New API GetAddrInfo() handles
 both IPv4 and IPv6 but it is blocking. Should I try to emulate asynchron
 lookups using a thread? Ideas are welcome.

 --
 Arno Garrels



 Hi Arno,

As usual, I am against one thread per call approach for the sake of
scalability. I believe there must be another async way from Redmondians.

Regards,

SZ
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Winsock 1.1 and IPv6

2010-05-20 Thread Angus Robertson - Magenta Systems Ltd
 New API GetAddrInfo()  handles both IPv4 and IPv6 but it is
 blocking. Should I try to  emulate asynchron
 lookups using a thread? Ideas are welcome.

Yes definitely, we must be consistent with everything else, no blocking
allowed in ICS!  

How do we test IPv6 host lookups, presumably need an IPv6 DNS server?  I
guess I should try and set-up this stuff on my public Windows 2008 server,
but I don't know if my hosting company routes IPv6, and I'm sure the
ancient Sonicwall firewall I use does not. 

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Winsock 1.1 and IPv6

2010-05-20 Thread Arno Garrels
Fastream Technologies wrote:
 
 But there's another problem with WSocket_WSAAsyncGetHostByName.
 AKAIK, this old API doesn't support IPv6. New API GetAddrInfo()
 handles both IPv4 and IPv6 but it is blocking. Should I try to
 emulate asynchron lookups using a thread? Ideas are welcome.
 
 --
 Arno Garrels
 
 
 
 Hi Arno,
 
 As usual, I am against one thread per call approach for the sake of
 scalability. I believe there must be another async way from
 Redmondians. 

It's just used in method DnsLookup, which is not the default 
HostByName-routine. Anyway I'm not aware of a IPv6-capable function
that could be used as a replacement for WSAAsyncGetHostByName(). 

--
Arno garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Winsock 1.1 and IPv6

2010-05-20 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote:
 New API GetAddrInfo()  handles both IPv4 and IPv6 but it is
 blocking. Should I try to  emulate asynchron
 lookups using a thread? Ideas are welcome.
 
 Yes definitely, we must be consistent with everything else, no
 blocking allowed in ICS!

OK. 

 
 How do we test IPv6 host lookups, presumably need an IPv6 DNS server?

It's not necessary to have a DNS server, the good old HOSTS file works
as well in the LAN. 

 I guess I should try and set-up this stuff on my public Windows 2008
 server, but I don't know if my hosting company routes IPv6,
 and I'm sure the ancient Sonicwall firewall I use does not.

Same here, I haven't yet checked whether my provider supports IPv6,
and my router vendor currently provides just an experimental IPv6
BIOS. With (public) IPv6 you also need new firewall rules and NAT
was no longer required.

--
Arno garrels

   
   
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be