1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../css/manpage.css" type="text/css" /> 7<title>InetNtoP</title> 8 </head> 9 <body> 10<h1><CODE>nn::socket::InetNtoP</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14const char * InetNtoP( 15 int af, 16 const void * src, 17 char * dst, 18 unsigned len 19); 20</pre> 21 </div> 22<h2>Arguments</h2> 23 <div class="section"> 24 <table class="arguments"> 25 <thead> 26 <tr> 27 <td width="15" /> 28<th>Name</th> 29<td>Description</td> 30 </tr> 31 </thead> 32 <tr> 33<td>in</td> 34<th>af</th> 35<td>Specifies the address family of the host address to be converted.<itemizedlist><listitem><para><CODE>AF_INET</CODE></para></listitem></itemizedlist></td> 36 </tr> 37 <tr> 38<td>in</td> 39<th>src</th> 40<td>Specifies a pointer to a structure holding a host address in numeric format. When using <CODE>AF_INET</CODE>, specify a pointer to an <CODE>InAddr</CODE> structure.</td> 41 </tr> 42 <tr> 43<td>in</td> 44<th>dst</th> 45<td>Specifies a pointer to the buffer that gets the string in standard text format. When using <CODE>AF_INET</CODE>, the standard text format is dot-decimal notation.</td> 46 </tr> 47 <tr> 48<td>in</td> 49<th>len</th> 50<td>Specifies the size in bytes of the buffer specified in <SPAN class="argument">dst</SPAN>. When using <CODE>AF_INET</CODE>, prepare a buffer sized to the maximum length of an IPv4 host address in dot-decimal notation (<CODE>INET_ADDRSTRLEN</CODE>).</td> 51 </tr> </table> 52 </div> 53<h2>Return Values</h2> 54<div class="section">On success, returns a pointer to the string resulting from conversion. The string instance is the buffer specified in <SPAN class="argument">dst</SPAN>. On failure, returns <CODE>NULL</CODE>. </div> 55<h2>Description</h2> 56 <div class="section"> 57<p>Converts a host address given in numeric format to a string representing the address in standard text format.</p><p>Can be used even if <a href="../../nn/socket/Initialize.html"><CODE>Initialize</CODE></a> has not been called.</p><!-- write here --></div> 58<h2>See Also</h2> 59 <div class="section"> 60 <p class="reference"> 61 <br /> </p> 62 </div> 63<h2>Revision History</h2> 64 <div class="section"> 65 <dl class="history"> 66 <dt>2010/06/14</dt> 67<dd>Initial version.<br /> 68 </dd> 69 </dl> 70 </div> 71 <hr><p>CONFIDENTIAL</p></body> 72</html>