84 lines
5.2 KiB
HTML
84 lines
5.2 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="reference" />
|
||
|
<meta name="DC.Title" content="Socket network functions" />
|
||
|
<meta name="abstract" content="Socket network functions allow application programs to obtain information from the host, protocol, service, and network files." />
|
||
|
<meta name="description" content="Socket network functions allow application programs to obtain information from the host, protocol, service, and network files." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="aconcepts.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="characteristics.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="xthread.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="dns.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../apis/unix8a.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../apis/ghostnm.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../apis/getaddrinfo.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../apis/ghosta.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../apis/getnameinfo.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="routines" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Socket network functions</title>
|
||
|
</head>
|
||
|
<body id="routines"><a name="routines"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Socket network functions</h1>
|
||
|
<div><p>Socket network functions allow application programs to obtain information
|
||
|
from the host, protocol, service, and network files.</p>
|
||
|
<div class="section"><p>The information can be accessed by name or by address, or by sequential
|
||
|
access of the file. These network functions (or routines) are required when
|
||
|
setting up communications between programs that run across networks, and thus
|
||
|
are not used by AF_UNIX sockets.</p>
|
||
|
</div>
|
||
|
<div class="section"><p>The routines are as follows:</p>
|
||
|
<ul><li>Map host names to network addresses.</li>
|
||
|
<li>Map network names to network numbers. </li>
|
||
|
<li>Map protocol names to protocol numbers. </li>
|
||
|
<li>Map service names to port numbers.</li>
|
||
|
<li>Convert the byte order of Internet network addresses.</li>
|
||
|
<li>Convert IP address and dotted decimal notation.</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><p>Included in the network routines is a group of routines called
|
||
|
resolver routines. These routines make, send, and interpret packets for name
|
||
|
servers in the Internet domain and are also used to do name resolution. The
|
||
|
resolver routines normally get called by <span class="apiname">gethostbyname()</span>, <span class="apiname">gethostbyaddr()</span>, <span class="apiname">getnameinfo()</span>,
|
||
|
and <span class="apiname">getaddrinfo()</span> but can be called directly. Primarily
|
||
|
resolver routines are used for accessing Domain Name System (DNS) through
|
||
|
socket application. </p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="aconcepts.htm" title="Advanced socket concepts go beyond a general discussion of what sockets are and how they work. They provide ways to design socket applications for larger and more complex networks.">Advanced socket concepts</a></div>
|
||
|
</div>
|
||
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
||
|
<div><a href="characteristics.htm" title="Sockets share some common characteristics.">Socket characteristics</a></div>
|
||
|
</div>
|
||
|
<div class="relref"><strong>Related reference</strong><br />
|
||
|
<div><a href="xthread.htm" title="Here is an example of a program that uses gethostbyaddr_r().">Example: Use gethostbyaddr_r() for threadsafe network routines</a></div>
|
||
|
<div><a href="dns.htm" title="iSeries provides applications with access to the Domain Name System (DNS) through the resolver functions.">Domain Name System support</a></div>
|
||
|
</div>
|
||
|
<div class="relinfo"><strong>Related information</strong><br />
|
||
|
<div><a href="../apis/unix8a.htm">Sockets Network Functions (Routines)</a></div>
|
||
|
<div><a href="../apis/ghostnm.htm">gethostbyname()</a></div>
|
||
|
<div><a href="../apis/getaddrinfo.htm">getaddrinfo()</a></div>
|
||
|
<div><a href="../apis/ghosta.htm">gethostbyaddr()</a></div>
|
||
|
<div><a href="../apis/getnameinfo.htm">getnameinfo()</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|