diff -r b26acd06ea60 -r ac50fd48361b sdkcreationmw/sdkruntimes/wsock/src/WinsockProtocolFamily.cpp --- a/sdkcreationmw/sdkruntimes/wsock/src/WinsockProtocolFamily.cpp Mon Mar 08 12:09:11 2010 +0530 +++ b/sdkcreationmw/sdkruntimes/wsock/src/WinsockProtocolFamily.cpp Wed Apr 21 09:56:53 2010 +0530 @@ -2,16 +2,13 @@ * Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". * * Initial Contributors: * Nokia Corporation - initial contribution. * * Contributors: * -* Description: * */ @@ -52,6 +49,39 @@ } }; +#if 0 + +TWinProtocolDescInit IP(_S("ip"), + KAfInet, KSockStream, KProtocolInetTcp, KSIStreamBased | KSIInOrder | + KSIReliable | KSIGracefulClose | KSIPeekData | KSIUrgentData, + KSocketMessageSizeIsStream, ESocketSupport, + SOCK_STREAM, IPPROTO_TCP); + +#ifdef WSOCK_IPV6 + +TWinProtocolDescInit IP6(_S("ip6"), + KAfInet6, KSockStream, KProtocolInetTcp, KSIStreamBased | KSIInOrder | + KSIReliable | KSIGracefulClose | KSIPeekData | KSIUrgentData, + KSocketMessageSizeIsStream, ESocketSupport, + SOCK_STREAM, IPPROTO_TCP); +#endif + +// NOTE: the order of protocols must match the order of entries in the +// ip.tcp.esk file (at the time of thie writing this file was located +// in c:\private\101f7989\ESock directory). +static const TWinProtocolDesc* ipProtocols[] = { + &IP, +#ifdef WSOCK_IPV6 + &IP6 +#endif // WSOCK_IPV6 +}; +#else +TWinProtocolDescInit IP(_S("ip"), + KAfInet, KSockStream, KProtocolInetTcp, KSIStreamBased | KSIInOrder | + KSIReliable | KSIGracefulClose | KSIPeekData | KSIUrgentData, + KSocketMessageSizeIsStream, ESocketSupport, + SOCK_STREAM, IPPROTO_IP); + TWinProtocolDescInit TCP(_S("tcp"), KAfInet, KSockStream, KProtocolInetTcp, KSIStreamBased | KSIInOrder | KSIReliable | KSIGracefulClose | KSIPeekData | KSIUrgentData, @@ -77,6 +107,13 @@ SOCK_RAW, IPPROTO_ICMPV6); #ifdef WSOCK_IPV6 + +TWinProtocolDescInit IP6(_S("ip6"), + KAfInet6, KSockStream, KProtocolInetTcp, KSIStreamBased | KSIInOrder | + KSIReliable | KSIGracefulClose | KSIPeekData | KSIUrgentData, + KSocketMessageSizeIsStream, ESocketSupport, + SOCK_STREAM, IPPROTO_IP); + TWinProtocolDescInit TCP6(_S("tcp"), KAfInet6, KSockStream, KProtocolInetTcp, KSIStreamBased | KSIInOrder | KSIReliable | KSIGracefulClose | KSIPeekData | KSIUrgentData, @@ -103,16 +140,18 @@ #endif // WSOCK_IPV6 + + // NOTE: the order of protocols must match the order of entries in the // ip.tcp.esk file (at the time of thie writing this file was located // in c:\private\101f7989\ESock directory). static const TWinProtocolDesc* ipProtocols[] = { - &TCP,&UDP,&ICMP4,&ICMP6, + &IP,&TCP,&UDP,&ICMP4,&ICMP6, #ifdef WSOCK_IPV6 - &TCP6,&UDP6,&ICMP46,&ICMP66 + &IP6,&TCP6,&UDP6,&ICMP46,&ICMP66 #endif // WSOCK_IPV6 }; - +#endif CWinsockProtocolFamily::CWinsockProtocolFamily(TUint aAddrFamily) : iAddrFamily(aAddrFamily) { @@ -150,6 +189,34 @@ } // Returns comma separated list of protocol names +void CWinsockProtocolFamily::ProtocolNamesfownetwork(TDes& aProtocols) +{ + aProtocols.SetLength(0); + /* for (TInt i=0; iiName.Compare(ipProtocols[k]->iName)) + { + alreadyThere = ETrue; + break; + } + } + if (!alreadyThere) + { + if (i > 0) aProtocols.Append(','); + aProtocols.Append(ipProtocols[i]->iName); + } + }*/ + aProtocols.Append(ipProtocols[0]->iName); + aProtocols.Append(','); + aProtocols.Append(ipProtocols[5]->iName); + + TRACE1("ProtocolNames: %S",&aProtocols); +} + +// Returns comma separated list of protocol names void CWinsockProtocolFamily::ProtocolNames(TDes& aProtocols) { aProtocols.SetLength(0);