Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 14:07, 23 November 2007.

How to convert TUint IP Address to Char String

From Forum Nokia Wiki

Some parameters of Socket API's return IP Address as TUint and some parameters need IP Address as Character String so to Interchange the IP Address from TUint to Char you can use the following code.

/*
 *@param ip_addr :- IP Address in  TUint format.
 *@ ret str_p :-  on return  contains the IP Address in string format.
 */
void UnsignedToString(char* str_p,TUint ip_addr)
{
  sprintf(str_p,"%d.%d.%d.%d",(ip_addr >> 24) & 0xff,(ip_addr >> 16) & 0xff,(ip_addr >> 8) &     
  0xff,ip_addr & 0xff);          
  return;
}
Related Discussions
Thread Thread Starter Forum Replies Last Post
[求助] 关于结构体和描述符 frank.sunny@163.com Symbian 4 2007-10-19 04:02
Convert from TBuf to TBTDevAddr Tejaswini General Symbian C++ 2 2007-06-05 15:15
N70, socket problem sblantipodi Mobile Java Networking & Messaging & Security 19 2007-02-22 20:54
HBufC to char. mahavirjain General Symbian C++ 1 2006-05-25 18:58
Descriptor conversion chan_fookmun General Symbian C++ 8 2005-12-26 10:11
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX