Topic Path: Symbol Reference > Classes > TIdStackBSDBase Class > TIdStackBSDBase Methods > TranslateTInAddrToString Method
TIdStackBSDBase.TranslateTInAddrToString Method

Converts a structured IP address to its representation as string.

function TranslateTInAddrToString(
    var AInAddr; 
    const AIPVersion: TIdIPVersion
): string;
Structured data type to convert.
IP version number to use for the conversion. 

string - String representation for the IP address.

TranslateTInAddrToString is a string function used to convert a structured IP address data type to its representation as string. 

AInAddr is the structured data type containing the IP address to convert to a string. 

AIPVersion is the IP version number to use for the conversion. 

TranslateTInAddrToString performs the following processing based on the IP version number indicated in AIPVersion: 


IP Version 
Conversion Processing 
The IP address to cast to a TIdIn4Addr data type, and four bytes values derived to represent the IP address in its dotted-decimal form. 
The IP address is cast to a TIdIn6Addr data type, and eight values are derived to represent the IP address in its colon-delimited hexadecimal form. 


When AIPVersion contains any other value, the IPVersionUnsupported method is called. 

Use TranslateStringToTInAddr to convert a string value to its representation as a structured IP address.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.