Sorry for late reply, I had vacation. IPV6 is for sure interesting to implement in ICS. In my opinion, there is not much work to support it because it merely only affect the way IP addresses are handled and there are only very few places where addresses are handled with something else than a string. You said you are using ICS-V5. This is not a good idea to start with that version. No development is done in V5 since V6 is out. Please use V6 only as a start base. There is not much work to have your existing application code adapted to ICS-V6: mostly change the uses clause to prefix ICS units with "OverbyteIcs". If you wrote components, there may be a little bit more work since in V6 there is now a shared hidden window to handle messages insted of one per component. So message handling has somewhat changed.
-- [EMAIL PROTECTED] The author of the freeware multi-tier middleware MidWare The author of the freeware Internet Component Suite (ICS) http://www.overbyte.be ----- Original Message ----- From: "asvetov" <[EMAIL PROTECTED]> To: <twsocket@elists.org> Sent: Thursday, September 04, 2008 9:20 PM Subject: [twsocket] TWSocket and IPv6 and getaddrinfo > Hello all! > > I investigate a little in IPv6 and make first steps. First thing on my > roadmap > is getaddrinfo. Can somebody look at code below and tell me whats wrong? > It wotks on Windows XP, but not on Windows 2008. I always get 11001. > > > Thanks for any help & best Regards, Alexander Svetov > > ... > > in6_addr = record > s6_addr : array[0..15] of u_char; > end; > TInAddr6 = in6_addr; > > sockaddr_in6 = record > sin6_family: short; > sin6_port: u_short; > sin6_flowinfo: u_long; > sin6_addr: TInAddr6; > sin6_scope_id: u_long; > end; > TSockAddrIn6 = sockaddr_in6; > > // see http://msdn.microsoft.com/en-us/library/ms737530(VS.85).aspx > // for information about getaddrinfo > > PAddrInfo = ^TAddrInfo; > TAddrInfo = record > ai_flags: integer; > ai_family: integer; > ai_socktype: integer; > ai_protocol: integer; > ai_addrlen: integer; > ai_canonname: PChar; > ai_addr: PSockAddr; > ai_next: PAddrInfo; > end; > > > function getaddrinfo(const NodeName, ServName: PChar; const Hints: > PAddrInfo; var Addrinfo: PAddrInfo): integer; stdcall; external > 'ws2_32.dll'; > procedure freeaddrinfo(ai: PAddrInfo); stdcall; external 'ws2_32.dll'; > function connect6(s: TSocket; const name: sockaddr_in6; namelen: Integer): > integer; stdcall; external 'ws2_32.dll' name 'connect'; > > ... > > var > S: TSocket; > SData: TWSAData; > RetVal: integer; > Hints: TAddrInfo; > Addr: PAddrInfo; > IP4Addr: TSockAddrIn; > IP6Addr: TSockAddrIn6; > const > hostname = 'localhost'; > begin > WSAStartup($0202, SData); > > ZeroMemory(@Hints, sizeof(Hints)); > Hints.ai_family := AF_UNSPEC; > Hints.ai_socktype := SOCK_STREAM; > Hints.ai_protocol := IPPROTO_TCP; > // Hints.ai_flags := AI_NUMERICHOST; // if we want to convert IP to > sockaddr. > > RetVal := GetAddrInfo(hostname, '80', @Hints, Addr); > if Retval = 0 then // success > begin > if (Addr <> nil) then Move(Addr^.ai_addr^, IP6Addr, > Addr^.ai_addrlen); > end > else > begin > showmessage(inttostr(RetVal) + ' ' + SysErrorMessage(Retval)); > end; > > freeaddrinfo(addr); > > S := Socket(AF_INET, SOCK_STREAM, IPPROTO_IP); > > RetVal := connect6(S, IP6Addr, SizeOf(TSockAddrIn6)); > if Retval = 0 then // success > begin > showmessage('connect'); > end > else > begin > showmessage(inttostr(RetVal) + ' ' + SysErrorMessage(Retval)); > end; > > CloseSocket(S); > > WSACleanUp; > end; > -- > 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 -- 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