networkprotocols/dnsproxy/test/src/t_dnsproxymain.cpp
branchRCL_3
changeset 22 8d540f55e491
parent 21 abbed5a4b42a
equal deleted inserted replaced
21:abbed5a4b42a 22:8d540f55e491
     1 // Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   166 	if (!GetIntFromConfig(aSection, KUSEIAP(), useiap))
   166 	if (!GetIntFromConfig(aSection, KUSEIAP(), useiap))
   167 		{
   167 		{
   168 		ERR_PRINTF2(_L("<font color=FF0000>No parameter %S</font>"), &KUSEIAP());
   168 		ERR_PRINTF2(_L("<font color=FF0000>No parameter %S</font>"), &KUSEIAP());
   169 		SetBlockResult(EFail);
   169 		SetBlockResult(EFail);
   170 		}
   170 		}
   171 
   171 		
       
   172 		
       
   173 	_LIT(KTestCaseName,"eth");	
   172 
   174 
   173 	TBuf8<256> name8;
   175 	TBuf8<256> name8;
   174 	name8.Copy(pname16);
   176 	name8.Copy(pname16);
   175 	TInt err= KErrNone;
   177 	TInt err= KErrNone;
   176 	//start the connection
   178 	//start the connection
   240   	    	SetBlockResult(EFail);
   242   	    	SetBlockResult(EFail);
   241   	    	return;
   243   	    	return;
   242 			}
   244 			}
   243 		iUseNapt = ETrue;	
   245 		iUseNapt = ETrue;	
   244 
   246 
   245 #ifdef SIROCCO_CODE_MIGRATION
       
   246 	_LIT(KInterfaceName,"wlan");
       
   247 	_LIT(KInterfaceName2,"wlan");
       
   248 #else
       
   249 	_LIT(KInterfaceName,"eth");
       
   250 	_LIT(KInterfaceName2,"eth");
       
   251 #endif
       
   252 
       
   253    		RSocket sock;
   247    		RSocket sock;
   254    		sock.Open(iSs,KAfInet, KSockDatagram, KProtocolInetUdp);     	
   248    		sock.Open(iSs,KAfInet, KSockDatagram, KProtocolInetUdp);     	
       
   249    		_LIT(KInterfaceName,"eth");
   255    		TUint32 testaddr = GetInterfaceAddress(sock,KInterfaceName());
   250    		TUint32 testaddr = GetInterfaceAddress(sock,KInterfaceName());
       
   251    		_LIT(KInterfaceName2,"eth");
   256    		TUint32 ifindex = GetInterfaceIndex(sock, KInterfaceName2());
   252    		TUint32 ifindex = GetInterfaceIndex(sock, KInterfaceName2());
   257      	sock.Close();
   253      	sock.Close();
   258      	     
   254      	     
   259     	TPckgBuf <TInterfaceLockInfo> info;    
   255     	TPckgBuf <TInterfaceLockInfo> info;    
   260 		info().iPublicIap  = useiap;  
   256 		info().iPublicIap  = useiap;  
   777   	    	SetBlockResult(EFail);
   773   	    	SetBlockResult(EFail);
   778   	    	return;
   774   	    	return;
   779 			}
   775 			}
   780 		iUseNapt = ETrue;	
   776 		iUseNapt = ETrue;	
   781 
   777 
   782 #ifdef SIROCCO_CODE_MIGRATION
       
   783 	_LIT(KInterfaceName,"wlan");
       
   784 	_LIT(KInterfaceName2,"wlan");
       
   785 #else
       
   786 	_LIT(KInterfaceName,"eth");
       
   787 	_LIT(KInterfaceName2,"eth");
       
   788 #endif
       
   789 
       
   790    		RSocket sock;
   778    		RSocket sock;
   791    		sock.Open(iSs,KAfInet, KSockDatagram, KProtocolInetUdp);     	
   779    		sock.Open(iSs,KAfInet, KSockDatagram, KProtocolInetUdp);     	
       
   780    		_LIT(KInterfaceName,"eth");
   792    		TUint32 testaddr = GetInterfaceAddress(sock,KInterfaceName());
   781    		TUint32 testaddr = GetInterfaceAddress(sock,KInterfaceName());
       
   782    		_LIT(KInterfaceName2,"eth");
   793    		TUint32 ifindex = GetInterfaceIndex(sock, KInterfaceName2());
   783    		TUint32 ifindex = GetInterfaceIndex(sock, KInterfaceName2());
   794      	sock.Close();
   784      	sock.Close();
   795      	     
   785      	     
   796     	TPckgBuf <TInterfaceLockInfo> info;    
   786     	TPckgBuf <TInterfaceLockInfo> info;    
   797 		info().iPublicIap  = useiap;  
   787 		info().iPublicIap  = useiap;