Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"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:
-->
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-3AAE78A4-75C5-5607-8775-43DFB43DCFE8" xml:lang="en"><title>Getting
and Setting IP Addresses Tutorial</title><shortdesc>This topic describes how to get and set IP addresses. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section><title>Introduction</title> <p>To establish a connection with the
host, the IP addresses must be determined and set. The IP address can be local
or remote. This tutorial describes the following: </p> <ul>
<li id="GUID-7530B431-A110-5871-A1EF-44B58F6A5D32"><p> <xref href="GUID-3AAE78A4-75C5-5607-8775-43DFB43DCFE8.dita#GUID-3AAE78A4-75C5-5607-8775-43DFB43DCFE8/GUID-88793F99-9D35-57B6-BA29-3668D48A2233">How to Get a Local IP Address</xref> </p> </li>
<li id="GUID-95D8FD14-584A-5B04-96A3-09CAB7D94AFE"><p> <xref href="GUID-3AAE78A4-75C5-5607-8775-43DFB43DCFE8.dita#GUID-3AAE78A4-75C5-5607-8775-43DFB43DCFE8/GUID-B5AA66C6-DF44-5D48-933C-A546249A35A4">How to Get a Remote IP Address</xref> </p> </li>
<li id="GUID-924ACD14-1470-50D8-877A-1DDC95A3B7A7"><p> <xref href="GUID-3AAE78A4-75C5-5607-8775-43DFB43DCFE8.dita#GUID-3AAE78A4-75C5-5607-8775-43DFB43DCFE8/GUID-D005BFE7-92E2-5AF9-9C87-22A5E1F0CA06">How to Set the Local IP Address</xref> </p> </li>
</ul> <p> <b>Note:</b> Usually IP address are automatically allocated to client
applications when a dial-up connection is established. </p> </section>
<section id="GUID-88793F99-9D35-57B6-BA29-3668D48A2233"><title>How to Get
a Local IP Address</title> <p>The <xref href="GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0.dita#GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0/GUID-810B7445-7328-312D-B11B-49D03E71CD61"><apiname>RSocket::LocalName()</apiname></xref> function
is used to get the local IP address and the port. </p> </section>
<section id="GUID-B5AA66C6-DF44-5D48-933C-A546249A35A4"><title>How to Get
a Remote IP Address</title> <p>The <xref href="GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0.dita#GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0/GUID-34569598-5813-3DA6-8F3A-4BC04BF20540"><apiname>RSocket::RemoteName()</apiname></xref> function
is used to get the remote IP address and the port </p> <p> </p> </section>
<section id="GUID-D005BFE7-92E2-5AF9-9C87-22A5E1F0CA06"><title>How to Set
the Local IP Address</title> <p>The <xref href="GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0.dita#GUID-D4F08503-F1EF-3531-9C3C-4AF24A6255F0/GUID-5550C9E4-2A1B-3F52-A6CF-F5822AB9DBC9"><apiname>RSocket::Bind()</apiname></xref> function
is used to set the local IP address and the port. This call must be made by
server applications before calling <codeph>RSocket::Listen()</codeph>. To
get and set the IP address, the <code>anAddr</code> argument must be
of the class . <codeph>TInetAddr</codeph>.</p> </section>
</conbody></concept>